suricata
decode-ethernet.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EthernetHdr_
 

Macros

#define ETHERNET_HEADER_LEN   14
 
#define ETHERNET_DCE_HEADER_LEN   ETHERNET_HEADER_LEN + 2
 
#define ETHERNET_TYPE_PUP   0x0200 /* PUP protocol */
 
#define ETHERNET_TYPE_IP   0x0800
 
#define ETHERNET_TYPE_ARP   0x0806
 
#define ETHERNET_TYPE_BRIDGE   0x6558 /* transparant ethernet bridge (GRE) */
 
#define ETHERNET_TYPE_REVARP   0x8035
 
#define ETHERNET_TYPE_EAPOL   0x888e
 
#define ETHERNET_TYPE_IPV6   0x86dd
 
#define ETHERNET_TYPE_IPX   0x8137
 
#define ETHERNET_TYPE_PPPOE_DISC   0x8863 /* discovery stage */
 
#define ETHERNET_TYPE_PPPOE_SESS   0x8864 /* session stage */
 
#define ETHERNET_TYPE_8021AD   0x88a8
 
#define ETHERNET_TYPE_8021AH   0x88e7
 
#define ETHERNET_TYPE_8021Q   0x8100
 
#define ETHERNET_TYPE_LOOP   0x9000
 
#define ETHERNET_TYPE_8021QINQ   0x9100
 
#define ETHERNET_TYPE_ERSPAN   0x88BE
 
#define ETHERNET_TYPE_DCE
 

Functions

struct EthernetHdr_ __attribute__ ((__packed__)) EthernetHdr
 DNP3 link header. More...
 
void DecodeEthernetRegisterTests (void)
 Registers Ethernet unit tests. More...
 

Variables

uint8_t eth_dst [6]
 
uint8_t eth_src [6]
 
uint16_t eth_type
 

Detailed Description

Macro Definition Documentation

#define ETHERNET_DCE_HEADER_LEN   ETHERNET_HEADER_LEN + 2

Definition at line 30 of file decode-ethernet.h.

Referenced by DecodeEthernet().

#define ETHERNET_HEADER_LEN   14

Definition at line 27 of file decode-ethernet.h.

Referenced by DecodeEthernet(), and DecodeIPV4().

#define ETHERNET_TYPE_8021AD   0x88a8

Definition at line 43 of file decode-ethernet.h.

Referenced by DecodeVLAN().

#define ETHERNET_TYPE_8021AH   0x88e7

Definition at line 44 of file decode-ethernet.h.

Referenced by DecodeVLAN().

#define ETHERNET_TYPE_8021Q   0x8100

Definition at line 45 of file decode-ethernet.h.

#define ETHERNET_TYPE_8021QINQ   0x9100

Definition at line 47 of file decode-ethernet.h.

Referenced by __attribute__(), and DecodeEthernet().

#define ETHERNET_TYPE_ARP   0x0806

Definition at line 35 of file decode-ethernet.h.

Referenced by DecodeVLAN().

#define ETHERNET_TYPE_BRIDGE   0x6558 /* transparant ethernet bridge (GRE) */

Definition at line 36 of file decode-ethernet.h.

Referenced by DecodeGRE().

#define ETHERNET_TYPE_DCE
Value:
0x8903 /* Data center ethernet,
* Cisco Fabric Path */

Definition at line 49 of file decode-ethernet.h.

Referenced by DecodeEthernet().

#define ETHERNET_TYPE_EAPOL   0x888e

Definition at line 38 of file decode-ethernet.h.

#define ETHERNET_TYPE_ERSPAN   0x88BE

Definition at line 48 of file decode-ethernet.h.

Referenced by DecodeGRE().

#define ETHERNET_TYPE_IP   0x0800

Definition at line 34 of file decode-ethernet.h.

Referenced by DecodeEthernet(), DecodeGRE(), DecodeSll(), and DecodeVLAN().

#define ETHERNET_TYPE_IPV6   0x86dd

Definition at line 39 of file decode-ethernet.h.

Referenced by DecodeEthernet(), DecodeGRE(), DecodeSll(), and DecodeVLAN().

#define ETHERNET_TYPE_IPX   0x8137

Definition at line 40 of file decode-ethernet.h.

#define ETHERNET_TYPE_LOOP   0x9000

Definition at line 46 of file decode-ethernet.h.

#define ETHERNET_TYPE_PPPOE_DISC   0x8863 /* discovery stage */

Definition at line 41 of file decode-ethernet.h.

Referenced by DecodeEthernet(), and DecodeVLAN().

#define ETHERNET_TYPE_PPPOE_SESS   0x8864 /* session stage */

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

Referenced by DecodeEthernet(), and DecodeVLAN().

#define ETHERNET_TYPE_PUP   0x0200 /* PUP protocol */

Definition at line 33 of file decode-ethernet.h.

#define ETHERNET_TYPE_REVARP   0x8035

Definition at line 37 of file decode-ethernet.h.

Function Documentation

void DecodeEthernetRegisterTests ( void  )

Registers Ethernet unit tests.

Todo:
More Ethernet tests

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

References UtRegisterTest().

Here is the call graph for this function:

Variable Documentation

uint8_t eth_dst[6]

Definition at line 157 of file decode-ethernet.h.

uint8_t eth_src[6]

Definition at line 158 of file decode-ethernet.h.

uint16_t eth_type

Definition at line 159 of file decode-ethernet.h.