diff options
author | Arturo Borrero <arturo.borrero.glez@gmail.com> | 2016-09-22 16:58:13 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-09-23 10:04:16 +0200 |
commit | 0758d102627744847d0bd2e4744d27695edb9a14 (patch) | |
tree | d8e004ddfba5ba10f63bd857dbf82f1834cdcf3d /examples/nft-table-parse-add.c | |
parent | f3bd67823b16fb7ef1ca4e4d93535f77eb0c2b53 (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 'examples/nft-table-parse-add.c')
-rw-r--r-- | examples/nft-table-parse-add.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/nft-table-parse-add.c b/examples/nft-table-parse-add.c index 31d31cc..28cb276 100644 --- a/examples/nft-table-parse-add.c +++ b/examples/nft-table-parse-add.c @@ -80,18 +80,15 @@ int main(int argc, char *argv[]) struct mnl_nlmsg_batch *batch; if (argc < 3) { - printf("Usage: %s {xml|json} <file>\n", argv[0]); + printf("Usage: %s {json} <file>\n", argv[0]); exit(EXIT_FAILURE); } - if (strcmp(argv[1], "xml") == 0) { - format = NFTNL_PARSE_XML; - outformat = NFTNL_OUTPUT_XML; - } else if (strcmp(argv[1], "json") == 0) { + if (strcmp(argv[1], "json") == 0) { format = NFTNL_PARSE_JSON; outformat = NFTNL_OUTPUT_JSON; } else { - printf("Unknown format: xml, json\n"); + printf("Unknown format: only json is supported\n"); exit(EXIT_FAILURE); } |