From 8a2accb847926d0354f3a45d8c3e00933c9d7e00 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 21 May 2024 15:57:07 +1000 Subject: flow: Record the pifs for each side of each flow Currently we have no generic information flows apart from the type and state, everything else is specific to the flow type. Start introducing generic flow information by recording the pifs which the flow connects. To keep track of what information is valid, introduce new flow states: INI for when the initiating side information is complete, and TGT for when both sides information is complete, but we haven't chosen the flow type yet. For now, these states don't do an awful lot, but they'll become more important as we add more generic information. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- icmp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'icmp.c') diff --git a/icmp.c b/icmp.c index 3567ad7..80330f6 100644 --- a/icmp.c +++ b/icmp.c @@ -163,6 +163,8 @@ static struct icmp_ping_flow *icmp_ping_new(const struct ctx *c, if (!flow) return NULL; + flow_initiate(flow, PIF_TAP); + flow_target(flow, PIF_HOST); pingf = FLOW_SET_TYPE(flow, flowtype, ping); pingf->seq = -1; -- cgit v1.2.3