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/exthdr.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/exthdr.c')
-rw-r--r-- | src/expr/exthdr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c index 32791d0..6841ac1 100644 --- a/src/expr/exthdr.c +++ b/src/expr/exthdr.c @@ -289,11 +289,11 @@ nft_rule_expr_exthdr_snprintf(char *buf, size_t len, uint32_t type, struct nft_expr_exthdr *exthdr = nft_expr_data(e); switch(type) { - case NFT_RULE_O_DEFAULT: + case NFT_OUTPUT_DEFAULT: return snprintf(buf, len, "load %ub @ %u + %u => reg %u ", exthdr->len, exthdr->type, exthdr->offset, exthdr->dreg); - case NFT_RULE_O_XML: + case NFT_OUTPUT_XML: return snprintf(buf, len, "<dreg>%u</dreg>" "<exthdr_type>%s</exthdr_type>" "<offset>%u</offset>" @@ -301,7 +301,7 @@ nft_rule_expr_exthdr_snprintf(char *buf, size_t len, uint32_t type, exthdr->dreg, exthdr_type2str(exthdr->type), exthdr->offset, exthdr->len); - case NFT_RULE_O_JSON: + case NFT_OUTPUT_JSON: return snprintf(buf, len, "\"dreg\":%u," "\"exthdr_type\":\"%s\",\"offset\":%u," "\"len\":%u", |