summaryrefslogtreecommitdiffstats
path: root/include/xml.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-02-13 18:01:02 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-02-17 19:25:11 +0100
commit26c945057d742fc4b0f4dfdc07849074cb9264c1 (patch)
tree20facafe81106096f8ee1ca954fe0e59b8e8c664 /include/xml.h
parent007e93ea118436eb40a2e39d6ae185c14b74ecf1 (diff)
src: split internal.h is smaller files
The internal.h file started being a small file with private definitions. Its size has been increasing over time more and more, so let's split this in small header files that map to the corresponding class where the functions belong to. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/xml.h')
-rw-r--r--include/xml.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/xml.h b/include/xml.h
new file mode 100644
index 0000000..5137034
--- /dev/null
+++ b/include/xml.h
@@ -0,0 +1,58 @@
+#ifndef LIBNFTNL_XML_INTERNAL_H
+#define LIBNFTNL_XML_INTERNAL_H
+
+#ifdef XML_PARSING
+#include <mxml.h>
+#include "common.h"
+
+#define NFT_XML_MAND 0
+#define NFT_XML_OPT (1 << 0)
+
+struct nft_table;
+struct nft_chain;
+struct nft_rule;
+struct nft_set;
+struct nft_set_elem;
+struct nft_set_list;
+union nft_data_reg;
+
+mxml_node_t *nft_mxml_build_tree(const void *data, const char *treename,
+ struct nft_parse_err *err, enum nft_parse_input input);
+struct nft_rule_expr *nft_mxml_expr_parse(mxml_node_t *node,
+ struct nft_parse_err *err,
+ struct nft_set_list *set_list);
+int nft_mxml_reg_parse(mxml_node_t *tree, const char *reg_name, uint32_t *reg,
+ uint32_t mxmlflags, uint32_t flags,
+ struct nft_parse_err *err);
+int nft_mxml_data_reg_parse(mxml_node_t *tree, const char *node_name,
+ union nft_data_reg *data_reg, uint16_t flags,
+ struct nft_parse_err *err);
+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, uint16_t flags,
+ struct nft_parse_err *err);
+const char *nft_mxml_str_parse(mxml_node_t *tree, const char *node_name,
+ uint32_t mxml_flags, uint16_t flags,
+ struct nft_parse_err *err);
+int nft_mxml_family_parse(mxml_node_t *tree, const char *node_name,
+ uint32_t mxml_flags, uint16_t flags,
+ struct nft_parse_err *err);
+int nft_mxml_set_elem_parse(mxml_node_t *node, struct nft_set_elem *e,
+ struct nft_parse_err *err);
+int nft_mxml_table_parse(mxml_node_t *tree, struct nft_table *t,
+ struct nft_parse_err *err);
+int nft_mxml_chain_parse(mxml_node_t *tree, struct nft_chain *c,
+ struct nft_parse_err *err);
+int nft_mxml_rule_parse(mxml_node_t *tree, struct nft_rule *r,
+ struct nft_parse_err *err,
+ struct nft_set_list *set_list);
+int nft_mxml_set_parse(mxml_node_t *tree, struct nft_set *s,
+ struct nft_parse_err *err);
+
+int nft_data_reg_xml_parse(union nft_data_reg *reg, mxml_node_t *tree,
+ struct nft_parse_err *err);
+#else
+#define mxml_node_t void
+#endif
+
+#endif /* LIBNFTNL_XML_INTERNAL_H */