pub struct DoubleVlanSlice<'a> {
pub outer: SingleVlanSlice<'a>,
pub inner: SingleVlanSlice<'a>,
}
Expand description
Two IEEE 802.1Q VLAN Tagging headers & payload slices (helper
struct to check vlan tagging values in a crate::SlicedPacket
).
Note that it is NOT guaranteed that the two VLAN headers directly followed each other in the original packet. In the original packet there could be another LinkExt header present in between them (e.g. a MacSec Security Tag).
Fields§
§outer: SingleVlanSlice<'a>
Outer VLAN header & payload (should include the header of inner vlan header and potentially additional link extension headers (e.g. MacSec) in between).
inner: SingleVlanSlice<'a>
Inner VLAN header & payload.
Implementations§
Source§impl<'a> DoubleVlanSlice<'a>
impl<'a> DoubleVlanSlice<'a>
Sourcepub fn to_header(&self) -> DoubleVlanHeader
pub fn to_header(&self) -> DoubleVlanHeader
Decode all the fields and copy the results to a DoubleVlanHeader struct
Sourcepub fn payload(&self) -> EtherPayloadSlice<'a>
pub fn payload(&self) -> EtherPayloadSlice<'a>
Returns the slice containing the payload & ether type identifying it’s content type after bother VLAN headers.
Sourcepub fn payload_slice(&self) -> &'a [u8] ⓘ
pub fn payload_slice(&self) -> &'a [u8] ⓘ
Returns the slice containing the payload after both VLAN headers.
Trait Implementations§
Source§impl<'a> Clone for DoubleVlanSlice<'a>
impl<'a> Clone for DoubleVlanSlice<'a>
Source§fn clone(&self) -> DoubleVlanSlice<'a>
fn clone(&self) -> DoubleVlanSlice<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more