pub struct IcmpParseArgs<A: IpAddress> { /* private fields */ }
Expand description
Arguments required to parse an ICMP packet.
Implementations§
Source§impl<A: IpAddress> IcmpParseArgs<A>
impl<A: IpAddress> IcmpParseArgs<A>
Sourcepub fn new<S: Into<A>, D: Into<A>>(src_ip: S, dst_ip: D) -> IcmpParseArgs<A>
pub fn new<S: Into<A>, D: Into<A>>(src_ip: S, dst_ip: D) -> IcmpParseArgs<A>
Construct a new IcmpParseArgs
.
Trait Implementations§
Source§impl<B: SplitByteSlice, I: IcmpIpExt, M: IcmpMessage<I>> FromRaw<IcmpPacketRaw<I, B, M>, IcmpParseArgs<<I as Ip>::Addr>> for IcmpPacket<I, B, M>
impl<B: SplitByteSlice, I: IcmpIpExt, M: IcmpMessage<I>> FromRaw<IcmpPacketRaw<I, B, M>, IcmpParseArgs<<I as Ip>::Addr>> for IcmpPacket<I, B, M>
Source§type Error = ParseError
type Error = ParseError
The type of error that may happen during validation.
Source§fn try_from_raw_with(
raw: IcmpPacketRaw<I, B, M>,
args: IcmpParseArgs<I::Addr>,
) -> ParseResult<Self>
fn try_from_raw_with( raw: IcmpPacketRaw<I, B, M>, args: IcmpParseArgs<I::Addr>, ) -> ParseResult<Self>
Attempts to create
Self
from the raw form in raw
with args
.Source§impl<B: SplitByteSlice, I: IcmpIpExt, M: IcmpMessage<I>> ParsablePacket<B, IcmpParseArgs<<I as Ip>::Addr>> for IcmpPacket<I, B, M>
impl<B: SplitByteSlice, I: IcmpIpExt, M: IcmpMessage<I>> ParsablePacket<B, IcmpParseArgs<<I as Ip>::Addr>> for IcmpPacket<I, B, M>
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<I::Addr>,
) -> ParseResult<Self>
fn parse<BV: BufferView<B>>( buffer: BV, args: IcmpParseArgs<I::Addr>, ) -> ParseResult<Self>
Parses a packet from a buffer. Read more
Source§impl<B: SplitByteSlice> ParsablePacket<B, IcmpParseArgs<Ipv4Addr>> for Icmpv4Packet<B>
impl<B: SplitByteSlice> ParsablePacket<B, IcmpParseArgs<Ipv4Addr>> for Icmpv4Packet<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<Ipv4Addr>,
) -> ParseResult<Self>
fn parse<BV: BufferView<B>>( buffer: BV, args: IcmpParseArgs<Ipv4Addr>, ) -> ParseResult<Self>
Parses a packet from a buffer. Read more
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<A> Freeze for IcmpParseArgs<A>where
A: Freeze,
impl<A> RefUnwindSafe for IcmpParseArgs<A>where
A: RefUnwindSafe,
impl<A> Send for IcmpParseArgs<A>
impl<A> Sync for IcmpParseArgs<A>
impl<A> Unpin for IcmpParseArgs<A>where
A: Unpin,
impl<A> UnwindSafe for IcmpParseArgs<A>where
A: 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