summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/nft-chain-get.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/nft-chain-get.c b/examples/nft-chain-get.c
index b815523..459b79e 100644
--- a/examples/nft-chain-get.c
+++ b/examples/nft-chain-get.c
@@ -90,8 +90,11 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- if (strcmp(argv[argc-1], "xml") == 0)
+ if (strcmp(argv[argc-1], "xml") == 0){
type = NFT_CHAIN_O_XML;
+ }else if (strcmp(argv[argc-1], "json") == 0){
+ type = NFT_CHAIN_O_JSON;
+ }
nl = mnl_socket_open(NETLINK_NETFILTER);
if (nl == NULL) {