From: Alvaro Neira <alvaroneay@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [libnftables PATCH 2/2] Implementation for to test the function for exporting chains to JSON format
Date: Sat, 08 Jun 2013 15:36:12 +0200 [thread overview]
Message-ID: <20130608133612.10197.37919.stgit@Ph0enix> (raw)
In-Reply-To: <20130608133222.10197.21456.stgit@Ph0enix>
From: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
examples/nft-chain-get.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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) {
next prev parent reply other threads:[~2013-06-08 13:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-08 13:35 [libnftables PATCH 0/2] Series short description Alvaro Neira
2013-06-08 13:36 ` [libnftables PATCH 1/2] Add function for exporting chain to JSON Format Alvaro Neira
2013-06-08 17:31 ` Pablo Neira Ayuso
2013-06-08 13:36 ` Alvaro Neira [this message]
2013-06-08 17:32 ` [libnftables PATCH 2/2] Implementation for to test the function for exporting chains to JSON format Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130608133612.10197.37919.stgit@Ph0enix \
--to=alvaroneay@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).