reputation.c File Reference
Include dependency graph for reputation.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define TEST_INIT
#define TEST_CLEANUP   DetectEngineCtxFree(de_ctx);


void SCReputationRegisterTests (void)

Macro Definition Documentation

#define TEST_CLEANUP   DetectEngineCtxFree(de_ctx);

Definition at line 47 of file reputation.c.

Definition: reputation.c:47
void UTHFreePacket(Packet *p)
UTHFreePacket: function to release the allocated data from UTHBuildPacket and the packet itself...

Definition at line 50 of file reputation.c.

#define TEST_INIT
FAIL_IF(de_ctx == NULL); \
SRepInit(de_ctx); \
uint8_t cat = 0, value = 0;
int SRepInit(DetectEngineCtx *de_ctx)
init reputation
Definition: reputation.c:579
#define FAIL_IF(expr)
Fail a test if expression evaluates to false.
Definition: util-unittest.h:71
main detection engine ctx
Definition: detect.h:724
struct Address_ Address
DetectEngineCtx * DetectEngineCtxInit(void)
Giuseppe Longo

Definition at line 31 of file reputation.c.

#define TEST_INIT_WITH_PACKET (   ip)
uint8_t *buf = (uint8_t *)"Hi all!"; \
uint16_t buflen = strlen((char *)buf); \
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP); \
FAIL_IF(p == NULL); \
p->src.addr_data32[0] = UTHSetIPv4Address(ip); \
uint32_t UTHSetIPv4Address(const char *str)
return the uint32_t for a ipv4 address string
#define FAIL_IF(expr)
Fail a test if expression evaluates to false.
Definition: util-unittest.h:71
Packet * UTHBuildPacket(uint8_t *payload, uint16_t payload_len, uint8_t ipproto)
UTHBuildPacket is a wrapper that build packets with default ip and port fields.
struct Packet_ Packet
#define TEST_INIT
Definition: reputation.c:31

Definition at line 39 of file reputation.c.

Function Documentation

void SCReputationRegisterTests ( void  )

Register the following unittests for the Reputation module

Definition at line 147 of file reputation.c.

References UtRegisterTest().

Here is the call graph for this function: