From: Alvaro Neira <alvaroneay@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [libnftables PATCH 2/2] Add code for testing the new functions for exporting rules to JSON Format
Date: Thu, 13 Jun 2013 20:50:30 +0200 [thread overview]
Message-ID: <20130613185030.423.58859.stgit@Ph0enix> (raw)
In-Reply-To: <20130613184810.423.11555.stgit@Ph0enix>
From: Álvaro Neira Ayuso <alvaroneay@gmail.com>
Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
examples/nft-rule-get.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/examples/nft-rule-get.c b/examples/nft-rule-get.c
index 5bf41f5..2404f27 100644
--- a/examples/nft-rule-get.c
+++ b/examples/nft-rule-get.c
@@ -54,8 +54,11 @@ int main(int argc, char *argv[])
struct nft_rule *t = NULL;
int ret;
- if (argc == 2 && strcmp(argv[1], "xml") == 0 )
+ if (argc == 2 && strcmp(argv[1], "xml") == 0 ){
type = NFT_RULE_O_XML;
+ }else if (argc == 2 && strcmp(argv[1], "json") == 0 ){
+ type = NFT_RULE_O_JSON;
+ }
/* XXX requires table, chain and handle attributes for selective get */
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-06-13 18:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 18:50 [libnftables PATCH 0/2] Series to add JSON output support for rules Alvaro Neira
2013-06-13 18:50 ` [libnftables PATCH 1/2] Add function for exporting rule to JSON format Alvaro Neira
2013-06-13 18:50 ` Alvaro Neira [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-06-27 19:56 [libnftables PATCH 0/2] Series to add JSON output support for rules Alvaro Neira
2013-06-27 19:56 ` [libnftables PATCH 2/2] Add code for testing the new functions for exporting rules to JSON Format Alvaro Neira
2013-06-29 10:02 ` 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=20130613185030.423.58859.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.