Skip to contentSkip to conversation

include: xtables: Add enum for better nft translation code

PATCH Applied Shivani Bhardwaj 2 participants 3 messages Dec 23, 2015 – Dec 25, 2015 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include: xtables: Add enum for better nft translation code

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

---
 include/xtables.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
include/xtables.h +12 -0
index 7d97baa..0355057 100644
@@ -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
Signature · 1 line
1.9.1
#1 lore raw
Quoted 32 lines · Shivani Bhardwaj

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

---
 include/xtables.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
include/xtables.h +12 -1
index 7d97baa..0355057 100644
@@ -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
--
Quoted 2 lines

1.9.1

Please apply this one before all others.
Thanks