summaryrefslogtreecommitdiffstats
path: root/iptables/nft-shared.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-11-06 01:09:37 +0100
committerPhil Sutter <phil@nwl.cc>2021-11-23 15:01:23 +0100
commitcf14b92bc1a3f5040437234dffe5cf6aa59711a5 (patch)
tree89264bb0c612af799b7759a4b17fc671718ffbb2 /iptables/nft-shared.c
parent24f30842d979da464c1c3ef106d2efa66a480735 (diff)
nft-shared: Drop unused function print_proto()
The last users vanished back in 2013. There is identical code in save_rule_details(), but with only a single user there's not much point in keeping the function. Fixes: cdc78b1d6bd7b ("nft: convert rule into a command state structure") Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r--iptables/nft-shared.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c
index a6a79c8c..b281ba29 100644
--- a/iptables/nft-shared.c
+++ b/iptables/nft-shared.c
@@ -373,21 +373,6 @@ static void nft_parse_match(struct nft_xt_ctx *ctx, struct nftnl_expr *e)
ctx->h->ops->parse_match(match, ctx->cs);
}
-void print_proto(uint16_t proto, int invert)
-{
- const struct protoent *pent = getprotobynumber(proto);
-
- if (invert)
- printf("! ");
-
- if (pent) {
- printf("-p %s ", pent->p_name);
- return;
- }
-
- printf("-p %u ", proto);
-}
-
void get_cmp_data(struct nftnl_expr *e, void *data, size_t dlen, bool *inv)
{
uint32_t len;