diff options
author | Phil Sutter <phil@nwl.cc> | 2018-08-29 16:23:28 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-08-30 12:19:36 +0200 |
commit | 49e0f1dc6e52e791f5e0ba21097aea17d5950d38 (patch) | |
tree | 00215046781f409c62974cd57bf75f96ad265a51 /include | |
parent | 90d4ee087171e75d5313359ad6b6f1341e51ddc5 (diff) |
JSON: Add metainfo object to all output
Right now this object merely contains the nftables version and release
name as well as a JSON schema version, but it could be extended
arbitrarily. In the future, this will also allow for non-compatible
schema changes should the need for this arise.
Adjust the parser to accept metainfo objects and make it verify
json_schema_version to be less than or equal to the one hard-coded in
the library.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/json.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/json.h b/include/json.h index e64151de..66f60e76 100644 --- a/include/json.h +++ b/include/json.h @@ -15,6 +15,8 @@ struct table; #ifdef HAVE_LIBJANSSON +#define JSON_SCHEMA_VERSION 1 + #include <jansson.h> json_t *binop_expr_json(const struct expr *expr, struct output_ctx *octx); |