pub struct GrePacket<'a> { /* private fields */ }Expand description
Zero-copy GRE packet parser.
Implementations§
Source§impl<'a> GrePacket<'a>
impl<'a> GrePacket<'a>
pub fn new(buf: &'a [u8]) -> Option<Self>
pub fn flags(&self) -> u16
pub fn checksum_present(&self) -> bool
pub fn routing_present(&self) -> bool
pub fn key_present(&self) -> bool
pub fn sequence_present(&self) -> bool
pub fn strict_source_route(&self) -> bool
pub fn recursion_control(&self) -> u8
pub fn version(&self) -> u8
pub fn protocol_type(&self) -> EtherType
pub fn checksum(&self) -> Option<u16>
pub fn key(&self) -> Option<u32>
pub fn sequence(&self) -> Option<u32>
pub fn routing(&self) -> Option<&[u8]>
pub fn header_length(&self) -> usize
pub fn payload(&self) -> &'a [u8]
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GrePacket<'a>
impl<'a> RefUnwindSafe for GrePacket<'a>
impl<'a> Send for GrePacket<'a>
impl<'a> Sync for GrePacket<'a>
impl<'a> Unpin for GrePacket<'a>
impl<'a> UnsafeUnpin for GrePacket<'a>
impl<'a> UnwindSafe for GrePacket<'a>
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