suricata
stream-tcp.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "packet.h"
#include "decode.h"
#include "detect.h"
#include "flow.h"
#include "flow-util.h"
#include "conf.h"
#include "conf-yaml-loader.h"
#include "threads.h"
#include "threadvars.h"
#include "tm-threads.h"
#include "util-pool.h"
#include "util-pool-thread.h"
#include "util-checksum.h"
#include "util-unittest.h"
#include "util-print.h"
#include "util-debug.h"
#include "util-device.h"
#include "stream-tcp-private.h"
#include "stream-tcp.h"
#include "stream-tcp-cache.h"
#include "stream-tcp-inline.h"
#include "stream-tcp-reassemble.h"
#include "stream-tcp-sack.h"
#include "stream-tcp-util.h"
#include "stream.h"
#include "pkt-var.h"
#include "host.h"
#include "app-layer.h"
#include "app-layer-parser.h"
#include "app-layer-protos.h"
#include "app-layer-htp-mem.h"
#include "util-host-os-info.h"
#include "util-privs.h"
#include "util-profiling.h"
#include "util-misc.h"
#include "util-validate.h"
#include "util-runmodes.h"
#include "util-random.h"
#include "util-exception-policy.h"
#include "util-time.h"
#include "source-pcap-file.h"
#include "action-globals.h"
#include "tests/stream-tcp.c"
Include dependency graph for stream-tcp.c:

Go to the source code of this file.

Macros

#define STREAMTCP_DEFAULT_PREALLOC   2048
 
#define STREAMTCP_DEFAULT_MEMCAP   (64 * 1024 * 1024) /* 64mb */
 
#define STREAMTCP_DEFAULT_REASSEMBLY_MEMCAP   (256 * 1024 * 1024) /* 256mb */
 
#define STREAMTCP_DEFAULT_TOSERVER_CHUNK_SIZE   2560
 
#define STREAMTCP_DEFAULT_TOCLIENT_CHUNK_SIZE   2560
 
#define STREAMTCP_DEFAULT_MAX_SYN_QUEUED   10
 
#define STREAMTCP_DEFAULT_MAX_SYNACK_QUEUED   5
 
#define StreamTcpUpdateLastAck(ssn, stream, ack)
 macro to update last_ack only if the new value is higher More...
 
#define StreamTcpAsyncLastAckUpdate(ssn, stream)
 
#define StreamTcpUpdateNextSeq(ssn, stream, seq)
 
#define StreamTcpUpdateNextWin(ssn, stream, win)
 macro to update next_win only if the new value is higher More...
 

Functions

void StreamTcpReturnStreamSegments (TcpStream *)
 return all segments in this stream into the pool(s) More...
 
void StreamTcpInitConfig (bool quiet)
 To initialize the stream global configuration data. More...
 
int StreamTcpGetFlowState (void *)
 
void StreamTcpSetOSPolicy (TcpStream *stream, Packet *p)
 Function to set the OS policy for the given stream based on the destination of the received packet. More...
 
uint64_t StreamTcpReassembleMemuseGlobalCounter (void)
 
 SC_ATOMIC_DECLARE (uint64_t, st_memuse)
 
void StreamTcpInitMemuse (void)
 
void StreamTcpIncrMemuse (uint64_t size)
 
void StreamTcpDecrMemuse (uint64_t size)
 
uint64_t StreamTcpMemuseCounter (void)
 
int StreamTcpCheckMemcap (uint64_t size)
 Check if alloc'ing "size" would mean we're over memcap. More...
 
int StreamTcpSetMemcap (uint64_t size)
 Update memcap value. More...
 
uint64_t StreamTcpGetMemcap (void)
 Return memcap value. More...
 
void StreamTcpStreamCleanup (TcpStream *stream)
 
void StreamTcpSessionCleanup (TcpSession *ssn)
 Session cleanup function. Does not free the ssn. More...
 
void StreamTcpSessionClear (void *ssnptr)
 Function to return the stream back to the pool. It returns the segments in the stream to the segment pool. More...
 
void StreamTcpSessionPktFree (Packet *p)
 Function to return the stream segments back to the pool. More...
 
void StreamTcpFreeConfig (bool quiet)
 
int StreamTcpPacket (ThreadVars *tv, Packet *p, StreamTcpThread *stt, PacketQueueNoLock *pq)
 
bool TcpSessionPacketSsnReuse (const Packet *p, const Flow *f, const void *tcp_ssn)
 
TmEcode StreamTcp (ThreadVars *tv, Packet *p, void *data, PacketQueueNoLock *pq)
 
TmEcode StreamTcpThreadInit (ThreadVars *tv, void *initdata, void **data)
 
TmEcode StreamTcpThreadDeinit (ThreadVars *tv, void *data)
 
void StreamTcpUpdateAppLayerProgress (TcpSession *ssn, char direction, const uint32_t progress)
 update reassembly progress More...
 
void StreamTcpSetSessionNoReassemblyFlag (TcpSession *ssn, char direction)
 disable reassembly More...
 
void StreamTcpSetDisableRawReassemblyFlag (TcpSession *ssn, char direction)
 Set the No reassembly flag for the given direction in given TCP session. More...
 
void StreamTcpSetSessionBypassFlag (TcpSession *ssn)
 enable bypass More...
 
void StreamTcpDetectLogFlush (ThreadVars *tv, StreamTcpThread *stt, Flow *f, Packet *p, PacketQueueNoLock *pq)
 create packets in both directions to flush out logging and detection before switching protocols. In IDS mode, create first in packet dir, 2nd in opposing In IPS mode, do the reverse. Flag TCP engine that data needs to be inspected regardless of how far we are wrt inspect limits. More...
 
int StreamTcpSegmentForEach (const Packet *p, uint8_t flag, StreamSegmentCallback CallbackFunc, void *data)
 
int StreamTcpSegmentForSession (const Packet *p, uint8_t flag, StreamSegmentCallback CallbackFunc, void *data)
 Run callback function on each TCP segment in both directions of a session. More...
 
int StreamTcpBypassEnabled (void)
 
bool StreamTcpInlineMode (void)
 See if stream engine is operating in inline mode. More...
 
void TcpSessionSetReassemblyDepth (TcpSession *ssn, uint32_t size)
 
const char * StreamTcpStateAsString (const enum TcpState state)
 
const char * StreamTcpSsnStateAsString (const TcpSession *ssn)
 

Variables

ExceptionPolicyStatsSetts stream_memcap_eps_stats
 
ExceptionPolicyStatsSetts stream_reassembly_memcap_eps_stats
 
ExceptionPolicyStatsSetts stream_midstream_enabled_eps_stats
 
ExceptionPolicyStatsSetts stream_midstream_disabled_eps_stats
 
thread_local uint64_t t_pcapcnt
 
int g_detect_disabled
 
PoolThreadssn_pool = NULL
 
TcpStreamCnf stream_config
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t
Gurvinder Singh gurvi.nosp@m.nder.nosp@m.singh.nosp@m.dahi.nosp@m.ya@gm.nosp@m.ail..nosp@m.com

TCP stream tracking and reassembly engine.

Todo:
  • 4WHS: what if after the 2nd SYN we turn out to be normal 3WHS anyway?

Definition in file stream-tcp.c.

Macro Definition Documentation

◆ STREAMTCP_DEFAULT_MAX_SYN_QUEUED

#define STREAMTCP_DEFAULT_MAX_SYN_QUEUED   10

Definition at line 91 of file stream-tcp.c.

◆ STREAMTCP_DEFAULT_MAX_SYNACK_QUEUED

#define STREAMTCP_DEFAULT_MAX_SYNACK_QUEUED   5

Definition at line 92 of file stream-tcp.c.

◆ STREAMTCP_DEFAULT_MEMCAP

#define STREAMTCP_DEFAULT_MEMCAP   (64 * 1024 * 1024) /* 64mb */

Definition at line 87 of file stream-tcp.c.

◆ STREAMTCP_DEFAULT_PREALLOC

#define STREAMTCP_DEFAULT_PREALLOC   2048

Definition at line 86 of file stream-tcp.c.

◆ STREAMTCP_DEFAULT_REASSEMBLY_MEMCAP

#define STREAMTCP_DEFAULT_REASSEMBLY_MEMCAP   (256 * 1024 * 1024) /* 256mb */

Definition at line 88 of file stream-tcp.c.

◆ STREAMTCP_DEFAULT_TOCLIENT_CHUNK_SIZE

#define STREAMTCP_DEFAULT_TOCLIENT_CHUNK_SIZE   2560

Definition at line 90 of file stream-tcp.c.

◆ STREAMTCP_DEFAULT_TOSERVER_CHUNK_SIZE

#define STREAMTCP_DEFAULT_TOSERVER_CHUNK_SIZE   2560

Definition at line 89 of file stream-tcp.c.

◆ StreamTcpAsyncLastAckUpdate

#define StreamTcpAsyncLastAckUpdate (   ssn,
  stream 
)
Value:
{ \
if ((ssn)->flags & STREAMTCP_FLAG_ASYNC) { \
if (SEQ_GT((stream)->next_seq, (stream)->last_ack)) { \
uint32_t ack_diff = (stream)->next_seq - (stream)->last_ack; \
(stream)->last_ack += ack_diff; \
SCLogDebug("ssn %p: ASYNC last_ack set to %"PRIu32", moved %u forward", \
(ssn), (stream)->next_seq, ack_diff); \
} \
} \
}

Definition at line 996 of file stream-tcp.c.

◆ StreamTcpUpdateLastAck

#define StreamTcpUpdateLastAck (   ssn,
  stream,
  ack 
)
Value:
{ \
if (SEQ_GT((ack), (stream)->last_ack)) \
{ \
SCLogDebug("ssn %p: last_ack set to %"PRIu32", moved %u forward", (ssn), (ack), (ack) - (stream)->last_ack); \
if ((SEQ_LEQ((stream)->last_ack, (stream)->next_seq) && SEQ_GT((ack),(stream)->next_seq))) { \
SCLogDebug("last_ack just passed next_seq: %u (was %u) > %u", (ack), (stream)->last_ack, (stream)->next_seq); \
} else { \
SCLogDebug("next_seq (%u) <> last_ack now %d", (stream)->next_seq, (int)(stream)->next_seq - (ack)); \
}\
(stream)->last_ack = (ack); \
StreamTcpSackPruneList((stream)); \
} else { \
SCLogDebug("ssn %p: no update: ack %u, last_ack %"PRIu32", next_seq %u (state %u)", \
(ssn), (ack), (stream)->last_ack, (stream)->next_seq, (ssn)->state); \
}\
}

macro to update last_ack only if the new value is higher

Parameters
ssnsession
streamstream to update
ackACK value to test and set

Definition at line 979 of file stream-tcp.c.

◆ StreamTcpUpdateNextSeq

#define StreamTcpUpdateNextSeq (   ssn,
  stream,
  seq 
)
Value:
{ \
(stream)->next_seq = seq; \
SCLogDebug("ssn %p: next_seq %" PRIu32, (ssn), (stream)->next_seq); \
StreamTcpAsyncLastAckUpdate((ssn), (stream)); \
}

Definition at line 1007 of file stream-tcp.c.

◆ StreamTcpUpdateNextWin

#define StreamTcpUpdateNextWin (   ssn,
  stream,
  win 
)
Value:
{ \
uint32_t sacked_size__ = StreamTcpSackedSize((stream)); \
if (SEQ_GT(((win) + sacked_size__), (stream)->next_win)) { \
(stream)->next_win = ((win) + sacked_size__); \
SCLogDebug("ssn %p: next_win set to %"PRIu32, (ssn), (stream)->next_win); \
} \
}

macro to update next_win only if the new value is higher

Parameters
ssnsession
streamstream to update
winwindow value to test and set

Definition at line 1020 of file stream-tcp.c.

Function Documentation

◆ SC_ATOMIC_DECLARE()

SC_ATOMIC_DECLARE ( uint64_t  ,
st_memuse   
)

◆ StreamTcp()

TmEcode StreamTcp ( ThreadVars tv,
Packet p,
void *  data,
PacketQueueNoLock pq 
)

◆ StreamTcpBypassEnabled()

int StreamTcpBypassEnabled ( void  )

Definition at line 7052 of file stream-tcp.c.

References TcpStreamCnf_::flags, stream_config, and STREAMTCP_INIT_FLAG_BYPASS.

◆ StreamTcpCheckMemcap()

int StreamTcpCheckMemcap ( uint64_t  size)

Check if alloc'ing "size" would mean we're over memcap.

Return values
1if in bounds
0if not in bounds

Definition at line 266 of file stream-tcp.c.

References SC_ATOMIC_GET, and stream_config.

◆ StreamTcpDecrMemuse()

void StreamTcpDecrMemuse ( uint64_t  size)

Definition at line 234 of file stream-tcp.c.

References BUG_ON, RunmodeIsUnittests(), SC_ATOMIC_GET, SC_ATOMIC_SUB, SCLogDebug, and StreamTcpMemuseCounter().

Here is the call graph for this function:

◆ StreamTcpDetectLogFlush()

void StreamTcpDetectLogFlush ( ThreadVars tv,
StreamTcpThread stt,
Flow f,
Packet p,
PacketQueueNoLock pq 
)

create packets in both directions to flush out logging and detection before switching protocols. In IDS mode, create first in packet dir, 2nd in opposing In IPS mode, do the reverse. Flag TCP engine that data needs to be inspected regardless of how far we are wrt inspect limits.

Definition at line 6886 of file stream-tcp.c.

References TcpSession_::client, TcpStream_::flags, PKT_IS_TOSERVER, Flow_::protoctx, TcpSession_::server, STREAMTCP_STREAM_FLAG_TRIGGER_RAW, StreamTcpInlineMode(), and ts.

Here is the call graph for this function:

◆ StreamTcpFreeConfig()

void StreamTcpFreeConfig ( bool  quiet)

Definition at line 792 of file stream-tcp.c.

References SCMutexLock, and StreamTcpReassembleFree().

Referenced by StreamTcpUTDeinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamTcpGetFlowState()

int StreamTcpGetFlowState ( void *  )

◆ StreamTcpGetMemcap()

uint64_t StreamTcpGetMemcap ( void  )

Return memcap value.

Parameters
memcapmemcap value

Definition at line 294 of file stream-tcp.c.

References SC_ATOMIC_GET, and stream_config.

◆ StreamTcpIncrMemuse()

void StreamTcpIncrMemuse ( uint64_t  size)

Definition at line 228 of file stream-tcp.c.

References SC_ATOMIC_ADD, SCLogDebug, and StreamTcpMemuseCounter().

Here is the call graph for this function:

◆ StreamTcpInitConfig()

◆ StreamTcpInitMemuse()

void StreamTcpInitMemuse ( void  )

Definition at line 223 of file stream-tcp.c.

References SC_ATOMIC_INIT.

Referenced by UtRunTests().

Here is the caller graph for this function:

◆ StreamTcpInlineMode()

bool StreamTcpInlineMode ( void  )

See if stream engine is operating in inline mode.

Return values
0no
1yes

Definition at line 7063 of file stream-tcp.c.

References TcpStreamCnf_::flags, stream_config, and STREAMTCP_INIT_FLAG_INLINE.

Referenced by StreamDataRightEdge(), StreamReassembleRaw(), StreamReassembleRawHasDataReady(), and StreamTcpDetectLogFlush().

Here is the caller graph for this function:

◆ StreamTcpMemuseCounter()

uint64_t StreamTcpMemuseCounter ( void  )

Definition at line 254 of file stream-tcp.c.

References SC_ATOMIC_GET.

Referenced by StreamTcpDecrMemuse(), and StreamTcpIncrMemuse().

Here is the caller graph for this function:

◆ StreamTcpPacket()

int StreamTcpPacket ( ThreadVars tv,
Packet p,
StreamTcpThread stt,
PacketQueueNoLock pq 
)

◆ StreamTcpReassembleMemuseGlobalCounter()

uint64_t StreamTcpReassembleMemuseGlobalCounter ( void  )

Definition at line 148 of file stream-tcp-reassemble.c.

References SC_ATOMIC_GET.

Referenced by StreamTcpReassembleDecrMemuse(), and StreamTcpReassembleIncrMemuse().

Here is the caller graph for this function:

◆ StreamTcpReturnStreamSegments()

void StreamTcpReturnStreamSegments ( TcpStream stream)

return all segments in this stream into the pool(s)

Parameters
streamthe stream to cleanup

Definition at line 396 of file stream-tcp-reassemble.c.

References RB_FOREACH_SAFE, RB_REMOVE, TcpStream_::seg_tree, and StreamTcpSegmentReturntoPool().

Referenced by StreamTcpPruneSession(), StreamTcpSessionPktFree(), and StreamTcpStreamCleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamTcpSegmentForEach()

int StreamTcpSegmentForEach ( const Packet p,
uint8_t  flag,
StreamSegmentCallback  CallbackFunc,
void *  data 
)

◆ StreamTcpSegmentForSession()

int StreamTcpSegmentForSession ( const Packet p,
uint8_t  flag,
StreamSegmentCallback  CallbackFunc,
void *  data 
)

Run callback function on each TCP segment in both directions of a session.

Note
when stream engine is running in inline mode all segments are used, in IDS/non-inline mode only ack'd segments are iterated.
Must be called under flow lock.
Returns
-1 in case of error, the number of segment in case of success

Definition at line 6969 of file stream-tcp.c.

References TcpSession_::client, cnt, Packet_::flow, TcpSegment::pcap_hdr_storage, Flow_::protoctx, RB_MIN, TcpStream_::sb, TcpSegment::sbseg, SCLogDebug, SCTIME_CMP_LT, TcpStream_::seg_tree, TcpSession_::server, StreamingBufferSegmentGetData(), and TcpSegmentPcapHdrStorage_::ts.

Referenced by StreamSegmentForSession().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamTcpSessionCleanup()

void StreamTcpSessionCleanup ( TcpSession ssn)

Session cleanup function. Does not free the ssn.

Parameters
ssntcp session

Definition at line 327 of file stream-tcp.c.

References TcpSession_::client, SCEnter, TcpSession_::server, and StreamTcpStreamCleanup().

Referenced by StreamTcpSessionClear(), StreamTcpUTClearSession(), and UTHRemoveSessionFromFlow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamTcpSessionClear()

void StreamTcpSessionClear ( void *  ssnptr)

Function to return the stream back to the pool. It returns the segments in the stream to the segment pool.

This function is called when the flow is destroyed, so it should free everything related to the tcp session. So including the app layer data.

Parameters
ssnVoid ptr to the ssn.

Definition at line 351 of file stream-tcp.c.

References pool_id, TcpSession_::pool_id, SCEnter, SCMutexLock, StreamTcpSessionCleanup(), and StreamTcpThreadCacheReturnSession().

Here is the call graph for this function:

◆ StreamTcpSessionPktFree()

void StreamTcpSessionPktFree ( Packet p)

Function to return the stream segments back to the pool.

Parameters
pPacket used to identify the stream.

Definition at line 380 of file stream-tcp.c.

References TcpSession_::client, Packet_::flow, Flow_::protoctx, SCEnter, SCReturn, TcpSession_::server, and StreamTcpReturnStreamSegments().

Here is the call graph for this function:

◆ StreamTcpSetDisableRawReassemblyFlag()

void StreamTcpSetDisableRawReassemblyFlag ( TcpSession ssn,
char  direction 
)

Set the No reassembly flag for the given direction in given TCP session.

Parameters
ssnTCP Session to set the flag in
directiondirection to set the flag in: 0 toserver, 1 toclient

Definition at line 6670 of file stream-tcp.c.

References TcpSession_::client, TcpStream_::flags, TcpSession_::server, and STREAMTCP_STREAM_FLAG_NEW_RAW_DISABLED.

◆ StreamTcpSetMemcap()

int StreamTcpSetMemcap ( uint64_t  size)

Update memcap value.

Parameters
sizenew memcap value

Definition at line 279 of file stream-tcp.c.

References SC_ATOMIC_GET, SC_ATOMIC_SET, and stream_config.

◆ StreamTcpSetOSPolicy()

void StreamTcpSetOSPolicy ( TcpStream stream,
Packet p 
)

Function to set the OS policy for the given stream based on the destination of the received packet.

Parameters
streamTcpStream of which os_policy needs to set
pPacket which is used to set the os policy

Definition at line 940 of file stream-tcp.c.

Referenced by StreamTcpReassembleHandleSegmentHandleData().

Here is the caller graph for this function:

◆ StreamTcpSetSessionBypassFlag()

void StreamTcpSetSessionBypassFlag ( TcpSession ssn)

enable bypass

Parameters
ssnTCP Session to set the flag in
directiondirection to set the flag in: 0 toserver, 1 toclient

Definition at line 6681 of file stream-tcp.c.

References TcpSession_::flags, and STREAMTCP_FLAG_BYPASS.

◆ StreamTcpSetSessionNoReassemblyFlag()

void StreamTcpSetSessionNoReassemblyFlag ( TcpSession ssn,
char  direction 
)

disable reassembly

Disable app layer and set raw inspect to no longer accept new data. Stream engine will then fully disable raw after last inspection.

Parameters
ssnTCP Session to set the flag in
directiondirection to set the flag in: 0 toserver, 1 toclient

Definition at line 6654 of file stream-tcp.c.

References TcpSession_::client, TcpStream_::flags, TcpSession_::flags, TcpSession_::server, STREAMTCP_FLAG_APP_LAYER_DISABLED, and STREAMTCP_STREAM_FLAG_NEW_RAW_DISABLED.

◆ StreamTcpSsnStateAsString()

const char* StreamTcpSsnStateAsString ( const TcpSession ssn)

Definition at line 7117 of file stream-tcp.c.

References TcpSession_::state, and StreamTcpStateAsString().

Here is the call graph for this function:

◆ StreamTcpStateAsString()

const char* StreamTcpStateAsString ( const enum TcpState  state)

Definition at line 7076 of file stream-tcp.c.

References TCP_CLOSE_WAIT, TCP_CLOSED, TCP_CLOSING, TCP_ESTABLISHED, TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_LAST_ACK, TCP_NONE, TCP_SYN_RECV, TCP_SYN_SENT, and TCP_TIME_WAIT.

Referenced by StreamTcpSsnStateAsString().

Here is the caller graph for this function:

◆ StreamTcpStreamCleanup()

void StreamTcpStreamCleanup ( TcpStream stream)

Definition at line 300 of file stream-tcp.c.

References TcpStream_::sb, TcpStreamCnf_::sbcnf, stream_config, StreamingBufferClear(), StreamTcpReturnStreamSegments(), and StreamTcpSackFreeList().

Referenced by StreamTcpSessionCleanup(), and StreamTcpUTClearStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamTcpThreadDeinit()

TmEcode StreamTcpThreadDeinit ( ThreadVars tv,
void *  data 
)

Definition at line 6028 of file stream-tcp.c.

References StreamTcpThread_::ra_ctx, SCEnter, SCFree, SCReturnInt, StreamTcpReassembleFreeThreadCtx(), and TM_ECODE_OK.

Here is the call graph for this function:

◆ StreamTcpThreadInit()

◆ StreamTcpUpdateAppLayerProgress()

void StreamTcpUpdateAppLayerProgress ( TcpSession ssn,
char  direction,
const uint32_t  progress 
)

update reassembly progress

Parameters
ssnTCP Session
directiondirection to set the flag in: 0 toserver, 1 toclient

Definition at line 6634 of file stream-tcp.c.

References TcpStream_::app_progress_rel, TcpSession_::client, SCLogDebug, TcpSession_::server, and STREAM_APP_PROGRESS.

◆ TcpSessionPacketSsnReuse()

bool TcpSessionPacketSsnReuse ( const Packet p,
const Flow f,
const void *  tcp_ssn 
)

Definition at line 5887 of file stream-tcp.c.

References Packet_::proto.

◆ TcpSessionSetReassemblyDepth()

void TcpSessionSetReassemblyDepth ( TcpSession ssn,
uint32_t  size 
)

Definition at line 7069 of file stream-tcp.c.

References TcpSession_::reassembly_depth.

Variable Documentation

◆ g_detect_disabled

int g_detect_disabled

global indicating if detection is enabled

Definition at line 183 of file suricata.c.

◆ ssn_pool

PoolThread* ssn_pool = NULL

Definition at line 213 of file stream-tcp.c.

Referenced by StreamTcpThreadCacheReturnSession().

◆ stream_config

◆ stream_memcap_eps_stats

ExceptionPolicyStatsSetts stream_memcap_eps_stats
Initial value:
= {
.valid_settings_ids = {
false,
false,
true,
true,
true,
false,
false,
true,
},
.valid_settings_ips = {
false,
false,
true,
true,
true,
true,
true,
true,
},
}

Definition at line 95 of file stream-tcp.c.

Referenced by StreamTcpThreadInit().

◆ stream_midstream_disabled_eps_stats

ExceptionPolicyStatsSetts stream_midstream_disabled_eps_stats
Initial value:
= {
.valid_settings_ids = {
false,
false,
false,
true,
true,
false,
false,
true,
},
.valid_settings_ips = {
false,
false,
false,
true,
true,
false,
true,
true,
},
}

Definition at line 173 of file stream-tcp.c.

◆ stream_midstream_enabled_eps_stats

ExceptionPolicyStatsSetts stream_midstream_enabled_eps_stats
Initial value:
= {
.valid_settings_ids = {
false,
false,
false,
true,
false,
false,
false,
false,
},
.valid_settings_ips = {
false,
false,
false,
true,
false,
false,
false,
false,
},
}

Definition at line 147 of file stream-tcp.c.

◆ stream_reassembly_memcap_eps_stats

ExceptionPolicyStatsSetts stream_reassembly_memcap_eps_stats
Initial value:
= {
.valid_settings_ids = {
false,
false,
true,
true,
true,
false,
false,
true,
},
.valid_settings_ips = {
false,
false,
true,
true,
true,
true,
true,
true,
},
}

Definition at line 121 of file stream-tcp.c.

◆ t_pcapcnt

thread_local uint64_t t_pcapcnt

Definition at line 78 of file stream-tcp-reassemble.c.

Referenced by StreamTcp(), and StreamTcpReassembleCheckMemcap().

seq
uint32_t seq
Definition: stream-tcp-private.h:2
STREAMTCP_FLAG_ASYNC
#define STREAMTCP_FLAG_ASYNC
Definition: stream-tcp-private.h:182
flags
uint8_t flags
Definition: decode-gre.h:0
SEQ_GT
#define SEQ_GT(a, b)
Definition: stream-tcp-private.h:259
SEQ_LEQ
#define SEQ_LEQ(a, b)
Definition: stream-tcp-private.h:258