netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: jalvarez <jalvarez@toulouse.viveris.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH libnftnl] examples: selective rule dumping
Date: Wed, 20 Jul 2016 20:05:23 +0200	[thread overview]
Message-ID: <20160720180523.GA30217@salvia> (raw)
In-Reply-To: <578F7E7A.5080901@toulouse.viveris.com>

On Wed, Jul 20, 2016 at 03:36:58PM +0200, jalvarez wrote:
> Add example (based on nft-get-rule.c) to demonstrate selective rule dumping
> when table and / or chain attributes are set in a rule dump request.
> Used to test the changes made in "[PATCH nf-next] netfilter: nf_tables:
> allow to filter out rules by table and chain"
> (http://marc.info/?t=146237901200004&r=1&w=2).
> 
> Signed-off-by: Josue Alvarez <jalvarez@toulouse.viveris.com>
> --
> diff --git a/examples/Makefile.am b/examples/Makefile.am
> index e002d36..73450c2 100644
> --- a/examples/Makefile.am
> +++ b/examples/Makefile.am
> @@ -13,6 +13,7 @@ check_PROGRAMS = nft-table-add        \
>           nft-rule-parse-add    \
>           nft-rule-del        \
>           nft-rule-get        \
> +         nft-rule-selective-get    \

Would you rework this to integrate these changes into nft-rule-get?
I'd suggest you make the invocation look like this below.

        Usage: nft-rule-get <family> [<table> <chain>] [<xml|json>]

So table and chain must be specified at the same time to keep it
simple, it is less flexible than what we actually support but I think
this is fine for an example.

Thanks.

  reply	other threads:[~2016-07-20 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 13:36 [PATCH libnftnl] examples: selective rule dumping jalvarez
2016-07-20 18:05 ` Pablo Neira Ayuso [this message]
2016-07-21  8:03   ` jalvarez
2016-07-21 13:36     ` Pablo Neira Ayuso
2016-07-21 14:59       ` Josue Alvarez
2016-07-21 16:13         ` Pablo Neira Ayuso
2016-07-22  7:35           ` jalvarez
2016-07-22  9:00             ` 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=20160720180523.GA30217@salvia \
    --to=pablo@netfilter.org \
    --cc=jalvarez@toulouse.viveris.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).