pub struct IpCounters<I: IpCountersIpExt, C: CounterRepr = Counter> {Show 28 fields
pub deliver_unicast: C,
pub deliver_multicast: C,
pub dispatch_receive_ip_packet: C,
pub dispatch_receive_ip_packet_other_host: C,
pub receive_ip_packet: C,
pub send_ip_packet: C,
pub forwarding_disabled: C,
pub forward: C,
pub no_route_to_host: C,
pub mtu_exceeded: C,
pub ttl_expired: C,
pub receive_icmp_error: C,
pub fragment_reassembly_error: C,
pub need_more_fragments: C,
pub invalid_fragment: C,
pub fragment_cache_full: C,
pub parameter_problem: C,
pub unspecified_destination: C,
pub unspecified_source: C,
pub invalid_source: C,
pub dropped: C,
pub drop_for_tentative: C,
pub tx_illegal_loopback_address: C,
pub version_rx: <I::RxCounters as CounterCollectionSpec>::CounterCollection<C>,
pub multicast_no_interest: C,
pub invalid_cached_conntrack_entry: C,
pub fragmentation: FragmentationCounters<C>,
pub socket_egress_filter_dropped: C,
}Expand description
Ip layer counters.
Fields§
§deliver_unicast: CCount of incoming IP unicast packets delivered.
deliver_multicast: CCount of incoming IP multicast packets delivered.
dispatch_receive_ip_packet: CCount of incoming IP packets that are dispatched to the appropriate protocol.
dispatch_receive_ip_packet_other_host: CCount of incoming IP packets destined to another host.
receive_ip_packet: CCount of incoming IP packets received by the stack.
send_ip_packet: CCount of sent outgoing IP packets.
forwarding_disabled: CCount of packets to be forwarded which are instead dropped because forwarding is disabled.
forward: CCount of incoming packets forwarded to another host.
no_route_to_host: CCount of incoming packets which cannot be forwarded because there is no route to the destination host.
mtu_exceeded: CCount of incoming packets which cannot be forwarded because the MTU has been exceeded.
ttl_expired: CCount of incoming packets which cannot be forwarded because the TTL has expired.
receive_icmp_error: CCount of ICMP error messages received.
fragment_reassembly_error: CCount of IP fragment reassembly errors.
need_more_fragments: CCount of IP fragments that could not be reassembled because more fragments were needed.
invalid_fragment: CCount of IP fragments that could not be reassembled because the fragment was invalid.
fragment_cache_full: CCount of IP fragments that could not be reassembled because the stack’s per-IP-protocol fragment cache was full.
parameter_problem: CCount of incoming IP packets not delivered because of a parameter problem.
unspecified_destination: CCount of incoming IP packets with an unspecified destination address.
unspecified_source: CCount of incoming IP packets with an unspecified source address.
invalid_source: CCount of incoming IP packets with an invalid source address.
See the definitions of net_types::ip::Ipv4SourceAddr and
net_types::ip::Ipv6SourceAddr for the exact requirements.
dropped: CCount of incoming IP packets dropped.
drop_for_tentative: CCount of incoming packets dropped because the destination address is only tentatively assigned to the device.
tx_illegal_loopback_address: CNumber of frames rejected because they’d cause illegal loopback addresses on the wire.
version_rx: <I::RxCounters as CounterCollectionSpec>::CounterCollection<C>Version specific rx counters.
multicast_no_interest: CCount of incoming IP multicast packets that were dropped because The stack doesn’t have any sockets that belong to the multicast group, and the stack isn’t configured to forward the multicast packet.
invalid_cached_conntrack_entry: CCount of looped-back packets that held a cached conntrack entry that could not be downcasted to the expected type. This would happen if, for example, a packet was modified to a different IP version between EGRESS and INGRESS.
fragmentation: FragmentationCounters<C>IP fragmentation counters.
socket_egress_filter_dropped: CNumber of packets filtered out by the socket egress filter.
Implementations§
Source§impl<I: IpCountersIpExt> IpCounters<I, u64>
impl<I: IpCountersIpExt> IpCounters<I, u64>
Sourcepub fn expect_dispatched(count: u64) -> Self
pub fn expect_dispatched(count: u64) -> Self
Constructs the expected counter state when the given count of IP packets have been received & dispatched.
Sourcepub fn assert_counters<D, CC: ResourceCounterContext<D, IpCounters<I>>>(
self,
core_ctx: &CC,
device: &D,
)
pub fn assert_counters<D, CC: ResourceCounterContext<D, IpCounters<I>>>( self, core_ctx: &CC, device: &D, )
Assert that the counters tracked by core_ctx match expectations.
Trait Implementations§
Source§impl<I: IpCountersIpExt, C: CounterRepr + CounterRepr> CounterCollection for IpCounters<I, C>
impl<I: IpCountersIpExt, C: CounterRepr + CounterRepr> CounterCollection for IpCounters<I, C>
Source§type Spec = IpCounters<I>
type Spec = IpCounters<I>
CounterCollectionSpec associated with this collection.Source§fn cast<C>(&self) -> <Self::Spec as CounterCollectionSpec>::CounterCollection<C>where
C: CounterRepr,
fn cast<C>(&self) -> <Self::Spec as CounterCollectionSpec>::CounterCollection<C>where
C: CounterRepr,
Source§impl<I: IpCountersIpExt> CounterCollectionSpec for IpCounters<I, Counter>
impl<I: IpCountersIpExt> CounterCollectionSpec for IpCounters<I, Counter>
Source§type CounterCollection<C: CounterRepr> = IpCounters<I, C>
type CounterCollection<C: CounterRepr> = IpCounters<I, C>
CounterCollection for this specification.Source§fn transform<C1: CounterRepr, C2: CounterRepr>(
counters: &IpCounters<I, C1>,
) -> IpCounters<I, C2>
fn transform<C1: CounterRepr, C2: CounterRepr>( counters: &IpCounters<I, C1>, ) -> IpCounters<I, C2>
Self::CounterCollection.Source§impl<I: Debug + IpCountersIpExt, C: Debug + CounterRepr> Debug for IpCounters<I, C>where
I::RxCounters: Debug,
impl<I: Debug + IpCountersIpExt, C: Debug + CounterRepr> Debug for IpCounters<I, C>where
I::RxCounters: Debug,
Source§impl<I: Default + IpCountersIpExt, C: Default + CounterRepr> Default for IpCounters<I, C>where
I::RxCounters: Default,
impl<I: Default + IpCountersIpExt, C: Default + CounterRepr> Default for IpCounters<I, C>where
I::RxCounters: Default,
Source§fn default() -> IpCounters<I, C>
fn default() -> IpCounters<I, C>
Source§impl<I: IpCountersIpExt, C: CounterRepr, IpType> GenericOverIp<IpType> for IpCounters<I, C>where
IpType: IpCountersIpExt + Ip,
impl<I: IpCountersIpExt, C: CounterRepr, IpType> GenericOverIp<IpType> for IpCounters<I, C>where
IpType: IpCountersIpExt + Ip,
Source§type Type = IpCounters<IpType, C>
type Type = IpCounters<IpType, C>
Self when its IP-generic parameter is replaced with the
type NewIp.Source§impl<I: IpCountersIpExt> Inspectable for IpCounters<I>
impl<I: IpCountersIpExt> Inspectable for IpCounters<I>
Source§impl<I: PartialEq + IpCountersIpExt, C: PartialEq + CounterRepr> PartialEq for IpCounters<I, C>where
I::RxCounters: PartialEq,
impl<I: PartialEq + IpCountersIpExt, C: PartialEq + CounterRepr> PartialEq for IpCounters<I, C>where
I::RxCounters: PartialEq,
impl<I: IpCountersIpExt, C: CounterRepr> StructuralPartialEq for IpCounters<I, C>
Auto Trait Implementations§
impl<I, C> Freeze for IpCounters<I, C>where
C: Freeze,
<<I as IpCountersIpExt>::RxCounters as CounterCollectionSpec>::CounterCollection<C>: Freeze,
impl<I, C> RefUnwindSafe for IpCounters<I, C>where
C: RefUnwindSafe,
<<I as IpCountersIpExt>::RxCounters as CounterCollectionSpec>::CounterCollection<C>: RefUnwindSafe,
impl<I, C> Send for IpCounters<I, C>where
C: Send,
<<I as IpCountersIpExt>::RxCounters as CounterCollectionSpec>::CounterCollection<C>: Send,
impl<I, C> Sync for IpCounters<I, C>where
C: Sync,
<<I as IpCountersIpExt>::RxCounters as CounterCollectionSpec>::CounterCollection<C>: Sync,
impl<I, C> Unpin for IpCounters<I, C>where
C: Unpin,
<<I as IpCountersIpExt>::RxCounters as CounterCollectionSpec>::CounterCollection<C>: Unpin,
impl<I, C> UnwindSafe for IpCounters<I, C>where
C: UnwindSafe,
<<I as IpCountersIpExt>::RxCounters as CounterCollectionSpec>::CounterCollection<C>: 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
Source§impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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