netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 nft RFC] expression: default to print binary operations using nominal representation
@ 2014-01-15 11:09 Pablo Neira Ayuso
  2014-01-15 11:09 ` [PATCH 2/2] expression: fix printing of binary operation Pablo Neira Ayuso
  2014-01-15 11:18 ` [PATCH 1/2 nft RFC] expression: default to print binary operations using nominal representation Patrick McHardy
  0 siblings, 2 replies; 12+ messages in thread
From: Pablo Neira Ayuso @ 2014-01-15 11:09 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kaber

Since b59e65c ("scanner: add aliases to symbols for easier
interaction with most shells") we have nominal aliases, default to
these for the output representation.

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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-01-15 12:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/2 nft RFC] expression: default to print binary operations using nominal representation Patrick McHardy
2014-01-15 11:32   ` Arturo Borrero Gonzalez
2014-01-15 11:36     ` Patrick McHardy

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