Struct packet_formats::icmp::IcmpDestUnreachable
source · #[repr(C)]pub struct IcmpDestUnreachable { /* private fields */ }
Expand description
An ICMP Destination Unreachable message.
Implementations§
source§impl IcmpDestUnreachable
impl IcmpDestUnreachable
sourcepub fn new_for_frag_req(mtu: NonZeroU16) -> Self
pub fn new_for_frag_req(mtu: NonZeroU16) -> Self
Create a new ICMP Destination Unreachable message for a message with Code = Fragmentation Required (4) which requires a next hop MTU value as defined in RFC 1191 section 4.
sourcepub fn next_hop_mtu(&self) -> Option<NonZeroU16>
pub fn next_hop_mtu(&self) -> Option<NonZeroU16>
Get the Next Hop MTU value as defined in RFC 1191 section 4.
Note, this field is considered unused in all Destination Unreachable ICMP messages, except for ICMPv4 Destination Unreachable messages with Code = Fragmentation Required (4).
Trait Implementations§
source§impl Clone for IcmpDestUnreachable
impl Clone for IcmpDestUnreachable
source§fn clone(&self) -> IcmpDestUnreachable
fn clone(&self) -> IcmpDestUnreachable
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 Debug for IcmpDestUnreachable
impl Debug for IcmpDestUnreachable
source§impl Default for IcmpDestUnreachable
impl Default for IcmpDestUnreachable
source§fn default() -> IcmpDestUnreachable
fn default() -> IcmpDestUnreachable
Returns the “default value” for a type. Read more
source§impl FromBytes for IcmpDestUnreachable
impl FromBytes for IcmpDestUnreachable
§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
Interprets the prefix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
Interprets the suffix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
Interprets the prefix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
Interprets the suffix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
source§impl FromZeros for IcmpDestUnreachable
impl FromZeros for IcmpDestUnreachable
source§impl IcmpMessage<Ipv4> for IcmpDestUnreachable
impl IcmpMessage<Ipv4> for IcmpDestUnreachable
source§const EXPECTS_BODY: bool = true
const EXPECTS_BODY: bool = true
Whether or not a message body is expected in an ICMP packet.
§type Code = Icmpv4DestUnreachableCode
type Code = Icmpv4DestUnreachableCode
The type of codes used with this message. Read more
§type Body<B: ByteSlice> = OriginalPacket<B>
type Body<B: ByteSlice> = OriginalPacket<B>
The type of the body used with this message.
source§impl IcmpMessage<Ipv6> for IcmpDestUnreachable
impl IcmpMessage<Ipv6> for IcmpDestUnreachable
source§const EXPECTS_BODY: bool = true
const EXPECTS_BODY: bool = true
Whether or not a message body is expected in an ICMP packet.
§type Code = Icmpv6DestUnreachableCode
type Code = Icmpv6DestUnreachableCode
The type of codes used with this message. Read more
§type Body<B: ByteSlice> = OriginalPacket<B>
type Body<B: ByteSlice> = OriginalPacket<B>
The type of the body used with this message.
source§impl IntoBytes for IcmpDestUnreachable
impl IntoBytes for IcmpDestUnreachable
source§impl PartialEq for IcmpDestUnreachable
impl PartialEq for IcmpDestUnreachable
source§fn eq(&self, other: &IcmpDestUnreachable) -> bool
fn eq(&self, other: &IcmpDestUnreachable) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for IcmpDestUnreachable
impl Eq for IcmpDestUnreachable
impl StructuralPartialEq for IcmpDestUnreachable
impl Unaligned for IcmpDestUnreachable
Auto Trait Implementations§
impl Freeze for IcmpDestUnreachable
impl RefUnwindSafe for IcmpDestUnreachable
impl Send for IcmpDestUnreachable
impl Sync for IcmpDestUnreachable
impl Unpin for IcmpDestUnreachable
impl UnwindSafe for IcmpDestUnreachable
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