path: root/include/nftables.h
diff options
authorPhil Sutter <>2018-05-08 13:08:37 +0200
committerPablo Neira Ayuso <>2018-05-11 12:16:59 +0200
commite70354f53e9f6be4a4be31dbc46c5e23291d3587 (patch)
tree8d0bb763d9e80c5eb33e899666552e2bd414053b /include/nftables.h
parente77b31f53a61a8995cd6baf91a6e557260f401bd (diff)
libnftables: Implement JSON output support
Although technically there already is support for JSON output via 'nft export json' command, it is hardly useable since it exports all the gory details of nftables VM. Also, libnftables has no control over what is exported since the content comes directly from libnftnl. Instead, implement JSON format support for regular 'nft list' commands. Signed-off-by: Phil Sutter <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/nftables.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/include/nftables.h b/include/nftables.h
index 661c1e17..f88d0530 100644
--- a/include/nftables.h
+++ b/include/nftables.h
@@ -21,6 +21,7 @@ struct output_ctx {
unsigned int ip2name;
unsigned int handle;
unsigned int echo;
+ unsigned int json;
union {
FILE *output_fp;
struct cookie output_cookie;