pub struct Ipv4Options {
pub options: Vec<Ipv4Option>,
}Expand description
Collection of IP options.
Fields§
§options: Vec<Ipv4Option>Implementations§
Source§impl Ipv4Options
impl Ipv4Options
Sourcepub fn from_vec(options: Vec<Ipv4Option>) -> Self
pub fn from_vec(options: Vec<Ipv4Option>) -> Self
Create from a list of options.
Sourcepub fn padded_len(&self) -> usize
pub fn padded_len(&self) -> usize
Get the padded length (aligned to 4 bytes).
Sourcepub fn push(&mut self, option: Ipv4Option)
pub fn push(&mut self, option: Ipv4Option)
Add an option.
Sourcepub fn source_route(&self) -> Option<&Ipv4Option>
pub fn source_route(&self) -> Option<&Ipv4Option>
Get source route options (LSRR or SSRR).
Sourcepub fn final_destination(&self) -> Option<Ipv4Addr>
pub fn final_destination(&self) -> Option<Ipv4Addr>
Get the final destination from source route options.
Sourcepub fn copied_options(&self) -> Self
pub fn copied_options(&self) -> Self
Filter options that should be copied on fragmentation.
Trait Implementations§
Source§impl Clone for Ipv4Options
impl Clone for Ipv4Options
Source§fn clone(&self) -> Ipv4Options
fn clone(&self) -> Ipv4Options
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 Debug for Ipv4Options
impl Debug for Ipv4Options
Source§impl Default for Ipv4Options
impl Default for Ipv4Options
Source§fn default() -> Ipv4Options
fn default() -> Ipv4Options
Returns the “default value” for a type. Read more
Source§impl<'a> IntoIterator for &'a Ipv4Options
impl<'a> IntoIterator for &'a Ipv4Options
Source§impl IntoIterator for Ipv4Options
impl IntoIterator for Ipv4Options
Source§impl PartialEq for Ipv4Options
impl PartialEq for Ipv4Options
impl Eq for Ipv4Options
impl StructuralPartialEq for Ipv4Options
Auto Trait Implementations§
impl Freeze for Ipv4Options
impl RefUnwindSafe for Ipv4Options
impl Send for Ipv4Options
impl Sync for Ipv4Options
impl Unpin for Ipv4Options
impl UnsafeUnpin for Ipv4Options
impl UnwindSafe for Ipv4Options
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