Struct etherparse::LinuxSllHeaderSlice
source · 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 copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
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>
source§fn eq(&self, other: &LinuxSllHeaderSlice<'a>) -> bool
fn eq(&self, other: &LinuxSllHeaderSlice<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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