Go to the documentation of this file.
56 if (
ConfGetBool(
"decoder.erspan.typeI.enabled", &enabled) == 1) {
57 SCLogWarning(
"ERSPAN Type I is no longer configurable and it is always"
58 " enabled; ignoring configuration setting.");
66 const uint8_t *pkt, uint32_t
len)
82 if (
len <
sizeof(ErspanHdr)) {
86 if (!PacketIncreaseCheckLayers(p)) {
90 const ErspanHdr *ehdr = (
const ErspanHdr *)pkt;
92 uint16_t vlan_id =
SCNtohs(ehdr->ver_vlan) & 0x0fff;
#define ENGINE_SET_EVENT(p, e)
void StatsIncr(ThreadVars *tv, uint16_t id)
Increments the local counter.
int DecodeERSPAN(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len)
ERSPAN Type II.
int ConfGetBool(const char *name, int *val)
Retrieve a configuration value as a boolean.
void DecodeERSPANConfig(void)
Functions to decode ERSPAN Type I and II packets.
@ ERSPAN_TOO_MANY_VLAN_LAYERS
int DecodeERSPANTypeI(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len)
ERSPAN Type I.
Per thread variable structure.
@ ERSPAN_HEADER_TOO_SMALL
#define SCLogWarning(...)
Macro used to log WARNING messages.
Structure to hold thread specific data for all decode modules.
@ ERSPAN_UNSUPPORTED_VERSION
#define VLAN_MAX_LAYER_IDX
uint16_t vlan_id[VLAN_MAX_LAYERS]
#define DEBUG_VALIDATE_BUG_ON(exp)
int DecodeEthernet(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len)