summaryrefslogtreecommitdiffstats
path: root/src/expr/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/match.c')
-rw-r--r--src/expr/match.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/expr/match.c b/src/expr/match.c
index dd09e1e..85dd79c 100644
--- a/src/expr/match.c
+++ b/src/expr/match.c
@@ -164,36 +164,6 @@ static int nftnl_expr_match_parse(struct nftnl_expr *e, struct nlattr *attr)
return 0;
}
-static int nftnl_expr_match_json_parse(struct nftnl_expr *e, json_t *root,
- struct nftnl_parse_err *err)
-{
-#ifdef JSON_PARSING
- const char *name;
-
- name = nftnl_jansson_parse_str(root, "name", err);
- if (name != NULL)
- nftnl_expr_set_str(e, NFTNL_EXPR_MT_NAME, name);
-
- return 0;
-#else
- errno = EOPNOTSUPP;
- return -1;
-#endif
-}
-
-
-static int nftnl_expr_match_export(char *buf, size_t size,
- const struct nftnl_expr *e, int type)
-{
- struct nftnl_expr_match *mt = nftnl_expr_data(e);
- NFTNL_BUF_INIT(b, buf, size);
-
- if (e->flags & (1 << NFTNL_EXPR_MT_NAME))
- nftnl_buf_str(&b, type, mt->name, NAME);
-
- return nftnl_buf_done(&b);
-}
-
static int
nftnl_expr_match_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
@@ -206,7 +176,6 @@ nftnl_expr_match_snprintf(char *buf, size_t len, uint32_t type,
match->name, match->rev);
case NFTNL_OUTPUT_XML:
case NFTNL_OUTPUT_JSON:
- return nftnl_expr_match_export(buf, len, e, type);
default:
break;
}
@@ -250,5 +219,4 @@ struct expr_ops expr_ops_match = {
.parse = nftnl_expr_match_parse,
.build = nftnl_expr_match_build,
.snprintf = nftnl_expr_match_snprintf,
- .json_parse = nftnl_expr_match_json_parse,
};