summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-11-05 18:02:13 +0100
committerPhil Sutter <phil@nwl.cc>2021-11-23 15:01:23 +0100
commit766e4872e10bccc12fa37dcf5380d3c99fcf1d75 (patch)
tree75592710c2f9acb76903a187dbeebb6d3ce56797 /iptables/xshared.h
parentb5881e7f22d42a8b00acbdbab296b71572ddb903 (diff)
xshared: Share print_iface() function
Merge the three identical copies into one and name it 'save_iface' (as the printed syntax is for "save"-format). Leave arptables alone for now, its rather complicated whitespace printing doesn't allow for use of the shared function. Also keep ebtables' custom implementation, it is used for the --logical-in/--logical-out long-options, too. Apart from that, ebtables-nft does not use a mask, at all. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.h')
-rw-r--r--iptables/xshared.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/iptables/xshared.h b/iptables/xshared.h
index 6d6acbca..3281ce58 100644
--- a/iptables/xshared.h
+++ b/iptables/xshared.h
@@ -226,6 +226,8 @@ void print_ipv6_addresses(const struct ip6t_entry *fw6, unsigned int format);
void print_ifaces(const char *iniface, const char *outiface, uint8_t invflags,
unsigned int format);
+void save_iface(char letter, const char *iface,
+ const unsigned char *mask, int invert);
void command_match(struct iptables_command_state *cs, bool invert);
const char *xt_parse_target(const char *targetname);