From 5e7304e12518ecb38ff45746650b5362f975500d Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 2 Jan 2023 15:36:23 +0100 Subject: src: add dl_proto_ctx() Add dl_proto_ctx() to access protocol context (struct proto_ctx and struct payload_dep_ctx) from the delinearize path. This patch comes in preparation for supporting outer and inner protocol context. Signed-off-by: Pablo Neira Ayuso --- include/netlink.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/netlink.h') diff --git a/include/netlink.h b/include/netlink.h index 63d07edf..4823f1e6 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -49,9 +49,13 @@ struct netlink_parse_ctx { #define RULE_PP_REMOVE_OP_AND (RULE_PP_IN_CONCATENATION | \ RULE_PP_IN_SET_ELEM) -struct rule_pp_ctx { +struct dl_proto_ctx { struct proto_ctx pctx; struct payload_dep_ctx pdctx; +}; + +struct rule_pp_ctx { + struct dl_proto_ctx _dl; struct stmt *stmt; unsigned int flags; }; @@ -246,4 +250,6 @@ struct nft_expr_loc { struct nft_expr_loc *nft_expr_loc_find(const struct nftnl_expr *nle, struct netlink_linearize_ctx *ctx); +struct dl_proto_ctx *dl_proto_ctx(struct rule_pp_ctx *ctx); + #endif /* NFTABLES_NETLINK_H */ -- cgit v1.2.3