From 35f6cd327c2ec46296adf464f981cd6cddfec27b Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Fri, 16 Jun 2017 14:54:06 +0530 Subject: src: Pass stateless, numeric, ip2name and handle variables as structure members. libnftables library will be created soon. So declare numeric_output, stateless_output, ip2name_output and handle_output as members of structure output_ctx, instead of global variables. Rename these variables as following, numeric_output -> numeric stateless_output -> stateless ip2name_output -> ip2name handle_output -> handle Also add struct output_ctx *octx as member of struct netlink_ctx. Signed-off-by: Varsha Rao Signed-off-by: Pablo Neira Ayuso --- include/expression.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/expression.h') diff --git a/include/expression.h b/include/expression.h index 9ba87e82..3e67938a 100644 --- a/include/expression.h +++ b/include/expression.h @@ -157,7 +157,8 @@ struct expr_ops { void (*set_type)(const struct expr *expr, const struct datatype *dtype, enum byteorder byteorder); - void (*print)(const struct expr *expr); + void (*print)(const struct expr *expr, + struct output_ctx *octx); bool (*cmp)(const struct expr *e1, const struct expr *e2); void (*pctx_update)(struct proto_ctx *ctx, @@ -330,7 +331,7 @@ extern struct expr *expr_alloc(const struct location *loc, extern struct expr *expr_clone(const struct expr *expr); extern struct expr *expr_get(struct expr *expr); extern void expr_free(struct expr *expr); -extern void expr_print(const struct expr *expr); +extern void expr_print(const struct expr *expr, struct output_ctx *octx); extern bool expr_cmp(const struct expr *e1, const struct expr *e2); extern void expr_describe(const struct expr *expr); -- cgit v1.2.3