suricata
stream-tcp-list.c File Reference
Include dependency graph for stream-tcp-list.c:

Go to the source code of this file.

Functions

void StreamTcpReassembleConfigEnableOverlapCheck (void)
 
 RB_GENERATE (TCPSEG, TcpSegment, rb, TcpSegmentCompare)
 
int TcpSegmentCompare (struct TcpSegment *a, struct TcpSegment *b)
 compare function for the Segment tree More...
 
int StreamTcpReassembleInsertSegment (ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, TcpStream *stream, TcpSegment *seg, Packet *p, uint32_t pkt_seq, uint8_t *pkt_data, uint16_t pkt_datalen)
 
void StreamTcpPruneSession (Flow *f, uint8_t flags)
 Remove idle TcpSegments from TcpSession. More...
 

Detailed Description

Segment list functions for insertions, overlap handling, removal and more.

Definition in file stream-tcp-list.c.

Function Documentation

RB_GENERATE ( TCPSEG  ,
TcpSegment  ,
rb  ,
TcpSegmentCompare   
)

Referenced by StreamTcpReassembleConfigEnableOverlapCheck().

Here is the caller graph for this function:

void StreamTcpReassembleConfigEnableOverlapCheck ( void  )

Definition at line 38 of file stream-tcp-list.c.

References RB_GENERATE(), and TcpSegmentCompare().

Referenced by DetectEngineEventRegister(), and StreamTcpAppLayerIsDisabled().

Here is the call graph for this function:

Here is the caller graph for this function:

int StreamTcpReassembleInsertSegment ( ThreadVars tv,
TcpReassemblyThreadCtx ra_ctx,
TcpStream stream,
TcpSegment seg,
Packet p,
uint32_t  pkt_seq,
uint8_t *  pkt_data,
uint16_t  pkt_datalen 
)
Return values
-1segment not inserted
Parameters
segsegment, this function takes total ownership

In case of error, this function returns the segment to the pool

Definition at line 557 of file stream-tcp-list.c.

References TcpStream_::base_seq, StreamingBuffer_::buf_offset, TcpSession_::client, TcpReassemblyThreadCtx_::counter_tcp_reass_data_normal_fail, TcpReassemblyThreadCtx_::counter_tcp_reass_data_overlap_fail, TcpReassemblyThreadCtx_::counter_tcp_reass_list_fail, TcpReassemblyThreadCtx_::counter_tcp_reass_overlap, DEBUG_VALIDATE_BUG_ON, TcpStream_::flags, TcpSession_::flags, TcpStream_::last_ack, likely, MIN, TcpStream_::min_inspect_depth, TcpSegment::payload_len, RB_FOREACH, RB_FOREACH_SAFE, RB_REMOVE, TcpStreamCnf_::reassembly_toclient_chunk_size, TcpStreamCnf_::reassembly_toserver_chunk_size, res, TcpStream_::sb, TcpSegment::sbseg, SCEnter, SCLogDebug, SCLogDebugEnabled(), SCReturnInt, TcpStream_::seg_tree, TcpSegment::seq, StatsIncr(), STREAM_APP_PROGRESS, STREAM_BASE_OFFSET, stream_config, STREAM_LOG_PROGRESS, STREAM_RAW_PROGRESS, TcpStreamCnf_::streaming_log_api, StreamingBufferSegmentIsBeforeWindow(), STREAMTCP_FLAG_APP_LAYER_DISABLED, STREAMTCP_STREAM_FLAG_DISABLE_RAW, STREAMTCP_STREAM_FLAG_GAP, STREAMTCP_STREAM_FLAG_NOREASSEMBLY, StreamTcpInlineMode(), StreamTcpIsSetStreamFlagAppProtoDetectionCompleted, StreamTcpSegmentReturntoPool(), TCP_SEG_LEN, TCP_SEG_OFFSET, TRUE, and TcpStream_::window.

Referenced by StreamTcpReassembleHandleSegmentHandleData(), StreamTcpUTAddSegmentWithByte(), and StreamTcpUTAddSegmentWithPayload().

Here is the call graph for this function:

Here is the caller graph for this function:

int TcpSegmentCompare ( struct TcpSegment a,
struct TcpSegment b 
)