summaryrefslogtreecommitdiffstats
path: root/src/expr
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-08-24 17:57:16 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-08-24 17:57:16 +0200
commit3b5f75162f2307c30443f6175d37080c7f0d7e66 (patch)
tree28e46f9f7ae2ea996128c6a54381147ad3c69eac /src/expr
parent7e3c0b62f9fc3dab35b13b021618a0fcf2f25ca4 (diff)
src: json: s/nft_jansson_value_parse_str/nft_jansson_parse_str/g
Remove _value_ infix to make the function name smaller. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/byteorder.c2
-rw-r--r--src/expr/cmp.c2
-rw-r--r--src/expr/ct.c2
-rw-r--r--src/expr/data_reg.c9
-rw-r--r--src/expr/exthdr.c2
-rw-r--r--src/expr/log.c2
-rw-r--r--src/expr/lookup.c2
-rw-r--r--src/expr/match.c2
-rw-r--r--src/expr/meta.c2
-rw-r--r--src/expr/nat.c4
-rw-r--r--src/expr/payload.c2
-rw-r--r--src/expr/target.c2
12 files changed, 16 insertions, 17 deletions
diff --git a/src/expr/byteorder.c b/src/expr/byteorder.c
index f596ff3..dab9061 100644
--- a/src/expr/byteorder.c
+++ b/src/expr/byteorder.c
@@ -213,7 +213,7 @@ nft_rule_expr_byteorder_json_parse(struct nft_rule_expr *e, json_t *root)
nft_rule_expr_set_u32(e, NFT_EXPR_BYTEORDER_DREG, uval32);
- op = nft_jansson_value_parse_str(root, "op");
+ op = nft_jansson_parse_str(root, "op");
if (op == NULL)
return -1;
diff --git a/src/expr/cmp.c b/src/expr/cmp.c
index 16be540..71f8e60 100644
--- a/src/expr/cmp.c
+++ b/src/expr/cmp.c
@@ -188,7 +188,7 @@ static int nft_rule_expr_cmp_json_parse(struct nft_rule_expr *e, json_t *root)
nft_rule_expr_set_u32(e, NFT_EXPR_CMP_SREG, uval32);
- op = nft_jansson_value_parse_str(root, "op");
+ op = nft_jansson_parse_str(root, "op");
if (op == NULL)
return -1;
diff --git a/src/expr/ct.c b/src/expr/ct.c
index c131e67..79c4f05 100644
--- a/src/expr/ct.c
+++ b/src/expr/ct.c
@@ -192,7 +192,7 @@ static int nft_rule_expr_ct_json_parse(struct nft_rule_expr *e, json_t *root)
nft_rule_expr_set_u32(e, NFT_EXPR_CT_DREG, reg);
if (nft_jansson_node_exist(root, "key")) {
- key_str = nft_jansson_value_parse_str(root, "key");
+ key_str = nft_jansson_parse_str(root, "key");
if (key_str == NULL)
return -1;
diff --git a/src/expr/data_reg.c b/src/expr/data_reg.c
index d0e1a83..3b6a87a 100644
--- a/src/expr/data_reg.c
+++ b/src/expr/data_reg.c
@@ -32,7 +32,7 @@ static int nft_data_reg_verdict_json_parse(union nft_data_reg *reg, json_t *data
int verdict;
const char *verdict_str;
- verdict_str = nft_jansson_value_parse_str(data, "verdict");
+ verdict_str = nft_jansson_parse_str(data, "verdict");
if (verdict_str == NULL)
return -1;
@@ -47,7 +47,7 @@ static int nft_data_reg_verdict_json_parse(union nft_data_reg *reg, json_t *data
static int nft_data_reg_chain_json_parse(union nft_data_reg *reg, json_t *data)
{
- reg->chain = strdup(nft_jansson_value_parse_str(data, "chain"));
+ reg->chain = strdup(nft_jansson_parse_str(data, "chain"));
if (reg->chain == NULL) {
return -1;
}
@@ -82,10 +82,9 @@ int nft_data_reg_json_parse(union nft_data_reg *reg, json_t *data)
const char *type;
- type = nft_jansson_value_parse_str(data, "type");
- if (type == NULL) {
+ type = nft_jansson_parse_str(data, "type");
+ if (type == NULL)
return -1;
- }
/* Select what type of parsing is needed */
if (strcmp(type, "value") == 0) {
diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
index 8d4e8b7..b0705b5 100644
--- a/src/expr/exthdr.c
+++ b/src/expr/exthdr.c
@@ -206,7 +206,7 @@ nft_rule_expr_exthdr_json_parse(struct nft_rule_expr *e, json_t *root)
nft_rule_expr_set_u32(e, NFT_EXPR_EXTHDR_DREG, uval32);
- exthdr_type = nft_jansson_value_parse_str(root, "exthdr_type");
+ exthdr_type = nft_jansson_parse_str(root, "exthdr_type");
if (exthdr_type == NULL)
return -1;
diff --git a/src/expr/log.c b/src/expr/log.c
index 1dfea1b..8858e5b 100644
--- a/src/expr/log.c
+++ b/src/expr/log.c
@@ -163,7 +163,7 @@ static int nft_rule_expr_log_json_parse(struct nft_rule_expr *e, json_t *root)
uint32_t snaplen;
uint16_t uval16;
- prefix = nft_jansson_value_parse_str(root, "prefix");
+ prefix = nft_jansson_parse_str(root, "prefix");
if (prefix == NULL)
return -1;
diff --git a/src/expr/lookup.c b/src/expr/lookup.c
index 34f484c..cbc4d42 100644
--- a/src/expr/lookup.c
+++ b/src/expr/lookup.c
@@ -149,7 +149,7 @@ nft_rule_expr_lookup_json_parse(struct nft_rule_expr *e, json_t *root)
const char *set_name;
int32_t reg;
- set_name = nft_jansson_value_parse_str(root, "set");
+ set_name = nft_jansson_parse_str(root, "set");
if (set_name == NULL)
return -1;
diff --git a/src/expr/match.c b/src/expr/match.c
index 763e11e..b18d594 100644
--- a/src/expr/match.c
+++ b/src/expr/match.c
@@ -175,7 +175,7 @@ static int nft_rule_expr_match_json_parse(struct nft_rule_expr *e, json_t *root)
#ifdef JSON_PARSING
const char *name;
- name = nft_jansson_value_parse_str(root, "name");
+ name = nft_jansson_parse_str(root, "name");
if (name == NULL)
return -1;
diff --git a/src/expr/meta.c b/src/expr/meta.c
index 84b8ba8..bbe5496 100644
--- a/src/expr/meta.c
+++ b/src/expr/meta.c
@@ -172,7 +172,7 @@ static int nft_rule_expr_meta_json_parse(struct nft_rule_expr *e, json_t *root)
nft_rule_expr_set_u32(e, NFT_EXPR_META_DREG, reg);
- key_str = nft_jansson_value_parse_str(root, "key");
+ key_str = nft_jansson_parse_str(root, "key");
if (key_str == NULL)
return -1;
diff --git a/src/expr/nat.c b/src/expr/nat.c
index 312594f..6cde333 100644
--- a/src/expr/nat.c
+++ b/src/expr/nat.c
@@ -203,7 +203,7 @@ static int nft_rule_expr_nat_json_parse(struct nft_rule_expr *e, json_t *root)
uint32_t reg;
int val32;
- nat_type = nft_jansson_value_parse_str(root, "nat_type");
+ nat_type = nft_jansson_parse_str(root, "nat_type");
if (nat_type == NULL)
return -1;
@@ -213,7 +213,7 @@ static int nft_rule_expr_nat_json_parse(struct nft_rule_expr *e, json_t *root)
nft_rule_expr_set_u32(e, NFT_EXPR_NAT_TYPE, val32);
- family_str = nft_jansson_value_parse_str(root, "family");
+ family_str = nft_jansson_parse_str(root, "family");
if (family_str == NULL)
return -1;
diff --git a/src/expr/payload.c b/src/expr/payload.c
index 84346a1..161b0d9 100644
--- a/src/expr/payload.c
+++ b/src/expr/payload.c
@@ -206,7 +206,7 @@ nft_rule_expr_payload_json_parse(struct nft_rule_expr *e, json_t *root)
nft_rule_expr_set_u32(e, NFT_EXPR_PAYLOAD_DREG, reg);
- base_str = nft_jansson_value_parse_str(root, "base");
+ base_str = nft_jansson_parse_str(root, "base");
if (base_str == NULL)
return -1;
diff --git a/src/expr/target.c b/src/expr/target.c
index ede4830..a6645ff 100644
--- a/src/expr/target.c
+++ b/src/expr/target.c
@@ -176,7 +176,7 @@ nft_rule_expr_target_json_parse(struct nft_rule_expr *e, json_t *root)
#ifdef JSON_PARSING
const char *name;
- name = nft_jansson_value_parse_str(root, "name");
+ name = nft_jansson_parse_str(root, "name");
if (name == NULL)
return -1;