suricata
decode-gre.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "decode.h"
#include "decode-events.h"
#include "decode-gre.h"
#include "util-validate.h"
#include "util-unittest.h"
#include "util-debug.h"
Include dependency graph for decode-gre.c:

Go to the source code of this file.

Functions

int DecodeGRE (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len)
 Function to decode GRE packets. More...
 
void DecodeGRERegisterTests (void)
 this function registers unit tests for GRE decoder More...
 

Detailed Description

Author
Breno Silva breno.nosp@m..sil.nosp@m.va@gm.nosp@m.ail..nosp@m.com

Decodes GRE

Definition in file decode-gre.c.

Function Documentation

◆ DecodeGRE()

int DecodeGRE ( ThreadVars tv,
DecodeThreadVars dtv,
Packet p,
const uint8_t *  pkt,
uint32_t  len 
)

Function to decode GRE packets.

Todo:
We need to make sure this does not allow bypassing inspection. A server may just ignore these and continue processing the packet, but we will not look further into it.
Todo:
We need to make sure this does not allow bypassing inspection. A server may just ignore these and continue processing the packet, but we will not look further into it.

Definition at line 47 of file decode-gre.c.

References DecodeThreadVars_::counter_gre, DEBUG_VALIDATE_BUG_ON, dtv, ENGINE_SET_INVALID_EVENT, GRE_HDR_LEN, GRE_PKT_TOO_SMALL, len, StatsIncr(), TM_ECODE_FAILED, and tv.

Here is the call graph for this function:

◆ DecodeGRERegisterTests()

void DecodeGRERegisterTests ( void  )

this function registers unit tests for GRE decoder

Definition at line 385 of file decode-gre.c.

References UtRegisterTest().

Here is the call graph for this function: