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 --- src/rt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rt.c') diff --git a/src/rt.c b/src/rt.c index 232c1dcb..eb5f9c33 100644 --- a/src/rt.c +++ b/src/rt.c @@ -34,9 +34,9 @@ static void __exit realm_table_exit(void) rt_symbol_table_free(realm_tbl); } -static void realm_type_print(const struct expr *expr) +static void realm_type_print(const struct expr *expr, struct output_ctx *octx) { - return symbolic_constant_print(realm_tbl, expr, true); + return symbolic_constant_print(realm_tbl, expr, true, octx); } static struct error_record *realm_type_parse(const struct expr *sym, @@ -75,7 +75,7 @@ static const struct rt_template rt_templates[] = { true), }; -static void rt_expr_print(const struct expr *expr) +static void rt_expr_print(const struct expr *expr, struct output_ctx *octx) { printf("rt %s", rt_templates[expr->rt.key].token); } -- cgit v1.2.3