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/rule.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/rule.h') diff --git a/include/rule.h b/include/rule.h index 3178a978..7424b21c 100644 --- a/include/rule.h +++ b/include/rule.h @@ -198,7 +198,7 @@ extern struct rule *rule_alloc(const struct location *loc, const struct handle *h); extern struct rule *rule_get(struct rule *rule); extern void rule_free(struct rule *rule); -extern void rule_print(const struct rule *rule); +extern void rule_print(const struct rule *rule, struct output_ctx *octx); extern struct rule *rule_lookup(const struct chain *chain, uint64_t handle); /** @@ -247,8 +247,8 @@ extern void set_add_hash(struct set *set, struct table *table); extern struct set *set_lookup(const struct table *table, const char *name); extern struct set *set_lookup_global(uint32_t family, const char *table, const char *name); -extern void set_print(const struct set *set); -extern void set_print_plain(const struct set *s); +extern void set_print(const struct set *set, struct output_ctx *octx); +extern void set_print_plain(const struct set *s, struct output_ctx *octx); #include @@ -297,8 +297,8 @@ void obj_free(struct obj *obj); void obj_add_hash(struct obj *obj, struct table *table); struct obj *obj_lookup(const struct table *table, const char *name, uint32_t type); -void obj_print(const struct obj *n); -void obj_print_plain(const struct obj *obj); +void obj_print(const struct obj *n, struct output_ctx *octx); +void obj_print_plain(const struct obj *obj, struct output_ctx *octx); const char *obj_type_name(uint32_t type); uint32_t obj_type_to_cmd(uint32_t type); -- cgit v1.2.3