Go to the documentation of this file.
45 (void)PacketSetESP(p, pkt);
47 p->
payload = (uint8_t *)pkt +
sizeof(ESPHdr);
50 p->
proto = IPPROTO_ESP;
70 if (!PacketIncreaseCheckLayers(p)) {
91 static int DecodeESPTest01(
void)
93 uint8_t raw_esp[] = { 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x08 };
118 static int DecodeESPTest02(
void)
120 uint8_t raw_esp[] = { 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x08, 0xFF, 0xFF };
146 static int DecodeESPTest03(
void)
148 uint8_t raw_esp[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
171 static int DecodeESPTest04(
void)
173 uint8_t raw_esp[] = {};
#define ESP_GET_SPI(esph)
Get the spi field off a packet.
#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 ESP_GET_SEQUENCE(esph)
Get the sequence field off a packet.
#define PASS
Pass the test.
#define ESP_HEADER_LEN
size of the ESP header
Per thread variable structure.
#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 DEBUG_VALIDATE_BUG_ON(exp)
void FlowSetupPacket(Packet *p)
prepare packet for a life with flow Set PKT_WANTS_FLOW flag to indicate workers should do a flow look...