diff options
author | Phil Sutter <phil@nwl.cc> | 2018-06-08 17:27:16 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-11 11:31:49 +0200 |
commit | e8b5419b94e230d008d6701b66d02434a7cb1152 (patch) | |
tree | 0870685808e4259f7808f5e3ea797fe79e38e4f2 /src/json.c | |
parent | cd102c36aedf2a8f65ff235a009f297352cd6b65 (diff) |
JSON: Add support for socket expression
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -805,6 +805,12 @@ json_t *constant_expr_json(const struct expr *expr, struct output_ctx *octx) return datatype_json(expr, octx); } +json_t *socket_expr_json(const struct expr *expr, struct output_ctx *octx) +{ + return json_pack("{s:{s:s}}", "socket", "key", + socket_templates[expr->socket.key].token); +} + json_t *integer_type_json(const struct expr *expr, struct output_ctx *octx) { char buf[1024] = "0x"; |