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

Go to the source code of this file.

Functions

int DecodeEthernet (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len)
 
void DecodeEthernetRegisterTests (void)
 Registers Ethernet unit tests. More...
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Decode Ethernet

Definition in file decode-ethernet.c.

Function Documentation

◆ DecodeEthernet()

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

Definition at line 42 of file decode-ethernet.c.

References DecodeThreadVars_::counter_eth, DEBUG_VALIDATE_BUG_ON, dtv, ENGINE_SET_INVALID_EVENT, ETHERNET_HEADER_LEN, ETHERNET_PKT_TOO_SMALL, len, StatsIncr(), TM_ECODE_FAILED, tv, and unlikely.

Referenced by DecodeErfDag(), DecodeERSPANTypeI(), UTHBuildPacketFromEth(), and ValidateLinkType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecodeEthernetRegisterTests()

void DecodeEthernetRegisterTests ( void  )

Registers Ethernet unit tests.

Todo:
More Ethernet tests

Definition at line 176 of file decode-ethernet.c.

References UtRegisterTest().

Here is the call graph for this function: