stream-tcp-inline.c File Reference
Include dependency graph for stream-tcp-inline.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define INLINE_START(isn)
#define INLINE_END
#define INLINE_STEP(rseq, seg, seglen, buf, buflen, packet, packetlen)


void StreamTcpInlineRegisterTests (void)

Macro Definition Documentation

#define INLINE_END
#define PASS
Pass the test.
void StreamTcpUTDeinit(TcpReassemblyThreadCtx *ra_ctx)
void StreamTcpUTClearSession(TcpSession *ssn)

Definition at line 57 of file stream-tcp-inline.c.

#define INLINE_START (   isn)
Packet *p; \
TcpReassemblyThreadCtx *ra_ctx = NULL; \
memset(&tv, 0, sizeof(tv)); \
StreamTcpUTSetupStream(&ssn.server, (isn)); \
StreamTcpUTSetupStream(&ssn.client, (isn)); \
TcpStream *stream = &ssn.client;
void StreamTcpUTInit(TcpReassemblyThreadCtx **ra_ctx)
struct ThreadVars_ ThreadVars
Per thread variable structure.
struct TcpReassemblyThreadCtx_ TcpReassemblyThreadCtx
void StreamTcpUTInitInline(void)
struct TcpStream_ TcpStream
void StreamTcpUTSetupStream(TcpStream *s, uint32_t isn)
struct TcpSession_ TcpSession
void StreamTcpUTSetupSession(TcpSession *ssn)

Definition at line 41 of file stream-tcp-inline.c.

#define INLINE_STEP (   rseq,
p = UTHBuildPacketReal((uint8_t *)(seg), (seglen), IPPROTO_TCP, "", "", 1024, 80); \
FAIL_IF(p == NULL); \
p->tcph->th_seq = htonl(stream->isn + (rseq)); \
p->tcph->th_ack = htonl(31); \
FAIL_IF (StreamTcpReassembleHandleSegmentHandleData(&tv, ra_ctx, &ssn, stream, p) < 0); \
FAIL_IF (memcmp(p->payload, packet, MIN((packetlen),p->payload_len)) != 0); \
FAIL_IF(!(VALIDATE(stream, (uint8_t *)(buf), (buflen))));
#define MIN(x, y)
#define FAIL_IF(expr)
Fail a test if expression evaluates to false.
Definition: util-unittest.h:71
Packet * UTHBuildPacketReal(uint8_t *payload, uint16_t payload_len, uint8_t ipproto, const char *src, const char *dst, uint16_t sport, uint16_t dport)
UTHBuildPacketReal is a function that create tcp/udp packets for unittests specifying ip and port sou...
int StreamTcpReassembleHandleSegmentHandleData(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, TcpSession *ssn, TcpStream *stream, Packet *p)
Insert a packets TCP data into the stream reassembly engine.
void UTHFreePacket(Packet *p)
UTHFreePacket: function to release the allocated data from UTHBuildPacket and the packet itself...

Definition at line 62 of file stream-tcp-inline.c.

Function Documentation

void StreamTcpInlineRegisterTests ( void  )

Definition at line 149 of file stream-tcp-inline.c.

References UtRegisterTest().

Referenced by StreamTcpReassembleRegisterTests().

Here is the call graph for this function:

Here is the caller graph for this function: