Enum etherparse::VlanHeader
source · pub enum VlanHeader {
Single(SingleVlanHeader),
Double(DoubleVlanHeader),
}
Expand description
IEEE 802.1Q VLAN Tagging Header (can be single or double tagged).
Variants§
Single(SingleVlanHeader)
IEEE 802.1Q VLAN Tagging Header
Double(DoubleVlanHeader)
IEEE 802.1Q double VLAN Tagging Header
Implementations§
source§impl VlanHeader
impl VlanHeader
sourcepub const VLAN_ETHER_TYPES: [u16; 3] = _
pub const VLAN_ETHER_TYPES: [u16; 3] = _
All ether types that identify a vlan header.
sourcepub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), WriteError>
pub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), WriteError>
Write the IEEE 802.1Q VLAN single or double tagging header
sourcepub fn header_len(&self) -> usize
pub fn header_len(&self) -> usize
Length of the serialized header(s) in bytes.
Trait Implementations§
source§impl Clone for VlanHeader
impl Clone for VlanHeader
source§fn clone(&self) -> VlanHeader
fn clone(&self) -> VlanHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more