diff options
author | Florian Westphal <fw@strlen.de> | 2018-11-18 19:26:51 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-11-19 18:38:35 +0100 |
commit | 05a682af79a29498021fb6a187977a2cf1b205c9 (patch) | |
tree | 539ef99ef8755131a32e5af42929bfe2617453bc /iptables/nft-shared.c | |
parent | bd5f7f521d537bee43337cd576108d6843f82608 (diff) |
xtables: make all nft_parse_ helpers static
no more external callers.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r-- | iptables/nft-shared.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index 7b8ca5e4..05b091ea 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -302,7 +302,7 @@ int parse_meta(struct nftnl_expr *e, uint8_t key, char *iniface, return 0; } -void nft_parse_target(struct nft_xt_ctx *ctx, struct nftnl_expr *e) +static void nft_parse_target(struct nft_xt_ctx *ctx, struct nftnl_expr *e) { uint32_t tg_len; const char *targname = nftnl_expr_get_str(e, NFTNL_EXPR_TG_NAME); @@ -331,7 +331,7 @@ void nft_parse_target(struct nft_xt_ctx *ctx, struct nftnl_expr *e) ops->parse_target(target, data); } -void nft_parse_match(struct nft_xt_ctx *ctx, struct nftnl_expr *e) +static void nft_parse_match(struct nft_xt_ctx *ctx, struct nftnl_expr *e) { uint32_t mt_len; const char *mt_name = nftnl_expr_get_str(e, NFTNL_EXPR_MT_NAME); @@ -433,7 +433,7 @@ static void nft_meta_set_to_target(struct nft_xt_ctx *ctx) ops->parse_target(target, ctx->cs); } -void nft_parse_meta(struct nft_xt_ctx *ctx, struct nftnl_expr *e) +static void nft_parse_meta(struct nft_xt_ctx *ctx, struct nftnl_expr *e) { ctx->meta.key = nftnl_expr_get_u32(e, NFTNL_EXPR_META_KEY); @@ -449,14 +449,14 @@ void nft_parse_meta(struct nft_xt_ctx *ctx, struct nftnl_expr *e) ctx->flags |= NFT_XT_CTX_META; } -void nft_parse_payload(struct nft_xt_ctx *ctx, struct nftnl_expr *e) +static void nft_parse_payload(struct nft_xt_ctx *ctx, struct nftnl_expr *e) { ctx->reg = nftnl_expr_get_u32(e, NFTNL_EXPR_META_DREG); ctx->payload.offset = nftnl_expr_get_u32(e, NFTNL_EXPR_PAYLOAD_OFFSET); ctx->flags |= NFT_XT_CTX_PAYLOAD; } -void nft_parse_bitwise(struct nft_xt_ctx *ctx, struct nftnl_expr *e) +static void nft_parse_bitwise(struct nft_xt_ctx *ctx, struct nftnl_expr *e) { uint32_t reg, len; const void *data; @@ -472,7 +472,7 @@ void nft_parse_bitwise(struct nft_xt_ctx *ctx, struct nftnl_expr *e) ctx->flags |= NFT_XT_CTX_BITWISE; } -void nft_parse_cmp(struct nft_xt_ctx *ctx, struct nftnl_expr *e) +static void nft_parse_cmp(struct nft_xt_ctx *ctx, struct nftnl_expr *e) { struct nft_family_ops *ops = nft_family_ops_lookup(ctx->family); void *data = ctx->cs; @@ -493,13 +493,13 @@ void nft_parse_cmp(struct nft_xt_ctx *ctx, struct nftnl_expr *e) } } -void nft_parse_counter(struct nftnl_expr *e, struct xt_counters *counters) +static void nft_parse_counter(struct nftnl_expr *e, struct xt_counters *counters) { counters->pcnt = nftnl_expr_get_u64(e, NFTNL_EXPR_CTR_PACKETS); counters->bcnt = nftnl_expr_get_u64(e, NFTNL_EXPR_CTR_BYTES); } -void nft_parse_immediate(struct nft_xt_ctx *ctx, struct nftnl_expr *e) +static void nft_parse_immediate(struct nft_xt_ctx *ctx, struct nftnl_expr *e) { const char *chain = nftnl_expr_get_str(e, NFTNL_EXPR_IMM_CHAIN); struct nft_family_ops *ops; |