Module etherparse::ether_type

source ·
Expand description

u16 constants for the most used ether_type values.

ether_type values are used in the Ethernet II header and the vlan headers to identify the next header type.

The constants are equivalent if values of the enum type EtherType get cast to a u16 value.

use etherparse::{ether_type, EtherType};

assert_eq!(ether_type::IPV4, EtherType::Ipv4 as u16);

Constants