From e224f0b10ef01e3e2081054e7fa4f64601726646 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 15 Nov 2023 16:58:15 +0100 Subject: xshared: Turn command_default() into a callback Ebtables' variant is pretty different since all extensions are loaded up front and some targets serve as "watcher" extensions, so let variants specify the function to call for extension parameters. Signed-off-by: Phil Sutter --- iptables/xshared.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'iptables/xshared.h') diff --git a/iptables/xshared.h b/iptables/xshared.h index 3df2153f..bf24fd56 100644 --- a/iptables/xshared.h +++ b/iptables/xshared.h @@ -272,6 +272,8 @@ struct xt_cmd_parse_ops { struct xtables_args *args); const char *(*option_name)(int option); int (*option_invert)(int option); + int (*command_default)(struct iptables_command_state *cs, + struct xtables_globals *gl, bool invert); }; struct xt_cmd_parse { @@ -289,6 +291,8 @@ struct xt_cmd_parse { const char *ip46t_option_name(int option); int ip46t_option_invert(int option); +int command_default(struct iptables_command_state *cs, + struct xtables_globals *gl, bool invert); void do_parse(int argc, char *argv[], struct xt_cmd_parse *p, struct iptables_command_state *cs, -- cgit v1.2.3