summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2015-04-11 02:27:36 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-04-13 17:17:28 +0200
commitb1c96ed37ceeef5573402d4af202897edaf1e4b8 (patch)
tree8c3664e72dad22a859712a91a49d332cbd28801c /include/net
parent8cd8937ac0d68435b4ca9bd3c987c3cfea269b4f (diff)
downloadop-kernel-dev-b1c96ed37ceeef5573402d4af202897edaf1e4b8.zip
op-kernel-dev-b1c96ed37ceeef5573402d4af202897edaf1e4b8.tar.gz
netfilter: nf_tables: add register parsing/dumping helpers
Add helper functions to parse and dump register values in netlink attributes. These helpers will later be changed to take care of translation between the old 128 bit and the new 32 bit register numbers. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nf_tables.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index efcf46d..f8f27a4 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -128,6 +128,9 @@ static inline enum nft_registers nft_type_to_reg(enum nft_data_types type)
return type == NFT_DATA_VERDICT ? NFT_REG_VERDICT : NFT_REG_1;
}
+unsigned int nft_parse_register(const struct nlattr *attr);
+int nft_dump_register(struct sk_buff *skb, unsigned int attr, unsigned int reg);
+
int nft_validate_register_load(enum nft_registers reg, unsigned int len);
int nft_validate_register_store(const struct nft_ctx *ctx,
enum nft_registers reg,
OpenPOWER on IntegriCloud