pub struct Ipv4HeaderOpt<'a> {
pub header: &'a Ipv4Header,
pub raw_options: &'a [u8],
}Expand description
IPv4 Header with options
Fields§
§header: &'a Ipv4Header§raw_options: &'a [u8]Implementations§
Source§impl<'a> Ipv4HeaderOpt<'a>
impl<'a> Ipv4HeaderOpt<'a>
Sourcepub fn options(&'a self) -> Ipv4OptionsIter<'a> ⓘ
pub fn options(&'a self) -> Ipv4OptionsIter<'a> ⓘ
Get IPv4 options iterator
Methods from Deref<Target = Ipv4Header>§
pub fn dscp(&self) -> u8
pub fn ecn(&self) -> u8
pub fn version(&self) -> u8
pub fn ihl(&self) -> u8
pub fn flags(&self) -> u8
pub fn fragment_offset(&self) -> u16
pub fn has_dont_fragment(&self) -> bool
pub fn has_more_fragment(&self) -> bool
pub fn has_reserved_flag(&self) -> bool
pub fn is_fragmenting(&self) -> bool
pub fn is_first_fragment(&self) -> bool
pub fn is_last_fragment(&self) -> bool
pub fn total_length(&self) -> usize
pub fn ttl(&self) -> u8
pub fn protocol(&self) -> IpProto
pub fn src_ip(&self) -> Ipv4Addr
pub fn dst_ip(&self) -> Ipv4Addr
pub fn src_ip_raw(&self) -> [u8; 4]
pub fn dst_ip_raw(&self) -> [u8; 4]
Sourcepub fn has_options(&self) -> bool
pub fn has_options(&self) -> bool
Returns the options slice if present Options length = (ihl * 4) - 20
pub fn id(&self) -> u16
Trait Implementations§
Source§impl<'a> Clone for Ipv4HeaderOpt<'a>
impl<'a> Clone for Ipv4HeaderOpt<'a>
Source§fn clone(&self) -> Ipv4HeaderOpt<'a>
fn clone(&self) -> Ipv4HeaderOpt<'a>
Returns a duplicate 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 Ipv4HeaderOpt<'a>
impl<'a> Debug for Ipv4HeaderOpt<'a>
Source§impl Deref for Ipv4HeaderOpt<'_>
impl Deref for Ipv4HeaderOpt<'_>
Auto Trait Implementations§
impl<'a> Freeze for Ipv4HeaderOpt<'a>
impl<'a> RefUnwindSafe for Ipv4HeaderOpt<'a>
impl<'a> Send for Ipv4HeaderOpt<'a>
impl<'a> Sync for Ipv4HeaderOpt<'a>
impl<'a> Unpin for Ipv4HeaderOpt<'a>
impl<'a> UnsafeUnpin for Ipv4HeaderOpt<'a>
impl<'a> UnwindSafe for Ipv4HeaderOpt<'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