netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] include: xtables: Add enum for better nft translation code
@ 2015-12-23 14:21 Shivani Bhardwaj
  2015-12-23 15:23 ` Shivani Bhardwaj
  2015-12-25 12:03 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Shivani Bhardwaj @ 2015-12-23 14:21 UTC (permalink / raw)
  To: netfilter-devel

Add enum xt_op for ease to write cleaner and better code for
nft translation.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
 include/xtables.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/xtables.h b/include/xtables.h
index 7d97baa..0355057 100644
--- a/include/xtables.h
+++ b/include/xtables.h
@@ -414,6 +414,18 @@ struct xtables_globals
 	int (*compat_rev)(const char *name, uint8_t rev, int opt);
 };
 
+/*
+ * enum op-
+ *
+ * For writing clean nftables translations code
+ */
+
+enum xt_op {
+	XT_OP_EQ,
+	XT_OP_NEQ,
+	XT_OP_MAX,
+};
+
 #define XT_GETOPT_TABLEEND {.name = NULL, .has_arg = false}
 
 #ifdef __cplusplus
-- 
1.9.1


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

end of thread, other threads:[~2015-12-25 12:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 14:21 [PATCH] include: xtables: Add enum for better nft translation code Shivani Bhardwaj
2015-12-23 15:23 ` Shivani Bhardwaj
2015-12-25 12:03 ` Pablo Neira Ayuso

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