diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-07-04 14:50:22 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-07-04 16:47:38 +0200 |
commit | d844fa06e43bc80487acfe5647cef4d4994c95fd (patch) | |
tree | 2dd70dc1b8889da6f566e467eeebdd13feafeabb /src/expr_ops.h | |
parent | 0dbe80fee352545f51bdc4fd71621223e8b62306 (diff) |
src: consolidate XML parsing of expressions via nft_mxml_expr_parse
Move common code for XML parsing of expressions to the new
nft_mxml_expr_parse function.
This patch reduces the XML parsing code in 300 LOC.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr_ops.h')
-rw-r--r-- | src/expr_ops.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expr_ops.h b/src/expr_ops.h index 282225d..8dc4a09 100644 --- a/src/expr_ops.h +++ b/src/expr_ops.h @@ -1,6 +1,7 @@ #ifndef _EXPR_OPS_H_ #define _EXPR_OPS_H_ +#include "internal.h" #include <stdlib.h> #include <stdint.h> @@ -17,7 +18,7 @@ struct expr_ops { int (*parse)(struct nft_rule_expr *e, struct nlattr *attr); void (*build)(struct nlmsghdr *nlh, struct nft_rule_expr *e); int (*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, struct nft_rule_expr *e); - int (*xml_parse)(struct nft_rule_expr *e, char *xml); + int (*xml_parse)(struct nft_rule_expr *e, mxml_node_t *tree); }; struct expr_ops *nft_expr_ops_lookup(const char *name); |