diff options
author | Phil Sutter <phil@nwl.cc> | 2021-11-05 22:02:45 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-11-23 15:01:23 +0100 |
commit | 1d73cec02c8d9a0f5bfbd2983c36cc1228b78f45 (patch) | |
tree | 77b13589ecdbbb63ab19adcbcac38e86a04c7f98 /iptables/xshared.h | |
parent | e5fb9f8efaa0643a566d079c8201082822a0dc81 (diff) |
xshared: Share print_rule_details() with legacy
Have to pass pointer to counters directly since different fields are
being used for some reason.
Since proto_to_name() is not used outside of xshared.c anymore, make it
static.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.h')
-rw-r--r-- | iptables/xshared.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/iptables/xshared.h b/iptables/xshared.h index 46ad5a29..9f0fa143 100644 --- a/iptables/xshared.h +++ b/iptables/xshared.h @@ -164,7 +164,6 @@ enum { extern void print_extension_helps(const struct xtables_target *, const struct xtables_rule_match *); -extern const char *proto_to_name(uint16_t, int); extern int command_default(struct iptables_command_state *, struct xtables_globals *, bool invert); extern struct xtables_match *load_proto(struct iptables_command_state *); @@ -246,6 +245,9 @@ void parse_chain(const char *chainname); void generic_opt_check(int command, int options); char opt2char(int option); +void print_rule_details(unsigned int linenum, const struct xt_counters *ctrs, + const char *targname, uint8_t proto, uint8_t flags, + uint8_t invflags, unsigned int format); void save_rule_details(const char *iniface, unsigned const char *iniface_mask, const char *outiface, unsigned const char *outiface_mask, uint16_t proto, int frag, uint8_t invflags); |