xref: /openbmc/linux/include/net/netfilter/nft_meta.h (revision a8da474e)
1 #ifndef _NFT_META_H_
2 #define _NFT_META_H_
3 
4 struct nft_meta {
5 	enum nft_meta_keys	key:8;
6 	union {
7 		enum nft_registers	dreg:8;
8 		enum nft_registers	sreg:8;
9 	};
10 };
11 
12 extern const struct nla_policy nft_meta_policy[];
13 
14 int nft_meta_get_init(const struct nft_ctx *ctx,
15 		      const struct nft_expr *expr,
16 		      const struct nlattr * const tb[]);
17 
18 int nft_meta_set_init(const struct nft_ctx *ctx,
19 		      const struct nft_expr *expr,
20 		      const struct nlattr * const tb[]);
21 
22 int nft_meta_get_dump(struct sk_buff *skb,
23 		      const struct nft_expr *expr);
24 
25 int nft_meta_set_dump(struct sk_buff *skb,
26 		      const struct nft_expr *expr);
27 
28 void nft_meta_get_eval(const struct nft_expr *expr,
29 		       struct nft_regs *regs,
30 		       const struct nft_pktinfo *pkt);
31 
32 void nft_meta_set_eval(const struct nft_expr *expr,
33 		       struct nft_regs *regs,
34 		       const struct nft_pktinfo *pkt);
35 
36 #endif
37