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