pub enum Ipv4Option {
Show 14 variants
EndOfList,
Nop,
RecordRoute {
pointer: u8,
route: Vec<Ipv4Addr>,
},
Lsrr {
pointer: u8,
route: Vec<Ipv4Addr>,
},
Ssrr {
pointer: u8,
route: Vec<Ipv4Addr>,
},
Timestamp {
pointer: u8,
overflow: u8,
flag: u8,
data: Vec<(Option<Ipv4Addr>, u32)>,
},
Security {
security: u16,
compartment: u16,
handling_restrictions: u16,
transmission_control_code: [u8; 3],
},
StreamId {
id: u16,
},
MtuProbe {
mtu: u16,
},
MtuReply {
mtu: u16,
},
Traceroute {
id: u16,
outbound_hops: u16,
return_hops: u16,
originator: Ipv4Addr,
},
RouterAlert {
value: u16,
},
AddressExtension {
src_ext: Ipv4Addr,
dst_ext: Ipv4Addr,
},
Unknown {
option_type: u8,
data: Vec<u8>,
},
}Expand description
A parsed IP option.
Variants§
EndOfList
End of Option List (type 0)
Nop
No Operation / Padding (type 1)
RecordRoute
Record Route (type 7)
Lsrr
Loose Source and Record Route (type 131)
Ssrr
Strict Source and Record Route (type 137)
Timestamp
Internet Timestamp (type 68)
Security
Security (type 130)
StreamId
Stream ID (type 136)
MtuProbe
MTU Probe (type 11)
MtuReply
MTU Reply (type 12)
Traceroute
Traceroute (type 82)
RouterAlert
Router Alert (type 148)
AddressExtension
Address Extension (type 147)
Unknown
Unknown or unimplemented option
Implementations§
Source§impl Ipv4Option
impl Ipv4Option
Sourcepub fn option_type(&self) -> Ipv4OptionType
pub fn option_type(&self) -> Ipv4OptionType
Get the option type.
Trait Implementations§
Source§impl Clone for Ipv4Option
impl Clone for Ipv4Option
Source§fn clone(&self) -> Ipv4Option
fn clone(&self) -> Ipv4Option
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 Ipv4Option
impl Debug for Ipv4Option
Source§impl PartialEq for Ipv4Option
impl PartialEq for Ipv4Option
impl Eq for Ipv4Option
impl StructuralPartialEq for Ipv4Option
Auto Trait Implementations§
impl Freeze for Ipv4Option
impl RefUnwindSafe for Ipv4Option
impl Send for Ipv4Option
impl Sync for Ipv4Option
impl Unpin for Ipv4Option
impl UnsafeUnpin for Ipv4Option
impl UnwindSafe for Ipv4Option
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more