pub struct LinuxSllHeaderSlice<'a> { /* private fields */ }
Expand description
A slice containing an Linux Cooked Capture (SLL) header of a network package.
Implementations§
Source§impl<'a> LinuxSllHeaderSlice<'a>
impl<'a> LinuxSllHeaderSlice<'a>
Sourcepub fn from_slice(
slice: &'a [u8],
) -> Result<LinuxSllHeaderSlice<'a>, HeaderSliceError>
pub fn from_slice( slice: &'a [u8], ) -> Result<LinuxSllHeaderSlice<'a>, HeaderSliceError>
Creates a SLL header slice from an other slice.
Sourcepub fn packet_type(&self) -> LinuxSllPacketType
pub fn packet_type(&self) -> LinuxSllPacketType
Read the packet type field.
Sourcepub fn arp_hardware_type(&self) -> ArpHardwareId
pub fn arp_hardware_type(&self) -> ArpHardwareId
Read the arp hardware type field
Sourcepub fn sender_address_valid_length(&self) -> u16
pub fn sender_address_valid_length(&self) -> u16
Read the link layer address length field.
Sourcepub fn sender_address_full(&self) -> [u8; 8]
pub fn sender_address_full(&self) -> [u8; 8]
Read the link layer address field. Only the first
LinuxSllHeaderSlice::link_layer_address_length
bytes are meaningful
Sourcepub fn sender_address(&self) -> &'a [u8] ⓘ
pub fn sender_address(&self) -> &'a [u8] ⓘ
Get the meaningful bytes of the slice of the link layer address
Sourcepub fn protocol_type(&self) -> LinuxSllProtocolType
pub fn protocol_type(&self) -> LinuxSllProtocolType
Read the protocol type field
Sourcepub fn to_header(&self) -> LinuxSllHeader
pub fn to_header(&self) -> LinuxSllHeader
Decode all the fields and copy the results to a LinuxSllHeader
struct
Trait Implementations§
Source§impl<'a> Clone for LinuxSllHeaderSlice<'a>
impl<'a> Clone for LinuxSllHeaderSlice<'a>
Source§fn clone(&self) -> LinuxSllHeaderSlice<'a>
fn clone(&self) -> LinuxSllHeaderSlice<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for LinuxSllHeaderSlice<'a>
impl<'a> Debug for LinuxSllHeaderSlice<'a>
Source§impl<'a> PartialEq for LinuxSllHeaderSlice<'a>
impl<'a> PartialEq for LinuxSllHeaderSlice<'a>
impl<'a> Eq for LinuxSllHeaderSlice<'a>
impl<'a> StructuralPartialEq for LinuxSllHeaderSlice<'a>
Auto Trait Implementations§
impl<'a> Freeze for LinuxSllHeaderSlice<'a>
impl<'a> RefUnwindSafe for LinuxSllHeaderSlice<'a>
impl<'a> Send for LinuxSllHeaderSlice<'a>
impl<'a> Sync for LinuxSllHeaderSlice<'a>
impl<'a> Unpin for LinuxSllHeaderSlice<'a>
impl<'a> UnwindSafe for LinuxSllHeaderSlice<'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