Skip to content

Commit

Permalink
flow/timeout: use const TcpSession; cleanup prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Dec 1, 2023
1 parent 9639da3 commit 2a4fd85
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
13 changes: 3 additions & 10 deletions src/flow-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -265,12 +263,7 @@ static inline Packet *FlowForceReassemblyPseudoPacketSetup(Packet *p,
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();
Expand Down
3 changes: 3 additions & 0 deletions src/flow-timeout.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
4 changes: 2 additions & 2 deletions src/flow-worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a4fd85

Please sign in to comment.