.option_name = ip46t_option_name,
.option_invert = ip46t_option_invert,
.command_default = command_default,
+ .print_help = xtables_printhelp,
};
struct xt_cmd_parse p = {
.table = *table,
.option_name = ip46t_option_name,
.option_invert = ip46t_option_invert,
.command_default = command_default,
+ .print_help = xtables_printhelp,
};
struct xt_cmd_parse p = {
.table = *table,
.option_name = nft_arp_option_name,
.option_invert = nft_arp_option_invert,
.command_default = command_default,
+ .print_help = xtables_printhelp,
},
.rule_to_cs = nft_rule_to_iptables_command_state,
.init_cs = nft_arp_init_cs,
.option_name = ip46t_option_name,
.option_invert = ip46t_option_invert,
.command_default = command_default,
+ .print_help = xtables_printhelp,
},
.rule_to_cs = nft_rule_to_iptables_command_state,
.clear_cs = xtables_clear_iptables_command_state,
.option_name = ip46t_option_name,
.option_invert = ip46t_option_invert,
.command_default = command_default,
+ .print_help = xtables_printhelp,
},
.rule_to_cs = nft_rule_to_iptables_command_state,
.clear_cs = xtables_clear_iptables_command_state,
return 0;
}
-static void
-xtables_printhelp(const struct xtables_rule_match *matches)
+void xtables_printhelp(struct iptables_command_state *cs)
{
+ const struct xtables_rule_match *matches = cs->matches;
const char *prog_name = xt_params->program_name;
const char *prog_vers = xt_params->program_version;
xtables_find_match(cs->protocol,
XTF_TRY_LOAD, &cs->matches);
- xtables_printhelp(cs->matches);
+ p->ops->print_help(cs);
xtables_clear_iptables_command_state(cs);
xtables_free_opts(1);
xtables_fini();
int (*option_invert)(int option);
int (*command_default)(struct iptables_command_state *cs,
struct xtables_globals *gl, bool invert);
+ void (*print_help)(struct iptables_command_state *cs);
};
struct xt_cmd_parse {
struct xt_cmd_parse_ops *ops;
};
+void xtables_printhelp(struct iptables_command_state *cs);
const char *ip46t_option_name(int option);
int ip46t_option_invert(int option);
int command_default(struct iptables_command_state *cs,