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 /examples/nft-chain-get.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 'examples/nft-chain-get.c')
-rw-r--r-- | examples/nft-chain-get.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/nft-chain-get.c b/examples/nft-chain-get.c index e466e8b..7e162f6 100644 --- a/examples/nft-chain-get.c +++ b/examples/nft-chain-get.c @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) struct mnl_socket *nl; char buf[MNL_SOCKET_BUFFER_SIZE]; struct nlmsghdr *nlh; - uint32_t portid, seq, type = NFT_CHAIN_O_DEFAULT; + uint32_t portid, seq, type = NFT_OUTPUT_DEFAULT; struct nft_chain *t = NULL; int ret, family; @@ -96,9 +96,9 @@ int main(int argc, char *argv[]) } if (strcmp(argv[argc-1], "xml") == 0){ - type = NFT_CHAIN_O_XML; + type = NFT_OUTPUT_XML; }else if (strcmp(argv[argc-1], "json") == 0){ - type = NFT_CHAIN_O_JSON; + type = NFT_OUTPUT_JSON; } nl = mnl_socket_open(NETLINK_NETFILTER); |