summaryrefslogtreecommitdiffstats
path: root/include/libnetfilter_acct
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-02-22 10:12:17 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-02-29 12:42:50 +0100
commitf1d7d696104e8d52d75ec6ae585d7cc8b8090bde (patch)
tree6266509295b01eb4b707a93eaef331e33984defa /include/libnetfilter_acct
parentffe7782dfb130a817baeafc66a91cdbb555d7529 (diff)
add JSON output format
the original output format looks a bit like JSON, but isn't. The XML output is useful if you deal with XML, but a lot of applications prefer more lightweight formats like YAML/JSON. This adds the JSON output format to libnetfilter_acct, which will subsequently be used by a similar change in the nfacct utility. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libnetfilter_acct')
-rw-r--r--include/libnetfilter_acct/libnetfilter_acct.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libnetfilter_acct/libnetfilter_acct.h b/include/libnetfilter_acct/libnetfilter_acct.h
index c6ed858..647490f 100644
--- a/include/libnetfilter_acct/libnetfilter_acct.h
+++ b/include/libnetfilter_acct/libnetfilter_acct.h
@@ -41,6 +41,7 @@ int nfacct_nlmsg_parse_payload(const struct nlmsghdr *nlh, struct nfacct *nfacct
#define NFACCT_SNPRINTF_T_PLAIN 0
#define NFACCT_SNPRINTF_T_XML 1
+#define NFACCT_SNPRINTF_T_JSON 2
int nfacct_snprintf(char *buf, size_t size, struct nfacct *nfacct, uint16_t type, uint16_t flags);