]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/net/netfilter/nft_meta.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.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 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,
30 struct nft_regs *regs,
31 const struct nft_pktinfo *pkt);
32
33 void nft_meta_set_eval(const struct nft_expr *expr,
34 struct nft_regs *regs,
35 const struct nft_pktinfo *pkt);
36
37 void nft_meta_set_destroy(const struct nft_ctx *ctx,
38 const struct nft_expr *expr);
39
40 int nft_meta_set_validate(const struct nft_ctx *ctx,
41 const struct nft_expr *expr,
42 const struct nft_data **data);
43
44 #endif