summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2016-09-22 16:58:13 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-09-23 10:04:16 +0200
commit0758d102627744847d0bd2e4744d27695edb9a14 (patch)
treed8e004ddfba5ba10f63bd857dbf82f1834cdcf3d /include
parentf3bd67823b16fb7ef1ca4e4d93535f77eb0c2b53 (diff)
src: remove libmxml support
This patch removes the libmxml integration in libnftnl, since we have JSON in place and there is no need to support two at the same time. The JSON support is much better, for example libjansson has a better parsing error reporting. Moreover, libmxml 2.10 breaks the integration with libnftnl somehow, as reported in Debian bug #83870 [0]. Also, the XML support inside libnftnl has never been in good shape, with several tiny inconsitencies. [0] https://bugs.debian.org/838370 Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am1
-rw-r--r--include/expr_ops.h2
-rw-r--r--include/internal.h1
-rw-r--r--include/xml.h58
4 files changed, 0 insertions, 62 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 9f55737..a049e2e 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -7,7 +7,6 @@ noinst_HEADERS = internal.h \
expr_ops.h \
linux_list.h \
set.h \
- xml.h \
common.h \
expr.h \
json.h \
diff --git a/include/expr_ops.h b/include/expr_ops.h
index a334732..e639390 100644
--- a/include/expr_ops.h
+++ b/include/expr_ops.h
@@ -19,8 +19,6 @@ struct expr_ops {
int (*parse)(struct nftnl_expr *e, struct nlattr *attr);
void (*build)(struct nlmsghdr *nlh, const struct nftnl_expr *e);
int (*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_expr *e);
- int (*xml_parse)(struct nftnl_expr *e, mxml_node_t *tree,
- struct nftnl_parse_err *err);
int (*json_parse)(struct nftnl_expr *e, json_t *data,
struct nftnl_parse_err *err);
};
diff --git a/include/internal.h b/include/internal.h
index c74e2bf..7e97c4a 100644
--- a/include/internal.h
+++ b/include/internal.h
@@ -6,7 +6,6 @@
#include "linux_list.h"
#include "utils.h"
#include "common.h"
-#include "xml.h"
#include "json.h"
#include "linux_list.h"
#include "set.h"
diff --git a/include/xml.h b/include/xml.h
deleted file mode 100644
index 7b33a83..0000000
--- a/include/xml.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef LIBNFTNL_XML_INTERNAL_H
-#define LIBNFTNL_XML_INTERNAL_H
-
-#ifdef XML_PARSING
-#include <mxml.h>
-#include "common.h"
-
-#define NFTNL_XML_MAND 0
-#define NFTNL_XML_OPT (1 << 0)
-
-struct nftnl_table;
-struct nftnl_chain;
-struct nftnl_rule;
-struct nftnl_set;
-struct nftnl_set_elem;
-struct nftnl_set_list;
-union nftnl_data_reg;
-
-mxml_node_t *nftnl_mxml_build_tree(const void *data, const char *treename,
- struct nftnl_parse_err *err, enum nftnl_parse_input input);
-struct nftnl_expr *nftnl_mxml_expr_parse(mxml_node_t *node,
- struct nftnl_parse_err *err,
- struct nftnl_set_list *set_list);
-int nftnl_mxml_reg_parse(mxml_node_t *tree, const char *reg_name, uint32_t *reg,
- uint32_t mxmlflags, uint32_t flags,
- struct nftnl_parse_err *err);
-int nftnl_mxml_data_reg_parse(mxml_node_t *tree, const char *node_name,
- union nftnl_data_reg *data_reg, uint16_t flags,
- struct nftnl_parse_err *err);
-int nftnl_mxml_num_parse(mxml_node_t *tree, const char *node_name,
- uint32_t mxml_flags, int base, void *number,
- enum nftnl_type type, uint16_t flags,
- struct nftnl_parse_err *err);
-const char *nftnl_mxml_str_parse(mxml_node_t *tree, const char *node_name,
- uint32_t mxml_flags, uint16_t flags,
- struct nftnl_parse_err *err);
-int nftnl_mxml_family_parse(mxml_node_t *tree, const char *node_name,
- uint32_t mxml_flags, uint16_t flags,
- struct nftnl_parse_err *err);
-int nftnl_mxml_set_elem_parse(mxml_node_t *node, struct nftnl_set_elem *e,
- struct nftnl_parse_err *err);
-int nftnl_mxml_table_parse(mxml_node_t *tree, struct nftnl_table *t,
- struct nftnl_parse_err *err);
-int nftnl_mxml_chain_parse(mxml_node_t *tree, struct nftnl_chain *c,
- struct nftnl_parse_err *err);
-int nftnl_mxml_rule_parse(mxml_node_t *tree, struct nftnl_rule *r,
- struct nftnl_parse_err *err,
- struct nftnl_set_list *set_list);
-int nftnl_mxml_set_parse(mxml_node_t *tree, struct nftnl_set *s,
- struct nftnl_parse_err *err);
-
-int nftnl_data_reg_xml_parse(union nftnl_data_reg *reg, mxml_node_t *tree,
- struct nftnl_parse_err *err);
-#else
-#define mxml_node_t void
-#endif
-
-#endif /* LIBNFTNL_XML_INTERNAL_H */