pub enum Icmpv6PacketRaw<B: SplitByteSlice> {
    DestUnreachable(IcmpPacketRaw<Ipv6, B, IcmpDestUnreachable>),
    PacketTooBig(IcmpPacketRaw<Ipv6, B, Icmpv6PacketTooBig>),
    TimeExceeded(IcmpPacketRaw<Ipv6, B, IcmpTimeExceeded>),
    ParameterProblem(IcmpPacketRaw<Ipv6, B, Icmpv6ParameterProblem>),
    EchoRequest(IcmpPacketRaw<Ipv6, B, IcmpEchoRequest>),
    EchoReply(IcmpPacketRaw<Ipv6, B, IcmpEchoReply>),
    Ndp(NdpPacketRaw<B>),
    Mld(MldPacketRaw<B>),
}Expand description
A raw ICMPv6 packet with a dynamic message type.
Unlike IcmpPacketRaw, Packet only supports ICMPv6, and does not
require a static message type. Each enum variant contains an IcmpPacketRaw
of the appropriate static type, making it easier to call parse without
knowing the message type ahead of time while still getting the benefits of a
statically-typed packet struct after parsing is complete.
Variants§
DestUnreachable(IcmpPacketRaw<Ipv6, B, IcmpDestUnreachable>)
PacketTooBig(IcmpPacketRaw<Ipv6, B, Icmpv6PacketTooBig>)
TimeExceeded(IcmpPacketRaw<Ipv6, B, IcmpTimeExceeded>)
ParameterProblem(IcmpPacketRaw<Ipv6, B, Icmpv6ParameterProblem>)
EchoRequest(IcmpPacketRaw<Ipv6, B, IcmpEchoRequest>)
EchoReply(IcmpPacketRaw<Ipv6, B, IcmpEchoReply>)
Ndp(NdpPacketRaw<B>)
Mld(MldPacketRaw<B>)
Implementations§
Source§impl<B: SplitByteSliceMut> Icmpv6PacketRaw<B>
 
impl<B: SplitByteSliceMut> Icmpv6PacketRaw<B>
Sourcepub fn try_write_checksum(&mut self, src_ip: Ipv6Addr, dst_ip: Ipv6Addr) -> bool
 
pub fn try_write_checksum(&mut self, src_ip: Ipv6Addr, dst_ip: Ipv6Addr) -> bool
Attempts to calculate and write a Checksum for this Icmpv6PacketRaw.
Returns whether the checksum was successfully calculated & written. In the false case, self is left unmodified.
Trait Implementations§
Source§impl<I: IcmpIpExt, B: SplitByteSliceMut> GenericOverIp<I> for Icmpv6PacketRaw<B>
 
impl<I: IcmpIpExt, B: SplitByteSliceMut> GenericOverIp<I> for Icmpv6PacketRaw<B>
Source§type Type = <I as IcmpIpExt>::IcmpPacketTypeRaw<B>
 
type Type = <I as IcmpIpExt>::IcmpPacketTypeRaw<B>
The type of 
Self when its IP-generic parameter is replaced with the
type NewIp.Source§impl<B: SplitByteSliceMut> IcmpPacketTypeRaw<B, Ipv6> for Icmpv6PacketRaw<B>
 
impl<B: SplitByteSliceMut> IcmpPacketTypeRaw<B, Ipv6> for Icmpv6PacketRaw<B>
Source§fn update_checksum_pseudo_header_address(
    &mut self,
    old: Ipv6Addr,
    new: Ipv6Addr,
)
 
fn update_checksum_pseudo_header_address( &mut self, old: Ipv6Addr, new: Ipv6Addr, )
Update the checksum to reflect an updated address in the pseudo header.
Source§fn update_checksum_header_field<F: IntoBytes + Immutable>(
    &mut self,
    old: F,
    new: F,
)
 
fn update_checksum_header_field<F: IntoBytes + Immutable>( &mut self, old: F, new: F, )
Update the checksum to reflect a field change in the header. Read more
Source§fn try_write_checksum(&mut self, src_addr: Ipv6Addr, dst_addr: Ipv6Addr) -> bool
 
fn try_write_checksum(&mut self, src_addr: Ipv6Addr, dst_addr: Ipv6Addr) -> bool
Recalculates and attempts to write a checksum for this packet. Read more
Source§fn message_body_mut(&mut self) -> &mut B
 
fn message_body_mut(&mut self) -> &mut B
Returns a mutable reference to the body of this packet.
Source§fn update_checksum_header_field_u16(&mut self, old: u16, new: u16)
 
fn update_checksum_header_field_u16(&mut self, old: u16, new: u16)
Like 
IcmpPacketTypeRaw::update_checksum_header_field, but takes
native endian u16s.Source§impl<B: SplitByteSlice> ParsablePacket<B, ()> for Icmpv6PacketRaw<B>
 
impl<B: SplitByteSlice> ParsablePacket<B, ()> for Icmpv6PacketRaw<B>
Source§fn parse_metadata(&self) -> ParseMetadata
 
fn parse_metadata(&self) -> ParseMetadata
Gets metadata about this packet required by 
GrowBuffer::undo_parse. Read moreSource§fn parse<BV: BufferView<B>>(buffer: BV, _args: ()) -> ParseResult<Self>
 
fn parse<BV: BufferView<B>>(buffer: BV, _args: ()) -> ParseResult<Self>
Parses a packet from a buffer. Read more
Source§fn parse_mut<BV>(buffer: BV, args: ParseArgs) -> Result<Self, Self::Error>where
    BV: BufferViewMut<B>,
    B: SplitByteSliceMut,
 
fn parse_mut<BV>(buffer: BV, args: ParseArgs) -> Result<Self, Self::Error>where
    BV: BufferViewMut<B>,
    B: SplitByteSliceMut,
Parses a packet from a mutable buffer. Read more
Auto Trait Implementations§
impl<B> Freeze for Icmpv6PacketRaw<B>where
    B: Freeze,
impl<B> RefUnwindSafe for Icmpv6PacketRaw<B>where
    B: RefUnwindSafe,
impl<B> Send for Icmpv6PacketRaw<B>where
    B: Send,
impl<B> Sync for Icmpv6PacketRaw<B>where
    B: Sync,
impl<B> Unpin for Icmpv6PacketRaw<B>where
    B: Unpin,
impl<B> UnwindSafe for Icmpv6PacketRaw<B>where
    B: UnwindSafe,
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> 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