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/statement.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/statement.h') diff --git a/include/statement.h b/include/statement.h index 317d53e2..49fb1091 100644 --- a/include/statement.h +++ b/include/statement.h @@ -261,7 +261,8 @@ struct stmt_ops { enum stmt_types type; const char *name; void (*destroy)(struct stmt *stmt); - void (*print)(const struct stmt *stmt); + void (*print)(const struct stmt *stmt, + struct output_ctx *octx); }; enum stmt_flags { @@ -312,7 +313,7 @@ extern struct stmt *stmt_alloc(const struct location *loc, int stmt_evaluate(struct eval_ctx *ctx, struct stmt *stmt); extern void stmt_free(struct stmt *stmt); extern void stmt_list_free(struct list_head *list); -extern void stmt_print(const struct stmt *stmt); +extern void stmt_print(const struct stmt *stmt, struct output_ctx *octx); const char *get_rate(uint64_t byte_rate, uint64_t *rate); -- cgit v1.2.3