From 53fc2c7a799877c5859298bd16b578711af9cca2 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 31 Mar 2009 04:14:26 +0200 Subject: 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 --- include/netlink.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/netlink.h') 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); -- cgit v1.2.3