diff options
author | Alvaro Neira Ayuso <alvaroneay@gmail.com> | 2013-06-06 23:14:23 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-06-07 13:54:49 +0200 |
commit | 0be2e081db4b6adf2e7fb16fe528c28c35a1f0c2 (patch) | |
tree | c3aa9d3a791bdded3d24c8ab3c4924d26424c7dc /examples/nft-table-get.c | |
parent | 2f1e7122841d00b3c0134ab9ee19e6ce02a9bd5c (diff) |
examples: nft-table-get: export in JSON format
Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples/nft-table-get.c')
-rw-r--r-- | examples/nft-table-get.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/nft-table-get.c b/examples/nft-table-get.c index b113636..0d7746c 100644 --- a/examples/nft-table-get.c +++ b/examples/nft-table-get.c @@ -59,6 +59,10 @@ int main(int argc, char *argv[]) type = NFT_TABLE_O_XML; argv[argc-1] = NULL; argc--; + }else if (strcmp(argv[argc-1], "json") == 0) { + type = NFT_TABLE_O_JSON; + argv[argc-1] = NULL; + argc--; } else if (strcmp(argv[argc - 1], "default") == 0) { argc--; } |