]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3747: flow: add stream interface to get parent flow from child flow
authorShanmugam S (shanms) <shanms@cisco.com>
Tue, 24 Jan 2023 17:33:24 +0000 (17:33 +0000)
committerShanmugam S (shanms) <shanms@cisco.com>
Tue, 24 Jan 2023 17:33:24 +0000 (17:33 +0000)
Merge in SNORT/snort3 from ~ABHPAL/snort3:h3 to master

Squashed commit of the following:

commit 2ae655a6a07a27f45b6b6ecb23665c0dc40eabb5
Author: Abhijit Pal(abhpal) <abhpal@cisco.com>
Date:   Mon Jan 23 18:08:36 2023 +0530

    flow: add stream interface to get parent flow from child flow

src/flow/flow.h

index eec2631208b293f924e4741857145ef6329c8de4..907be3a1535dd11e0e8f031b8ded75917ff6f069 100644 (file)
@@ -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