Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
aa45660c TB |
2 | #ifndef _NFT_META_H_ |
3 | #define _NFT_META_H_ | |
4 | ||
5 | struct nft_meta { | |
6 | enum nft_meta_keys key:8; | |
7 | union { | |
8 | enum nft_registers dreg:8; | |
9 | enum nft_registers sreg:8; | |
10 | }; | |
11 | }; | |
12 | ||
13 | extern const struct nla_policy nft_meta_policy[]; | |
14 | ||
15 | int nft_meta_get_init(const struct nft_ctx *ctx, | |
16 | const struct nft_expr *expr, | |
17 | const struct nlattr * const tb[]); | |
18 | ||
19 | int nft_meta_set_init(const struct nft_ctx *ctx, | |
20 | const struct nft_expr *expr, | |
21 | const struct nlattr * const tb[]); | |
22 | ||
23 | int nft_meta_get_dump(struct sk_buff *skb, | |
24 | const struct nft_expr *expr); | |
25 | ||
26 | int nft_meta_set_dump(struct sk_buff *skb, | |
27 | const struct nft_expr *expr); | |
28 | ||
29 | void nft_meta_get_eval(const struct nft_expr *expr, | |
a55e22e9 | 30 | struct nft_regs *regs, |
aa45660c TB |
31 | const struct nft_pktinfo *pkt); |
32 | ||
33 | void nft_meta_set_eval(const struct nft_expr *expr, | |
a55e22e9 | 34 | struct nft_regs *regs, |
aa45660c TB |
35 | const struct nft_pktinfo *pkt); |
36 | ||
e639f7ab FW |
37 | void nft_meta_set_destroy(const struct nft_ctx *ctx, |
38 | const struct nft_expr *expr); | |
39 | ||
960fa72f LZ |
40 | int nft_meta_set_validate(const struct nft_ctx *ctx, |
41 | const struct nft_expr *expr, | |
42 | const struct nft_data **data); | |
43 | ||
aa45660c | 44 | #endif |