summaryrefslogtreecommitdiffstats
path: root/src/expr/ct.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/ct.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/ct.c')
-rw-r--r--src/expr/ct.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/expr/ct.c b/src/expr/ct.c
index 71dbaf9..8f8c2a6 100644
--- a/src/expr/ct.c
+++ b/src/expr/ct.c
@@ -177,18 +177,6 @@ static const char *ctkey2str(uint32_t ctkey)
return ctkey2str_array[ctkey];
}
-static inline int str2ctkey(const char *ctkey)
-{
- int i;
-
- for (i = 0; i < NFT_CT_MAX; i++) {
- if (strcmp(ctkey2str_array[i], ctkey) == 0)
- return i;
- }
-
- return -1;
-}
-
static const char *ctdir2str(uint8_t ctdir)
{
switch (ctdir) {
@@ -201,21 +189,6 @@ static const char *ctdir2str(uint8_t ctdir)
}
}
-static inline int str2ctdir(const char *str, uint8_t *ctdir)
-{
- if (strcmp(str, "original") == 0) {
- *ctdir = IP_CT_DIR_ORIGINAL;
- return 0;
- }
-
- if (strcmp(str, "reply") == 0) {
- *ctdir = IP_CT_DIR_REPLY;
- return 0;
- }
-
- return -1;
-}
-
static int
nftnl_expr_ct_snprintf(char *buf, size_t remain,
uint32_t flags, const struct nftnl_expr *e)