summaryrefslogtreecommitdiffstats
path: root/include/netlink.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2023-01-02 15:36:23 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-01-02 15:36:23 +0100
commit5e7304e12518ecb38ff45746650b5362f975500d (patch)
tree5a8ebc7cf70624676a58054808f03af1a417c8b6 /include/netlink.h
parente01c75d54359422b6072e94eadb3af1fe73baf2e (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'include/netlink.h')
-rw-r--r--include/netlink.h8
1 files changed, 7 insertions, 1 deletions
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 */