pub struct ERSPANPacket<'p> { /* private fields */ }Expand description
ERSPAN packet support
ERSPAN is a Cisco proprietary feature and is available only on specific routers and switches
Implementations§
Source§impl<'a> ERSPANPacket<'a>
impl<'a> ERSPANPacket<'a>
Sourcepub fn new(packet: &[u8]) -> Option<ERSPANPacket<'_>>
pub fn new(packet: &[u8]) -> Option<ERSPANPacket<'_>>
Constructs a new ErspanPacket. If the provided buffer is less than the minimum required packet size, this will return None.
Sourcepub fn minimum_packet_size() -> usize
pub fn minimum_packet_size() -> usize
The minimum size (in bytes) a packet of this type can be. It’s based on the total size of the fixed-size fields.
Sourcepub fn get_version(&self) -> u4
pub fn get_version(&self) -> u4
Get the version field.
Sourcepub fn get_truncated(&self) -> u1
pub fn get_truncated(&self) -> u1
Get the truncated field.
Sourcepub fn get_span_id(&self) -> u10be
pub fn get_span_id(&self) -> u10be
Get the span ID field.
Trait Implementations§
Source§impl<'a> Packet for ERSPANPacket<'a>
impl<'a> Packet for ERSPANPacket<'a>
Source§impl<'p> PartialEq for ERSPANPacket<'p>
impl<'p> PartialEq for ERSPANPacket<'p>
impl<'p> StructuralPartialEq for ERSPANPacket<'p>
Auto Trait Implementations§
impl<'p> Freeze for ERSPANPacket<'p>
impl<'p> RefUnwindSafe for ERSPANPacket<'p>
impl<'p> Send for ERSPANPacket<'p>
impl<'p> Sync for ERSPANPacket<'p>
impl<'p> Unpin for ERSPANPacket<'p>
impl<'p> UnwindSafe for ERSPANPacket<'p>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more