From 98b871512c4677848a12e8204fe35eb870660304 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 8 Dec 2020 15:49:42 +0100 Subject: src: add auto-dependencies for ipv4 icmp The ICMP header has field values that are only exist for certain types. Mark the icmp proto 'type' field as a nextheader field and add a new th description to store the icmp type dependency. This can later be re-used for other protocol dependend definitions such as mptcp options -- which are all share the same tcp option number and have a special 4 bit marker inside the mptcp option space that tells how the remaining option looks like. Signed-off-by: Florian Westphal --- include/payload.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/payload.h') diff --git a/include/payload.h b/include/payload.h index a914d239..7bbb19b9 100644 --- a/include/payload.h +++ b/include/payload.h @@ -15,6 +15,9 @@ struct eval_ctx; struct stmt; extern int payload_gen_dependency(struct eval_ctx *ctx, const struct expr *expr, struct stmt **res); +extern int payload_gen_icmp_dependency(struct eval_ctx *ctx, + const struct expr *expr, + struct stmt **res); extern int exthdr_gen_dependency(struct eval_ctx *ctx, const struct expr *expr, const struct proto_desc *dependency, enum proto_bases pb, struct stmt **res); -- cgit v1.2.3