summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2024-02-29 17:55:32 +0100
committerPhil Sutter <phil@nwl.cc>2024-02-29 18:07:19 +0100
commitfcaa99ca9e3c18f831fe523a0ad79fb1da34b0ec (patch)
tree0150ec243d5b966ac8b58f6a4aefab45a216f31f /iptables/xshared.h
parentbb1a7a5b297aa271f7f59abbcb891cd94d7fb305 (diff)
xtables-translate: Leverage stored protocol names
Align output of ip(6)tables-translate for --protocol arguments with that of ip(6)tables -L/-S by calling proto_to_name() from xshared.c. The latter will consult xtables_chain_protos list first to make sure (the right) names are used for "common" protocol values and otherwise falls back to getprotobynumber() which it replaces here. Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1738 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 7d4035ec..26c492eb 100644
--- a/iptables/xshared.h
+++ b/iptables/xshared.h
@@ -335,4 +335,6 @@ void iface_to_mask(const char *ifname, unsigned char *mask);
void xtables_clear_args(struct xtables_args *args);
+const char *proto_to_name(uint16_t proto, int nolookup);
+
#endif /* IPTABLES_XSHARED_H */