From 5ea54b224a11358b6ae90b519979e09a655292e7 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sun, 12 Apr 2015 20:17:52 +0100 Subject: expr: seperate expression parsing and building functions The expression build function currently assumes to be only used from rule context and actually builds rule attributes. Fix that and only build the expression. Also it seems to have been exported by accident, undo that. Additionally, move the expression parsing function from rule parsing and also remove any assumptions about being used in rule context. Signed-off-by: Patrick McHardy --- include/expr.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/expr.h') diff --git a/include/expr.h b/include/expr.h index ed41105..a4333c6 100644 --- a/include/expr.h +++ b/include/expr.h @@ -10,4 +10,10 @@ struct nft_rule_expr { uint8_t data[]; }; +struct nlmsghdr; + +void nft_rule_expr_build_payload(struct nlmsghdr *nlh, struct nft_rule_expr *expr); +struct nft_rule_expr *nft_rule_expr_parse(struct nlattr *attr); + + #endif -- cgit v1.2.3