diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-09 00:03:28 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-15 14:04:27 +0200 |
commit | 80077787f8f21da1efd8dc27a4c5767ab47a1df6 (patch) | |
tree | 01d9b399a1aad23d7ea1d1e1daa0ad98bec69e0a /examples/nft-ct-helper-get.c | |
parent | aaf20ad0dc22d2ebcad1b2c43288e984f0efe2c3 (diff) |
src: remove json support
We have better json support in libnftables these days.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples/nft-ct-helper-get.c')
-rw-r--r-- | examples/nft-ct-helper-get.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/examples/nft-ct-helper-get.c b/examples/nft-ct-helper-get.c index 94bd0cd..eb03133 100644 --- a/examples/nft-ct-helper-get.c +++ b/examples/nft-ct-helper-get.c @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) uint32_t type = NFTNL_OUTPUT_DEFAULT; if (argc < 3 || argc > 5) { - fprintf(stderr, "%s <family> <table> [<obj>] [<default|xml|json>]\n", + fprintf(stderr, "%s <family> <table> [<obj>]\n", argv[0]); return EXIT_FAILURE; } @@ -76,18 +76,6 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - if (strcmp(argv[argc-1], "xml") == 0) { - type = NFTNL_OUTPUT_XML; - argv[argc-1] = NULL; - argc--; - }else if (strcmp(argv[argc-1], "json") == 0) { - type = NFTNL_OUTPUT_JSON; - argv[argc-1] = NULL; - argc--; - } else if (strcmp(argv[argc - 1], "default") == 0) { - argc--; - } - if (argc == 3 || argc == 4) { t = nftnl_obj_alloc(); if (t == NULL) { |