Go to the documentation of this file.
45 p->
esph = (ESPHdr *)pkt;
47 p->
payload = (uint8_t *)pkt +
sizeof(ESPHdr);
50 p->
proto = IPPROTO_ESP;
70 if (!PacketIncreaseCheckLayers(p)) {
90 static int DecodeESPTest01(
void)
92 uint8_t raw_esp[] = { 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x08 };
117 static int DecodeESPTest02(
void)
119 uint8_t raw_esp[] = { 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x08, 0xFF, 0xFF };
145 static int DecodeESPTest03(
void)
147 uint8_t raw_esp[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
170 static int DecodeESPTest04(
void)
172 uint8_t raw_esp[] = {};
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
void DecodeESPRegisterTests(void)
void StatsIncr(ThreadVars *tv, uint16_t id)
Increments the local counter.
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
int DecodeESP(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint16_t len)
Function to decode IPSEC-ESP packets.
#define ENGINE_ISSET_EVENT(p, e)
#define FAIL_IF_NOT(expr)
Fail a test if expression evaluates to false.
#define PASS
Pass the test.
#define ESP_HEADER_LEN
size of the ESP header
Per thread variable structure.
#define ESP_GET_SPI(p)
Get the spi field off a packet.
#define ESP_GET_SEQUENCE(p)
Get the sequence field off a packet.
#define FAIL_IF(expr)
Fail a test if expression evaluates to true.
Packet * PacketGetFromAlloc(void)
Get a malloced packet.
Structure to hold thread specific data for all decode modules.
#define ENGINE_SET_INVALID_EVENT(p, e)
#define CLEAR_ESP_PACKET(p)
#define DEBUG_VALIDATE_BUG_ON(exp)
void FlowSetupPacket(Packet *p)
prepare packet for a life with flow Set PKT_WANTS_FLOW flag to incidate workers should do a flow look...