summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-11-15 16:58:15 +0100
committerPhil Sutter <phil@nwl.cc>2023-12-05 16:35:37 +0100
commite224f0b10ef01e3e2081054e7fa4f64601726646 (patch)
tree044422b2440e7f667df3e4d57807ccc670384507 /iptables/xshared.h
parentea7fef2a6f0457c44929bc8d1871257c15ed78ce (diff)
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 <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.h')
-rw-r--r--iptables/xshared.h4
1 files changed, 4 insertions, 0 deletions
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,