diff options
author | Álvaro Neira Ayuso <alvaroneay@gmail.com> | 2013-11-11 21:09:35 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-11-14 00:38:38 +0100 |
commit | 989b793a3bf689757b2b8f08a1c264743d75fa0f (patch) | |
tree | 8a932779feb9b906282cc929ad0cab30799c8176 /src/expr/cmp.c | |
parent | 838ae8f60f43061778ce1b7f08cb08fc60fd21f9 (diff) |
src: unify parse and output types
Unify parse and output types that are redundant to all
existing nftables objects. Thus, all NFT_*_O_[XML|JSON|DEFAULT]
are merged into NFT_OUTPUT_[JSON|XML] and NFT_PARSE_[JSON|XML].
Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/cmp.c')
-rw-r--r-- | src/expr/cmp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/expr/cmp.c b/src/expr/cmp.c index 7de7226..246f22f 100644 --- a/src/expr/cmp.c +++ b/src/expr/cmp.c @@ -258,7 +258,7 @@ nft_rule_expr_cmp_snprintf_json(char *buf, size_t size, struct nft_expr_cmp *cmp SNPRINTF_BUFFER_SIZE(ret, size, len, offset); ret = nft_data_reg_snprintf(buf+offset, len, &cmp->data, - NFT_RULE_O_JSON, 0, DATA_VALUE); + NFT_OUTPUT_JSON, 0, DATA_VALUE); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); ret = snprintf(buf+offset, len, "}"); @@ -277,7 +277,7 @@ nft_rule_expr_cmp_snprintf_xml(char *buf, size_t size, struct nft_expr_cmp *cmp) SNPRINTF_BUFFER_SIZE(ret, size, len, offset); ret = nft_data_reg_snprintf(buf+offset, len, &cmp->data, - NFT_RULE_O_XML, 0, DATA_VALUE); + NFT_OUTPUT_XML, 0, DATA_VALUE); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); ret = snprintf(buf+offset, len, "</cmpdata>"); @@ -297,7 +297,7 @@ nft_rule_expr_cmp_snprintf_default(char *buf, size_t size, SNPRINTF_BUFFER_SIZE(ret, size, len, offset); ret = nft_data_reg_snprintf(buf+offset, len, &cmp->data, - NFT_RULE_O_DEFAULT, 0, DATA_VALUE); + NFT_OUTPUT_DEFAULT, 0, DATA_VALUE); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); return offset; @@ -310,11 +310,11 @@ nft_rule_expr_cmp_snprintf(char *buf, size_t size, uint32_t type, struct nft_expr_cmp *cmp = nft_expr_data(e); switch(type) { - case NFT_RULE_O_DEFAULT: + case NFT_OUTPUT_DEFAULT: return nft_rule_expr_cmp_snprintf_default(buf, size, cmp); - case NFT_RULE_O_XML: + case NFT_OUTPUT_XML: return nft_rule_expr_cmp_snprintf_xml(buf, size, cmp); - case NFT_RULE_O_JSON: + case NFT_OUTPUT_JSON: return nft_rule_expr_cmp_snprintf_json(buf, size, cmp); default: break; |