diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-01-02 15:36:20 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-01-02 15:36:20 +0100 |
commit | e01c75d54359422b6072e94eadb3af1fe73baf2e (patch) | |
tree | 1926413c8e8738cb53e335d6df6c164a5c5412d5 /include | |
parent | 77fd4fa2827087dc00615137da78730500823259 (diff) |
src: add eval_proto_ctx()
Add eval_proto_ctx() to access protocol context (struct proto_ctx).
Rename struct proto_ctx field to _pctx to highlight that this field
is internal and the helper function should be used.
This patch comes in preparation for supporting outer and inner
protocol context.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/proto.h | 3 | ||||
-rw-r--r-- | include/rule.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/proto.h b/include/proto.h index 35e760c7..6a9289b1 100644 --- a/include/proto.h +++ b/include/proto.h @@ -413,4 +413,7 @@ extern const struct datatype icmp6_type_type; extern const struct datatype dscp_type; extern const struct datatype ecn_type; +struct eval_ctx; +struct proto_ctx *eval_proto_ctx(struct eval_ctx *ctx); + #endif /* NFTABLES_PROTO_H */ diff --git a/include/rule.h b/include/rule.h index 00a1bac5..c1b46414 100644 --- a/include/rule.h +++ b/include/rule.h @@ -769,7 +769,7 @@ struct eval_ctx { struct set *set; struct stmt *stmt; struct expr_ctx ectx; - struct proto_ctx pctx; + struct proto_ctx _pctx; }; extern int cmd_evaluate(struct eval_ctx *ctx, struct cmd *cmd); |