netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 1/2 nft RFC] expression: default to print binary operations using nominal representation
Date: Wed, 15 Jan 2014 11:18:04 +0000	[thread overview]
Message-ID: <20140115111803.GA17728@macbook.localnet> (raw)
In-Reply-To: <1389784167-10198-1-git-send-email-pablo@netfilter.org>

On Wed, Jan 15, 2014 at 12:09:26PM +0100, Pablo Neira Ayuso wrote:
> Since b59e65c ("scanner: add aliases to symbols for easier
> interaction with most shells") we have nominal aliases, default to
> these for the output representation.

I was thinking about this before, but didn't mention it since you
hadn't included it in your first patch. I'd prefer to stick to the
IMO more readable existing form. Since we don't support deleting
rules by rule specification, there should be no reason to copy and
paste the output to the command line again.

> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> ---
>  src/expression.c |   20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/expression.c b/src/expression.c
> index 71154cc..6da5c10 100644
> --- a/src/expression.c
> +++ b/src/expression.c
> @@ -351,17 +351,17 @@ const char *expr_op_symbols[] = {
>  	[OP_INVALID]	= "invalid",
>  	[OP_HTON]	= "hton",
>  	[OP_NTOH]	= "ntoh",
> -	[OP_AND]	= "&",
> -	[OP_OR]		= "|",
> -	[OP_XOR]	= "^",
> -	[OP_LSHIFT]	= "<<",
> -	[OP_RSHIFT]	= ">>",
> +	[OP_AND]	= "and",
> +	[OP_OR]		= "or",
> +	[OP_XOR]	= "xor",
> +	[OP_LSHIFT]	= "lshift",
> +	[OP_RSHIFT]	= "rshift",
>  	[OP_EQ]		= NULL,
> -	[OP_NEQ]	= "!=",
> -	[OP_LT]		= "<",
> -	[OP_GT]		= ">",
> -	[OP_LTE]	= "<=",
> -	[OP_GTE]	= ">=",
> +	[OP_NEQ]	= "ne",
> +	[OP_LT]		= "lt",
> +	[OP_GT]		= "gt",
> +	[OP_LTE]	= "le",
> +	[OP_GTE]	= "ge",
>  	[OP_RANGE]	= "within range",
>  	[OP_LOOKUP]	= NULL,
>  };
> -- 
> 1.7.10.4

  parent reply	other threads:[~2014-01-15 11:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 11:09 [PATCH 1/2 nft RFC] expression: default to print binary operations using nominal representation Pablo Neira Ayuso
2014-01-15 11:09 ` [PATCH 2/2] expression: fix printing of binary operation Pablo Neira Ayuso
2014-01-15 11:21   ` Patrick McHardy
2014-01-15 11:25     ` Pablo Neira Ayuso
2014-01-15 11:28       ` Patrick McHardy
2014-01-15 11:27     ` Patrick McHardy
2014-01-15 11:41       ` Pablo Neira Ayuso
2014-01-15 11:49         ` Patrick McHardy
2014-01-15 11:59           ` Pablo Neira Ayuso
2014-01-15 11:18 ` Patrick McHardy [this message]
2014-01-15 11:32   ` [PATCH 1/2 nft RFC] expression: default to print binary operations using nominal representation Arturo Borrero Gonzalez
2014-01-15 11:36     ` Patrick McHardy

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=20140115111803.GA17728@macbook.localnet \
    --to=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).