diff options
Diffstat (limited to 'examples/nft-set-elem-get.c')
-rw-r--r-- | examples/nft-set-elem-get.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/nft-set-elem-get.c b/examples/nft-set-elem-get.c index 353a752..591dd45 100644 --- a/examples/nft-set-elem-get.c +++ b/examples/nft-set-elem-get.c @@ -56,7 +56,8 @@ int main(int argc, char *argv[]) int ret; if (argc < 4 || argc > 5) { - fprintf(stderr, "%s <family> <table> <set> [default|json]\n", argv[0]); + fprintf(stderr, "%s <family> <table> <set> [<json|xml>]\n", + argv[0]); return EXIT_FAILURE; } t = nft_set_alloc(); @@ -78,6 +79,8 @@ int main(int argc, char *argv[]) if (argc == 5 && strcmp(argv[4], "json") == 0 ) type = NFT_SET_O_JSON; + else if (argc == 5 && strcmp(argv[4], "xml") == 0) + type = NFT_SET_O_XML; nlh = nft_set_nlmsg_build_hdr(buf, NFT_MSG_GETSETELEM, family, NLM_F_DUMP|NLM_F_ACK, seq); |