From fe83b12fc910e43e4f22a25b56210b0dd0afc3ee Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 27 Sep 2021 16:59:49 +0200 Subject: libxtables: Introduce xtables_globals print_help callback With optstring being stored in struct xtables_globals as well, it is a natural choice to store a pointer to a help printer also which matches the supported options. Signed-off-by: Phil Sutter --- include/xtables.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/xtables.h') diff --git a/include/xtables.h b/include/xtables.h index c872a042..ca674c26 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -425,6 +425,7 @@ struct xtables_globals struct option *opts; void (*exit_err)(enum xtables_exittype status, const char *msg, ...) __attribute__((noreturn, format(printf,2,3))); int (*compat_rev)(const char *name, uint8_t rev, int opt); + void (*print_help)(const struct xtables_rule_match *m); }; #define XT_GETOPT_TABLEEND {.name = NULL, .has_arg = false} -- cgit v1.2.3