diff options
author | Phil Sutter <phil@nwl.cc> | 2023-11-14 20:18:12 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-11-29 02:33:02 +0100 |
commit | 90f84108cf61891f6bc60d2f93cb25e05a47a661 (patch) | |
tree | 054db6afb719630aaa1185e909d9d07b94f8fc48 /iptables/xshared.h | |
parent | 20e95a4ec5cec14d9e03ba562fa65f015d49dc14 (diff) |
xshared: Introduce xt_cmd_parse_ops::option_invert
Replace the awkward inverse_for_options array with basically a few
switch() statements clearly identifying the relation between option and
inverse values and relieve callers from having to find the option flag
bit's position.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.h')
-rw-r--r-- | iptables/xshared.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/iptables/xshared.h b/iptables/xshared.h index 2470acbb..28efd73c 100644 --- a/iptables/xshared.h +++ b/iptables/xshared.h @@ -274,6 +274,7 @@ struct xt_cmd_parse_ops { struct iptables_command_state *cs, struct xtables_args *args); const char *(*option_name)(int option); + int (*option_invert)(int option); }; struct xt_cmd_parse { @@ -290,6 +291,7 @@ struct xt_cmd_parse { }; const char *ip46t_option_name(int option); +int ip46t_option_invert(int option); void do_parse(int argc, char *argv[], struct xt_cmd_parse *p, struct iptables_command_state *cs, |