Struct IcmpErrorReport
pub struct IcmpErrorReport { /* private fields */ }net only.Expand description
An error reported about a packet a host sent: by an ICMP message from the network, or by the local stack.
ICMP is not authenticated and is trivially spoofed (RFC 5927): a report is a hint about the path, never evidence that a peer or connection is gone.
Implementations§
§impl IcmpErrorReport
impl IcmpErrorReport
pub const fn icmpv4(icmp_type: u8, code: u8, mtu: u32) -> IcmpErrorReport
pub const fn icmpv4(icmp_type: u8, code: u8, mtu: u32) -> IcmpErrorReport
A report carried by an ICMP (IPv4) message; mtu as IcmpErrorKind::from_icmpv4.
pub const fn icmpv6(icmp_type: u8, code: u8, mtu: u32) -> IcmpErrorReport
pub const fn icmpv6(icmp_type: u8, code: u8, mtu: u32) -> IcmpErrorReport
A report carried by an ICMPv6 message; mtu as IcmpErrorKind::from_icmpv6.
pub const fn local(kind: Option<IcmpErrorKind>) -> IcmpErrorReport
pub const fn local(kind: Option<IcmpErrorKind>) -> IcmpErrorReport
A report the local stack made about a packet it refused to send.
pub const fn origin(&self) -> IcmpErrorOrigin
pub const fn origin(&self) -> IcmpErrorOrigin
Where the report came from.
pub const fn kind(&self) -> Option<IcmpErrorKind>
pub const fn kind(&self) -> Option<IcmpErrorKind>
What the report says, when it is a condition IcmpErrorKind models.
pub const fn destination(&self) -> Option<SocketAddress>
pub const fn destination(&self) -> Option<SocketAddress>
The destination of the packet the report is about, when known.
pub const fn reporter(&self) -> Option<IpAddr>
pub const fn reporter(&self) -> Option<IpAddr>
The node that sent the report, a router or the destination host, when known.
pub fn with_destination(self, destination: SocketAddress) -> IcmpErrorReport
pub fn with_destination(self, destination: SocketAddress) -> IcmpErrorReport
Set the destination of the packet the report is about.
pub fn set_destination(
&mut self,
destination: SocketAddress,
) -> &mut IcmpErrorReport
pub fn set_destination( &mut self, destination: SocketAddress, ) -> &mut IcmpErrorReport
Set the destination of the packet the report is about.
pub fn with_reporter(self, reporter: IpAddr) -> IcmpErrorReport
pub fn with_reporter(self, reporter: IpAddr) -> IcmpErrorReport
Set the node that sent the report.
pub fn set_reporter(&mut self, reporter: IpAddr) -> &mut IcmpErrorReport
pub fn set_reporter(&mut self, reporter: IpAddr) -> &mut IcmpErrorReport
Set the node that sent the report.
Trait Implementations§
§impl Clone for IcmpErrorReport
impl Clone for IcmpErrorReport
§fn clone(&self) -> IcmpErrorReport
fn clone(&self) -> IcmpErrorReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for IcmpErrorReport
§impl Debug for IcmpErrorReport
impl Debug for IcmpErrorReport
impl Eq for IcmpErrorReport
§impl PartialEq for IcmpErrorReport
impl PartialEq for IcmpErrorReport
impl StructuralPartialEq for IcmpErrorReport
Auto Trait Implementations§
impl Forget for IcmpErrorReport
impl Freeze for IcmpErrorReport
impl Move for IcmpErrorReport
impl RefUnwindSafe for IcmpErrorReport
impl Send for IcmpErrorReport
impl Sync for IcmpErrorReport
impl Unpin for IcmpErrorReport
impl UnsafeUnpin for IcmpErrorReport
impl UnwindSafe for IcmpErrorReport
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more