From cf37ce9842d0f1def2a3b9bcbfcb36edeff9fd0f Mon Sep 17 00:00:00 2001 From: "Shanmugam S (shanms)" Date: Tue, 24 Jan 2023 17:33:24 +0000 Subject: [PATCH] Pull request #3747: flow: add stream interface to get parent flow from child flow Merge in SNORT/snort3 from ~ABHPAL/snort3:h3 to master Squashed commit of the following: commit 2ae655a6a07a27f45b6b6ecb23665c0dc40eabb5 Author: Abhijit Pal(abhpal) Date: Mon Jan 23 18:08:36 2023 +0530 flow: add stream interface to get parent flow from child flow --- src/flow/flow.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/flow/flow.h b/src/flow/flow.h index eec263120..907be3a15 100644 --- a/src/flow/flow.h +++ b/src/flow/flow.h @@ -165,6 +165,9 @@ public: virtual void set_stream_flow_data(Flow* flow, FlowData* flow_data) = 0; virtual void get_stream_id(const Flow* flow, int64_t& stream_id) = 0; virtual AppId get_appid_from_stream(const Flow*) { return APP_ID_NONE; } + // Stream based flows should override this interface to return parent flow + // when child flow is passed as input + virtual Flow* get_stream_parent_flow(Flow* cflow) { return cflow; } }; // this struct is organized by member size for compactness -- 2.47.3