]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow/timeout: use const TcpSession; cleanup prototypes
authorVictor Julien <vjulien@oisf.net>
Fri, 1 Dec 2023 08:47:13 +0000 (09:47 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 1 Dec 2023 13:55:43 +0000 (14:55 +0100)
src/flow-timeout.c
src/flow-timeout.h
src/flow-worker.c

index 6a9b707c21866d121424675814f518ac124fdb5c..90a97fa66688db854663a86604c8c1dd2f0e859f 100644 (file)
  *                  packets need to force reassembly, in which case we just
  *                  set dummy ack/seq values.
  */
-static inline Packet *FlowForceReassemblyPseudoPacketSetup(Packet *p,
-                                                           int direction,
-                                                           Flow *f,
-                                                           TcpSession *ssn)
+static inline Packet *FlowForceReassemblyPseudoPacketSetup(
+        Packet *p, int direction, Flow *f, const TcpSession *ssn)
 {
     const int orig_dir = direction;
     p->tenant_id = f->tenant_id;
@@ -265,12 +263,7 @@ error:
     return NULL;
 }
 
-Packet *FlowForceReassemblyPseudoPacketGet(int direction,
-                                                         Flow *f,
-                                                         TcpSession *ssn);
-Packet *FlowForceReassemblyPseudoPacketGet(int direction,
-                                                         Flow *f,
-                                                         TcpSession *ssn)
+Packet *FlowForceReassemblyPseudoPacketGet(int direction, Flow *f, const TcpSession *ssn)
 {
     PacketPoolWait();
     Packet *p = PacketPoolGetPacket();
index 7426d59d60c67a86086e3dde5353d87636c27cb5..882f4e63b201beaf5075e00c192fa4dbbce969b6 100644 (file)
 #ifndef __FLOW_TIMEOUT_H__
 #define __FLOW_TIMEOUT_H__
 
+#include "stream-tcp-private.h"
+
 void FlowForceReassemblyForFlow(Flow *f);
 int FlowForceReassemblyNeedReassembly(Flow *f);
 void FlowForceReassembly(void);
+Packet *FlowForceReassemblyPseudoPacketGet(int direction, Flow *f, const TcpSession *ssn);
 
 #endif /* __FLOW_TIMEOUT_H__ */
index a20e053c59c9e5a38432104f3e4147626e35c246..3baa8ad7cbc5f097e3d6ad0feefdc1861b0f6e86 100644 (file)
@@ -96,8 +96,8 @@ typedef struct FlowWorkerThreadData_ {
 
 } FlowWorkerThreadData;
 
-static void FlowWorkerFlowTimeout(ThreadVars *tv, Packet *p, FlowWorkerThreadData *fw, void *detect_thread);
-Packet *FlowForceReassemblyPseudoPacketGet(int direction, Flow *f, TcpSession *ssn);
+static void FlowWorkerFlowTimeout(
+        ThreadVars *tv, Packet *p, FlowWorkerThreadData *fw, void *detect_thread);
 
 /**
  * \internal