summaryrefslogtreecommitdiffstats
path: root/examples/nft-rule-xml-add.c
diff options
context:
space:
mode:
authorÁlvaro Neira Ayuso <alvaroneay@gmail.com>2013-11-11 21:09:35 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2013-11-14 00:38:38 +0100
commit989b793a3bf689757b2b8f08a1c264743d75fa0f (patch)
tree8a932779feb9b906282cc929ad0cab30799c8176 /examples/nft-rule-xml-add.c
parent838ae8f60f43061778ce1b7f08cb08fc60fd21f9 (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 'examples/nft-rule-xml-add.c')
-rw-r--r--examples/nft-rule-xml-add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/nft-rule-xml-add.c b/examples/nft-rule-xml-add.c
index 4de7a69..ce33fe7 100644
--- a/examples/nft-rule-xml-add.c
+++ b/examples/nft-rule-xml-add.c
@@ -63,12 +63,12 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- if (nft_rule_parse(r, NFT_RULE_PARSE_XML, xml) < 0) {
+ if (nft_rule_parse(r, NFT_PARSE_XML, xml) < 0) {
printf("E: Unable to parse XML file: %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
- nft_rule_snprintf(reprint, sizeof(reprint), r, NFT_RULE_O_XML, 0);
+ nft_rule_snprintf(reprint, sizeof(reprint), r, NFT_OUTPUT_XML, 0);
printf("Parsed:\n%s\n", reprint);
nft_rule_attr_unset(r, NFT_RULE_ATTR_HANDLE);