summaryrefslogtreecommitdiffstats
path: root/src/internal.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-08-07 22:31:52 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-08-07 22:39:36 +0200
commitaa78a088dde9875ae3e31468ea5e4ca3bd349d2c (patch)
tree1f06ab113506213e0d036296deef6b73aae3f37d /src/internal.h
parentfc7d496788b8abb3f009b73898508032eced0c6c (diff)
src: xml: cleanup set element parsing
Move nft_mxml_set_elem_parse to set_elem.c to improve readability, thus, we don't need to jump from set_elem.c to mxml.c to see how the parsing is done. I have also refactored some common parsing code in the new helper function nft_mxml_set_elem_parse, that avoids conversions from XML tree to text and then again back to tree. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/internal.h b/src/internal.h
index 1ebdb1a..17d1286 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -37,7 +37,9 @@ int nft_mxml_data_reg_parse(mxml_node_t *tree, const char *node_name, union nft_
int nft_mxml_num_parse(mxml_node_t *tree, const char *node_name, uint32_t mxml_flags, int base, void *number, enum nft_type type);
const char *nft_mxml_str_parse(mxml_node_t *tree, const char *node_name, uint32_t mxml_flags);
int nft_mxml_family_parse(mxml_node_t *tree, const char *node_name, uint32_t mxml_flags);
-struct nft_set_elem *nft_mxml_set_elem_parse(mxml_node_t *node);
+
+struct nft_set_elem;
+int nft_mxml_set_elem_parse(mxml_node_t *node, struct nft_set_elem *e);
#endif
#ifdef JSON_PARSING