Struct packet_formats::icmp::IcmpParseArgs
source · 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: ByteSlice, I: IcmpIpExt, M: IcmpMessage<I>> FromRaw<IcmpPacketRaw<I, B, M>, IcmpParseArgs<<I as Ip>::Addr>> for IcmpPacket<I, B, M>
impl<B: ByteSlice, I: IcmpIpExt, M: IcmpMessage<I>> FromRaw<IcmpPacketRaw<I, B, M>, IcmpParseArgs<<I as Ip>::Addr>> for IcmpPacket<I, B, M>
§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: ByteSlice, I: IcmpIpExt, M: IcmpMessage<I>> ParsablePacket<B, IcmpParseArgs<<I as Ip>::Addr>> for IcmpPacket<I, B, M>
impl<B: ByteSlice, I: IcmpIpExt, M: IcmpMessage<I>> ParsablePacket<B, IcmpParseArgs<<I as Ip>::Addr>> for IcmpPacket<I, B, M>
§type Error = ParseError
type Error = ParseError
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: ByteSlice> ParsablePacket<B, IcmpParseArgs<Ipv4Addr>> for Icmpv4Packet<B>
impl<B: ByteSlice> ParsablePacket<B, IcmpParseArgs<Ipv4Addr>> for Icmpv4Packet<B>
§type Error = ParseError
type Error = ParseError
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: ByteSlice> ParsablePacket<B, IcmpParseArgs<Ipv6Addr>> for Icmpv6Packet<B>
impl<B: ByteSlice> ParsablePacket<B, IcmpParseArgs<Ipv6Addr>> for Icmpv6Packet<B>
§type Error = ParseError
type Error = ParseError
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: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + Freeze,
impl<A> RefUnwindSafe for IcmpParseArgs<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + RefUnwindSafe,
impl<A> Send for IcmpParseArgs<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static,
impl<A> Sync for IcmpParseArgs<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static,
impl<A> Unpin for IcmpParseArgs<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + Unpin,
impl<A> UnwindSafe for IcmpParseArgs<A>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + 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