suricata
stream-tcp-util.c File Reference
#include "suricata-common.h"
#include "stream-tcp-reassemble.h"
#include "stream-tcp-inline.h"
#include "stream-tcp.h"
#include "stream-tcp-util.h"
#include "util-memcmp.h"
#include "util-print.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "ippair.h"
Include dependency graph for stream-tcp-util.c:

Go to the source code of this file.

Functions

void StreamTcpUTInit (TcpReassemblyThreadCtx **ra_ctx)
 
void StreamTcpUTDeinit (TcpReassemblyThreadCtx *ra_ctx)
 
void StreamTcpUTInitInline (void)
 
void StreamTcpUTSetupSession (TcpSession *ssn)
 
void StreamTcpUTClearSession (TcpSession *ssn)
 
void StreamTcpUTSetupStream (TcpStream *s, uint32_t isn)
 
void StreamTcpUTClearStream (TcpStream *s)
 
int StreamTcpUTAddPayload (ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, TcpSession *ssn, TcpStream *stream, uint32_t seq, uint8_t *payload, uint16_t len)
 wrapper for StreamTcpReassembleHandleSegmentHandleData More...
 
int StreamTcpUTAddSegmentWithPayload (ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, TcpStream *stream, uint32_t seq, uint8_t *payload, uint16_t len)
 
int StreamTcpUTAddSegmentWithByte (ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, TcpStream *stream, uint32_t seq, uint8_t byte, uint16_t len)
 
void StreamTcpUtilRegisterTests (void)
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Helper functions for the stream engine.

Definition in file stream-tcp-util.c.

Function Documentation

int StreamTcpUTAddPayload ( ThreadVars tv,
TcpReassemblyThreadCtx ra_ctx,
TcpSession ssn,
TcpStream stream,
uint32_t  seq,
uint8_t *  payload,
uint16_t  len 
)

wrapper for StreamTcpReassembleHandleSegmentHandleData

Definition at line 97 of file stream-tcp-util.c.

References StreamTcpReassembleHandleSegmentHandleData(), Packet_::tcph, UTHBuildPacketReal(), and UTHFreePacket().

Here is the call graph for this function:

int StreamTcpUTAddSegmentWithByte ( ThreadVars tv,
TcpReassemblyThreadCtx ra_ctx,
TcpStream stream,
uint32_t  seq,
uint8_t  byte,
uint16_t  len 
)
int StreamTcpUTAddSegmentWithPayload ( ThreadVars tv,
TcpReassemblyThreadCtx ra_ctx,
TcpStream stream,
uint32_t  seq,
uint8_t *  payload,
uint16_t  len 
)
void StreamTcpUTClearSession ( TcpSession ssn)

Definition at line 71 of file stream-tcp-util.c.

References TcpSession_::client, TcpSession_::server, StreamTcpSessionCleanup(), and StreamTcpUTClearStream().

Here is the call graph for this function:

void StreamTcpUTClearStream ( TcpStream s)

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

References StreamTcpStreamCleanup().

Referenced by StreamTcpUTAddSegmentWithByte(), and StreamTcpUTClearSession().

Here is the call graph for this function:

Here is the caller graph for this function:

void StreamTcpUTDeinit ( TcpReassemblyThreadCtx ra_ctx)

Definition at line 51 of file stream-tcp-util.c.

References TcpStreamCnf_::flags, stream_config, STREAMTCP_INIT_FLAG_INLINE, StreamTcpFreeConfig(), StreamTcpReassembleFreeThreadCtx(), and TRUE.

Referenced by StreamTcpUTAddSegmentWithByte().

Here is the call graph for this function:

Here is the caller graph for this function:

void StreamTcpUtilRegisterTests ( void  )

Definition at line 245 of file stream-tcp-util.c.

References UtRegisterTest().

Referenced by StreamTcpReassembleRegisterTests().

Here is the call graph for this function:

Here is the caller graph for this function:

void StreamTcpUTInit ( TcpReassemblyThreadCtx **  ra_ctx)

Definition at line 44 of file stream-tcp-util.c.

References IPPairInitConfig(), StreamTcpInitConfig(), StreamTcpReassembleInitThreadCtx(), and TRUE.

Referenced by StreamTcpUTAddSegmentWithByte().

Here is the call graph for this function:

Here is the caller graph for this function:

void StreamTcpUTInitInline ( void  )

Definition at line 58 of file stream-tcp-util.c.

References TcpStreamCnf_::flags, stream_config, and STREAMTCP_INIT_FLAG_INLINE.

void StreamTcpUTSetupSession ( TcpSession ssn)
void StreamTcpUTSetupStream ( TcpStream s,
uint32_t  isn 
)