summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-06-08 17:27:16 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-06-11 11:31:49 +0200
commite8b5419b94e230d008d6701b66d02434a7cb1152 (patch)
tree0870685808e4259f7808f5e3ea797fe79e38e4f2 /include
parentcd102c36aedf2a8f65ff235a009f297352cd6b65 (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 'include')
-rw-r--r--include/json.h2
-rw-r--r--include/socket.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/json.h b/include/json.h
index ae393814..1972bc84 100644
--- a/include/json.h
+++ b/include/json.h
@@ -39,6 +39,7 @@ json_t *numgen_expr_json(const struct expr *expr, struct output_ctx *octx);
json_t *hash_expr_json(const struct expr *expr, struct output_ctx *octx);
json_t *fib_expr_json(const struct expr *expr, struct output_ctx *octx);
json_t *constant_expr_json(const struct expr *expr, struct output_ctx *octx);
+json_t *socket_expr_json(const struct expr *expr, struct output_ctx *octx);
json_t *integer_type_json(const struct expr *expr, struct output_ctx *octx);
json_t *string_type_json(const struct expr *expr, struct output_ctx *octx);
@@ -115,6 +116,7 @@ EXPR_PRINT_STUB(numgen_expr)
EXPR_PRINT_STUB(hash_expr)
EXPR_PRINT_STUB(fib_expr)
EXPR_PRINT_STUB(constant_expr)
+EXPR_PRINT_STUB(socket_expr)
EXPR_PRINT_STUB(integer_type)
EXPR_PRINT_STUB(string_type)
diff --git a/include/socket.h b/include/socket.h
index a2ae9f10..1814974c 100644
--- a/include/socket.h
+++ b/include/socket.h
@@ -18,6 +18,8 @@ struct socket_template {
enum byteorder byteorder;
};
+extern const struct socket_template socket_templates[];
+
extern struct expr *socket_expr_alloc(const struct location *loc,
enum nft_socket_keys key);