summaryrefslogtreecommitdiffstats
path: root/src/expr/exthdr.c
diff options
context:
space:
mode:
authorZhongqiu Duan <dzq.aishenghu0@gmail.com>2025-03-19 14:20:53 +0000
committerFlorian Westphal <fw@strlen.de>2025-03-19 16:02:28 +0100
commitc59d42a90b0d279955d5051c2306733bc01522f8 (patch)
tree4875c04f9bad97a4c3e88bf329b6c0d75935556d /src/expr/exthdr.c
parenta7dfa49d34c76a420778a6fce2b5e7d85f0c8b1a (diff)
src: remove unused str2XXX helpers
After commit 80077787f8f2 ("src: remove json support"), these internal functions are no longer used: nftnl_str2hooknum nftnl_str2ntoh nftnl_str2cmp str2ctkey str2ctdir str2exthdr_op str2exthdr_type str2meta_key nftnl_str2nat nftnl_str2range str2rt_key nftnl_str2hooknum Signed-off-by: Zhongqiu Duan <dzq.aishenghu0@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/expr/exthdr.c')
-rw-r--r--src/expr/exthdr.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
index 339527d..ddebe43 100644
--- a/src/expr/exthdr.c
+++ b/src/expr/exthdr.c
@@ -202,33 +202,6 @@ static const char *op2str(uint8_t op)
}
}
-static inline int str2exthdr_op(const char* str)
-{
- if (!strcmp(str, "tcpopt"))
- return NFT_EXTHDR_OP_TCPOPT;
- if (!strcmp(str, "ipv4"))
- return NFT_EXTHDR_OP_IPV4;
-
- /* if str == "ipv6" or anything else */
- return NFT_EXTHDR_OP_IPV6;
-}
-
-static inline int str2exthdr_type(const char *str)
-{
- if (strcmp(str, "hopopts") == 0)
- return IPPROTO_HOPOPTS;
- else if (strcmp(str, "routing") == 0)
- return IPPROTO_ROUTING;
- else if (strcmp(str, "fragment") == 0)
- return IPPROTO_FRAGMENT;
- else if (strcmp(str, "dstopts") == 0)
- return IPPROTO_DSTOPTS;
- else if (strcmp(str, "mh") == 0)
- return IPPROTO_MH;
-
- return -1;
-}
-
static int
nftnl_expr_exthdr_snprintf(char *buf, size_t len,
uint32_t flags, const struct nftnl_expr *e)