From e70354f53e9f6be4a4be31dbc46c5e23291d3587 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 8 May 2018 13:08:37 +0200 Subject: 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 --- src/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index 92e6795f..c5c3b0bc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -88,4 +88,9 @@ if BUILD_CLI nft_SOURCES += cli.c endif +if BUILD_JSON +libnftables_la_SOURCES += json.c +libnftables_la_LIBADD += ${JANSSON_LIBS} +endif + nft_LDADD = libnftables.la -- cgit v1.2.3