From: Victor Julien Date: Fri, 1 Dec 2023 08:47:13 +0000 (+0100) Subject: flow/timeout: use const TcpSession; cleanup prototypes X-Git-Tag: suricata-8.0.0-beta1~1992 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a4fd85d1d2ab27234e1e4fecdd33afc00af0b87;p=thirdparty%2Fsuricata.git flow/timeout: use const TcpSession; cleanup prototypes --- diff --git a/src/flow-timeout.c b/src/flow-timeout.c index 6a9b707c21..90a97fa666 100644 --- a/src/flow-timeout.c +++ b/src/flow-timeout.c @@ -76,10 +76,8 @@ * 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(); diff --git a/src/flow-timeout.h b/src/flow-timeout.h index 7426d59d60..882f4e63b2 100644 --- a/src/flow-timeout.h +++ b/src/flow-timeout.h @@ -24,8 +24,11 @@ #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__ */ diff --git a/src/flow-worker.c b/src/flow-worker.c index a20e053c59..3baa8ad7cb 100644 --- a/src/flow-worker.c +++ b/src/flow-worker.c @@ -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