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 /src/hash.c | |
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 'src/hash.c')
-rw-r--r-- | src/hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -15,7 +15,7 @@ #include <hash.h> #include <utils.h> -static void hash_expr_print(const struct expr *expr) +static void hash_expr_print(const struct expr *expr, struct output_ctx *octx) { switch (expr->hash.type) { case NFT_HASH_SYM: @@ -24,7 +24,7 @@ static void hash_expr_print(const struct expr *expr) case NFT_HASH_JENKINS: default: printf("jhash "); - expr_print(expr->hash.expr); + expr_print(expr->hash.expr, octx); } printf(" mod %u", expr->hash.mod); |