suricata
|
#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"
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) |
Helper functions for the stream engine.
Definition in file stream-tcp-util.c.
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 PacketL4::hdrs, Packet_::l4, len, seq, StreamTcpReassembleHandleSegmentHandleData(), PacketL4::L4Hdrs::tcph, TCPHdr_::th_ack, TCPHdr_::th_seq, tv, UTHBuildPacketReal(), and UTHFreePacket().
int StreamTcpUTAddSegmentWithByte | ( | ThreadVars * | tv, |
TcpReassemblyThreadCtx * | ra_ctx, | ||
TcpStream * | stream, | ||
uint32_t | seq, | ||
uint8_t | byte, | ||
uint16_t | len | ||
) |
Definition at line 136 of file stream-tcp-util.c.
References PacketL4::hdrs, Packet_::l4, len, Packet_::payload, Packet_::payload_len, seq, TcpSegment::seq, StreamTcpGetSegment(), StreamTcpReassembleInsertSegment(), TCP_SEG_LEN, PacketL4::L4Hdrs::tcph, TCPHdr_::th_seq, tv, UTHBuildPacketReal(), and UTHFreePacket().
int StreamTcpUTAddSegmentWithPayload | ( | ThreadVars * | tv, |
TcpReassemblyThreadCtx * | ra_ctx, | ||
TcpStream * | stream, | ||
uint32_t | seq, | ||
uint8_t * | payload, | ||
uint16_t | len | ||
) |
Definition at line 113 of file stream-tcp-util.c.
References PacketL4::hdrs, Packet_::l4, len, Packet_::payload, Packet_::payload_len, seq, TcpSegment::seq, StreamTcpGetSegment(), StreamTcpReassembleInsertSegment(), TCP_SEG_LEN, PacketL4::L4Hdrs::tcph, TCPHdr_::th_seq, tv, UTHBuildPacketReal(), and UTHFreePacket().
void StreamTcpUTClearSession | ( | TcpSession * | ssn | ) |
Definition at line 71 of file stream-tcp-util.c.
References TcpSession_::client, TcpSession_::server, StreamTcpSessionCleanup(), and StreamTcpUTClearStream().
void StreamTcpUTClearStream | ( | TcpStream * | s | ) |
Definition at line 91 of file stream-tcp-util.c.
References StreamTcpStreamCleanup().
Referenced by StreamTcpUTClearSession().
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(), and StreamTcpReassembleFreeThreadCtx().
void StreamTcpUtilRegisterTests | ( | void | ) |
Definition at line 245 of file stream-tcp-util.c.
References UtRegisterTest().
void StreamTcpUTInit | ( | TcpReassemblyThreadCtx ** | ra_ctx | ) |
Definition at line 44 of file stream-tcp-util.c.
References IPPairInitConfig(), StreamTcpInitConfig(), and StreamTcpReassembleInitThreadCtx().
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 | ) |
Definition at line 62 of file stream-tcp-util.c.
References TcpSession_::client, TcpStream_::sb, TcpSession_::server, and STREAMING_BUFFER_INITIALIZER.
void StreamTcpUTSetupStream | ( | TcpStream * | s, |
uint32_t | isn | ||
) |
Definition at line 79 of file stream-tcp-util.c.
References TcpStream_::base_seq, TcpStream_::isn, TcpStream_::sb, STREAMING_BUFFER_INITIALIZER, and STREAMTCP_SET_RA_BASE_SEQ.