path: root/include
diff options
authorPatrick McHardy <>2009-03-31 04:14:26 +0200
committerPatrick McHardy <>2009-03-31 04:14:26 +0200
commit53fc2c7a799877c5859298bd16b578711af9cca2 (patch)
tree6fdfd8a4650fcc3a7164a93f9d05003511595005 /include
parent9fe2e9d494a229a3f833add44d7242abe46aa156 (diff)
netlink: move data related functions to netlink.c
Move the data related function to netlink.c as they're going to be needed outside of rule context for set maintenance. Signed-off-by: Patrick McHardy <>
Diffstat (limited to 'include')
1 files changed, 11 insertions, 0 deletions
diff --git a/include/netlink.h b/include/netlink.h
index cec5247b..ec9a6142 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -30,6 +30,17 @@ extern struct nfnl_nft_rule *alloc_nft_rule(const struct handle *h);
extern struct nfnl_nft_expr *alloc_nft_expr(int (*init)(struct nfnl_nft_expr *));
extern struct nfnl_nft_data *alloc_nft_data(const void *data, unsigned int len);
+extern struct nfnl_nft_data *netlink_gen_data(const struct expr *expr);
+extern struct nfnl_nft_data *netlink_gen_raw_data(const mpz_t value,
+ enum byteorder byteorder,
+ unsigned int len);
+extern struct expr *netlink_alloc_value(const struct location *loc,
+ const struct nfnl_nft_data *nld);
+extern struct expr *netlink_alloc_data(const struct location *loc,
+ const struct nfnl_nft_data *nld,
+ enum nft_registers dreg);
extern int netlink_linearize_rule(struct netlink_ctx *ctx,
struct nfnl_nft_rule *nlr,
const struct rule *rule);