pub enum Icmpv6Packet<B: SplitByteSlice> {
DestUnreachable(IcmpPacket<Ipv6, B, IcmpDestUnreachable>),
PacketTooBig(IcmpPacket<Ipv6, B, Icmpv6PacketTooBig>),
TimeExceeded(IcmpPacket<Ipv6, B, IcmpTimeExceeded>),
ParameterProblem(IcmpPacket<Ipv6, B, Icmpv6ParameterProblem>),
EchoRequest(IcmpPacket<Ipv6, B, IcmpEchoRequest>),
EchoReply(IcmpPacket<Ipv6, B, IcmpEchoReply>),
Ndp(NdpPacket<B>),
Mld(MldPacket<B>),
}
Expand description
An ICMPv6 packet with a dynamic message type.
Unlike IcmpPacket
, Packet
only supports ICMPv6, and does not
require a static message type. Each enum variant contains an IcmpPacket
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(IcmpPacket<Ipv6, B, IcmpDestUnreachable>)
PacketTooBig(IcmpPacket<Ipv6, B, Icmpv6PacketTooBig>)
TimeExceeded(IcmpPacket<Ipv6, B, IcmpTimeExceeded>)
ParameterProblem(IcmpPacket<Ipv6, B, Icmpv6ParameterProblem>)
EchoRequest(IcmpPacket<Ipv6, B, IcmpEchoRequest>)
EchoReply(IcmpPacket<Ipv6, B, IcmpEchoReply>)
Ndp(NdpPacket<B>)
Mld(MldPacket<B>)
Trait Implementations§
Source§impl<B: SplitByteSlice + Debug> Debug for Icmpv6Packet<B>
impl<B: SplitByteSlice + Debug> Debug for Icmpv6Packet<B>
Source§impl<B: SplitByteSlice> ParsablePacket<B, IcmpParseArgs<Ipv6Addr>> for Icmpv6Packet<B>
impl<B: SplitByteSlice> ParsablePacket<B, IcmpParseArgs<Ipv6Addr>> for Icmpv6Packet<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: IcmpParseArgs<Ipv6Addr>,
) -> ParseResult<Self>
fn parse<BV: BufferView<B>>( buffer: BV, args: IcmpParseArgs<Ipv6Addr>, ) -> ParseResult<Self>
Parses a packet from a buffer. Read more
Auto Trait Implementations§
impl<B> Freeze for Icmpv6Packet<B>where
B: Freeze,
impl<B> RefUnwindSafe for Icmpv6Packet<B>where
B: RefUnwindSafe,
impl<B> Send for Icmpv6Packet<B>where
B: Send,
impl<B> Sync for Icmpv6Packet<B>where
B: Sync,
impl<B> Unpin for Icmpv6Packet<B>where
B: Unpin,
impl<B> UnwindSafe for Icmpv6Packet<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