pub struct GENEVEPacket<'p> { /* private fields */ }
Expand description
A structure enabling manipulation of on the wire packets
Implementations§
Source§impl<'a> GENEVEPacket<'a>
impl<'a> GENEVEPacket<'a>
Sourcepub fn new(packet: &[u8]) -> Option<GENEVEPacket<'_>>
pub fn new(packet: &[u8]) -> Option<GENEVEPacket<'_>>
Constructs a new GENEVE packet. 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_stack_size(&self) -> u2
pub fn get_stack_size(&self) -> u2
The version the GENEVE tunnel header.
Sourcepub fn get_option_length(&self) -> u6
pub fn get_option_length(&self) -> u6
The length of option fields
Sourcepub fn get_control(&self) -> u1
pub fn get_control(&self) -> u1
Get control packet flag
True if packet contains a control message.
Sourcepub fn get_critical(&self) -> u1
pub fn get_critical(&self) -> u1
Get critical flag
Sourcepub fn get_reserved(&self) -> u6
pub fn get_reserved(&self) -> u6
Get reserved bits
Sourcepub fn get_protocol_type(&self) -> u16be
pub fn get_protocol_type(&self) -> u16be
Get protocol type
Sourcepub fn get_virtual_network_identifier(&self) -> u24be
pub fn get_virtual_network_identifier(&self) -> u24be
Get Virtual Network Identifier (VNI)
Sourcepub fn get_reserved2(&self) -> u8
pub fn get_reserved2(&self) -> u8
Get second reserved bits
Sourcepub fn get_options_raw(&self) -> &[u8] ⓘ
pub fn get_options_raw(&self) -> &[u8] ⓘ
Get the raw &u8 value of the options field, without copying
Sourcepub fn get_options(&self) -> Vec<GENEVEOption>
pub fn get_options(&self) -> Vec<GENEVEOption>
Get the value of the options field (copies contents)
Sourcepub fn get_options_iter(&self) -> GENEVEOptionIterable<'_> ⓘ
pub fn get_options_iter(&self) -> GENEVEOptionIterable<'_> ⓘ
Get the value of the options field as iterator
Trait Implementations§
Source§impl<'a> Packet for GENEVEPacket<'a>
impl<'a> Packet for GENEVEPacket<'a>
Source§impl<'p> PartialEq for GENEVEPacket<'p>
impl<'p> PartialEq for GENEVEPacket<'p>
impl<'p> StructuralPartialEq for GENEVEPacket<'p>
Auto Trait Implementations§
impl<'p> Freeze for GENEVEPacket<'p>
impl<'p> RefUnwindSafe for GENEVEPacket<'p>
impl<'p> Send for GENEVEPacket<'p>
impl<'p> Sync for GENEVEPacket<'p>
impl<'p> Unpin for GENEVEPacket<'p>
impl<'p> UnwindSafe for GENEVEPacket<'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