pub struct PppPacket<'p> { /* private fields */ }
Expand description
A structure enabling manipulation of on the wire packets
Implementations§
Source§impl<'a> PppPacket<'a>
impl<'a> PppPacket<'a>
Sourcepub fn new(packet: &[u8]) -> Option<PppPacket<'_>>
pub fn new(packet: &[u8]) -> Option<PppPacket<'_>>
Constructs a new PPP 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 has_address_and_control(&self) -> bool
pub fn has_address_and_control(&self) -> bool
Return true if address and control fields are present.
These fields are always equal to 0xff03 and can be removed if Address and Control Field Compression (ACFC) is used
Sourcepub fn get_protocol(&self) -> PppProtocolType
pub fn get_protocol(&self) -> PppProtocolType
Get the protocol field.
Trait Implementations§
impl<'p> StructuralPartialEq for PppPacket<'p>
Auto Trait Implementations§
impl<'p> Freeze for PppPacket<'p>
impl<'p> RefUnwindSafe for PppPacket<'p>
impl<'p> Send for PppPacket<'p>
impl<'p> Sync for PppPacket<'p>
impl<'p> Unpin for PppPacket<'p>
impl<'p> UnwindSafe for PppPacket<'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