pub struct VxlanPacket<'p> { /* private fields */ }Expand description
A structure enabling manipulation of on the wire packets
Implementations§
Source§impl<'a> VxlanPacket<'a>
impl<'a> VxlanPacket<'a>
Sourcepub fn new(packet: &[u8]) -> Option<VxlanPacket<'_>>
pub fn new(packet: &[u8]) -> Option<VxlanPacket<'_>>
Constructs a new VxlanPacket. If the provided buffer is less than the minimum required packet size, this will return None.
Sourcepub const fn minimum_packet_size() -> usize
pub const 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_flags(&self) -> u16be
pub fn get_flags(&self) -> u16be
Get the flags field. This field is always stored big-endian within the struct, but this accessor returns host order.
Sourcepub fn get_vlan_identifier(&self) -> u24be
pub fn get_vlan_identifier(&self) -> u24be
Get the vxlan_identifier field. This field is always stored big-endian within the struct, but this accessor returns host order.
Trait Implementations§
Source§impl<'a> Packet for VxlanPacket<'a>
impl<'a> Packet for VxlanPacket<'a>
Source§impl<'p> PartialEq for VxlanPacket<'p>
impl<'p> PartialEq for VxlanPacket<'p>
impl<'p> StructuralPartialEq for VxlanPacket<'p>
Auto Trait Implementations§
impl<'p> Freeze for VxlanPacket<'p>
impl<'p> RefUnwindSafe for VxlanPacket<'p>
impl<'p> Send for VxlanPacket<'p>
impl<'p> Sync for VxlanPacket<'p>
impl<'p> Unpin for VxlanPacket<'p>
impl<'p> UnwindSafe for VxlanPacket<'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