include: xtables: Add enum for better nft translation code
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.
Signed-off-by Shivani Bhardwaj <[email protected]>
--- include/xtables.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
include/xtables.h +12 -0
@@ -414,6 +414,18 @@ struct xtables_globalsint (*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
Quoted 32 lines · Shivani Bhardwaj
Add enum
xt_opfor ease to write cleaner and better code for nft translation.Signed-off-by Shivani Bhardwaj <[email protected]>--- include/xtables.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)include/xtables.h +12
-1@@ -414,6 +414,18 @@ struct xtables_globalsint (*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
Quoted 2 lines · Shivani Bhardwaj
Add enum
xt_opfor ease to write cleaner and better code for nft translation.
Applied, thanks Shivani.