summaryrefslogtreecommitdiffstats
path: root/examples/nft-set-elem-get.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-10-09 00:03:28 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-15 14:04:27 +0200
commit80077787f8f21da1efd8dc27a4c5767ab47a1df6 (patch)
tree01d9b399a1aad23d7ea1d1e1daa0ad98bec69e0a /examples/nft-set-elem-get.c
parentaaf20ad0dc22d2ebcad1b2c43288e984f0efe2c3 (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-set-elem-get.c')
-rw-r--r--examples/nft-set-elem-get.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/nft-set-elem-get.c b/examples/nft-set-elem-get.c
index 9a3ccd7..1bc9abc 100644
--- a/examples/nft-set-elem-get.c
+++ b/examples/nft-set-elem-get.c
@@ -57,8 +57,7 @@ int main(int argc, char *argv[])
int ret;
if (argc < 4 || argc > 5) {
- fprintf(stderr, "%s <family> <table> <set> [<json>]\n",
- argv[0]);
+ fprintf(stderr, "%s <family> <table> <set>\n", argv[0]);
return EXIT_FAILURE;
}
t = nftnl_set_alloc();
@@ -80,9 +79,6 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- if (argc == 5 && strcmp(argv[4], "json") == 0 )
- type = NFTNL_OUTPUT_JSON;
-
nlh = nftnl_set_nlmsg_build_hdr(buf, NFT_MSG_GETSETELEM, family,
NLM_F_DUMP|NLM_F_ACK, seq);
nftnl_set_set(t, NFTNL_SET_NAME, argv[3]);