netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alvaro Neira Ayuso <alvaroneay@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [libnftnl PATCH 3/3] example: removed printf rule function
Date: Sat, 08 Mar 2014 15:00:51 +0100	[thread overview]
Message-ID: <20140308140051.13220.84585.stgit@Ph0enix> (raw)
In-Reply-To: <20140308140039.13220.89013.stgit@Ph0enix>

From: Álvaro Neira Ayuso <alvaroneay@gmail.com>

Removed this code because with that we have a strange
output. Example:

we have a rule with handle 4 and we execute
nft-rule-del ip filter input 4

Output: unknown filter input 4 0

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 examples/nft-rule-del.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/examples/nft-rule-del.c b/examples/nft-rule-del.c
index 06a28c7..8d875b3 100644
--- a/examples/nft-rule-del.c
+++ b/examples/nft-rule-del.c
@@ -81,10 +81,6 @@ int main(int argc, char *argv[])
 	if (argc == 5)
 		nft_rule_attr_set_u64(r, NFT_RULE_ATTR_HANDLE, atoi(argv[4]));
 
-	char tmp[1024];
-	nft_rule_snprintf(tmp, sizeof(tmp), r, 0, 0);
-	printf("%s\n", tmp);
-
 	batch = mnl_nlmsg_batch_start(buf, sizeof(buf));
 
 	nft_mnl_batch_put(mnl_nlmsg_batch_current(batch),

--
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

  parent reply	other threads:[~2014-03-08 14:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-08 14:00 [libnftnl PATCH 1/3] example: fix the example for deleting rules Alvaro Neira Ayuso
2014-03-08 14:00 ` [libnftnl PATCH 2/3] example/nft-rule-insert: fixed and merged this example with nft-rule-add Alvaro Neira Ayuso
2014-03-08 14:16   ` Pablo Neira Ayuso
2014-03-08 14:00 ` Alvaro Neira Ayuso [this message]
2014-03-08 14:17 ` [libnftnl PATCH 1/3] example: fix the example for deleting rules 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=20140308140051.13220.84585.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).