From 3b8a6a6fa870c5ed4a2c533fcec9524bc98e5709 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 5 May 2022 18:13:12 +0200 Subject: xshared: Extend xtables_printhelp() for arptables The function checks afinfo->family already to cover ip6tables specifics, doing the same for arptables does not make things much worse. This changes arptables-nft help output slightly: * List possible negations extrapositioned, which is preferred anyway (arptables-nft supports both) * List --out-interface option at lexically sorted position * Print --wait option, it's ignored just like with iptables * Restore default target option printing as with legacy arptables (not sure if arptables-nft ever did this) by explicitly loading them. While being at it, add --set-counters short option '-c' to help output for ip(6)tables. This effectively removes the need for (and all users of) xtables_global's 'print_help' callback, thus effectively reverts commit fe83b12fc910e ("libxtables: Introduce xtables_globals print_help callback") which broke libxtables' ABI compatibility. Signed-off-by: Phil Sutter --- include/xtables.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/xtables.h') diff --git a/include/xtables.h b/include/xtables.h index 84369dac..a93e8f6e 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -425,7 +425,6 @@ 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