diff options
author | Varsha Rao <rvarsha016@gmail.com> | 2017-06-16 14:54:06 +0530 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-06-18 11:23:00 +0200 |
commit | 35f6cd327c2ec46296adf464f981cd6cddfec27b (patch) | |
tree | 7341c05e6f7499fa3da18a4e50dd9db0ca36339b /include/rule.h | |
parent | 509671dfa03365bba727b8be5e522b737da93a6f (diff) |
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 <rvarsha016@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/rule.h')
-rw-r--r-- | include/rule.h | 10 |
1 files changed, 5 insertions, 5 deletions
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 <statement.h> @@ -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); |