1
2#ifndef _NFT_META_H_
3#define _NFT_META_H_
4
5#include <net/netfilter/nf_tables.h>
6
7struct nft_meta {
8 enum nft_meta_keys key:8;
9 union {
10 u8 dreg;
11 u8 sreg;
12 };
13};
14
15extern const struct nla_policy nft_meta_policy[];
16
17int nft_meta_get_init(const struct nft_ctx *ctx,
18 const struct nft_expr *expr,
19 const struct nlattr * const tb[]);
20
21int nft_meta_set_init(const struct nft_ctx *ctx,
22 const struct nft_expr *expr,
23 const struct nlattr * const tb[]);
24
25int nft_meta_get_dump(struct sk_buff *skb,
26 const struct nft_expr *expr);
27
28int nft_meta_set_dump(struct sk_buff *skb,
29 const struct nft_expr *expr);
30
31void nft_meta_get_eval(const struct nft_expr *expr,
32 struct nft_regs *regs,
33 const struct nft_pktinfo *pkt);
34
35void nft_meta_set_eval(const struct nft_expr *expr,
36 struct nft_regs *regs,
37 const struct nft_pktinfo *pkt);
38
39void nft_meta_set_destroy(const struct nft_ctx *ctx,
40 const struct nft_expr *expr);
41
42int nft_meta_set_validate(const struct nft_ctx *ctx,
43 const struct nft_expr *expr,
44 const struct nft_data **data);
45
46#endif
47