IpCounterExpectations

Type Alias IpCounterExpectations 

Source
pub type IpCounterExpectations<I> = IpCounters<I, u64>;
Expand description

Expected values of IpCounters<I>.

Aliased Type§

pub struct IpCounterExpectations<I> {
Show 28 fields pub deliver_unicast: u64, pub deliver_multicast: u64, pub dispatch_receive_ip_packet: u64, pub dispatch_receive_ip_packet_other_host: u64, pub receive_ip_packet: u64, pub send_ip_packet: u64, pub forwarding_disabled: u64, pub forward: u64, pub no_route_to_host: u64, pub mtu_exceeded: u64, pub ttl_expired: u64, pub receive_icmp_error: u64, pub fragment_reassembly_error: u64, pub need_more_fragments: u64, pub invalid_fragment: u64, pub fragment_cache_full: u64, pub parameter_problem: u64, pub unspecified_destination: u64, pub unspecified_source: u64, pub invalid_source: u64, pub dropped: u64, pub drop_for_tentative: u64, pub tx_illegal_loopback_address: u64, pub version_rx: <<I as IpCountersIpExt>::RxCounters as CounterCollectionSpec>::CounterCollection<u64>, pub multicast_no_interest: u64, pub invalid_cached_conntrack_entry: u64, pub fragmentation: FragmentationCounters<u64>, pub socket_egress_filter_dropped: u64,
}

Fields§

§deliver_unicast: u64

Count of incoming IP unicast packets delivered.

§deliver_multicast: u64

Count of incoming IP multicast packets delivered.

§dispatch_receive_ip_packet: u64

Count of incoming IP packets that are dispatched to the appropriate protocol.

§dispatch_receive_ip_packet_other_host: u64

Count of incoming IP packets destined to another host.

§receive_ip_packet: u64

Count of incoming IP packets received by the stack.

§send_ip_packet: u64

Count of sent outgoing IP packets.

§forwarding_disabled: u64

Count of packets to be forwarded which are instead dropped because forwarding is disabled.

§forward: u64

Count of incoming packets forwarded to another host.

§no_route_to_host: u64

Count of incoming packets which cannot be forwarded because there is no route to the destination host.

§mtu_exceeded: u64

Count of incoming packets which cannot be forwarded because the MTU has been exceeded.

§ttl_expired: u64

Count of incoming packets which cannot be forwarded because the TTL has expired.

§receive_icmp_error: u64

Count of ICMP error messages received.

§fragment_reassembly_error: u64

Count of IP fragment reassembly errors.

§need_more_fragments: u64

Count of IP fragments that could not be reassembled because more fragments were needed.

§invalid_fragment: u64

Count of IP fragments that could not be reassembled because the fragment was invalid.

§fragment_cache_full: u64

Count of IP fragments that could not be reassembled because the stack’s per-IP-protocol fragment cache was full.

§parameter_problem: u64

Count of incoming IP packets not delivered because of a parameter problem.

§unspecified_destination: u64

Count of incoming IP packets with an unspecified destination address.

§unspecified_source: u64

Count of incoming IP packets with an unspecified source address.

§invalid_source: u64

Count 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: u64

Count of incoming IP packets dropped.

§drop_for_tentative: u64

Count of incoming packets dropped because the destination address is only tentatively assigned to the device.

§tx_illegal_loopback_address: u64

Number of frames rejected because they’d cause illegal loopback addresses on the wire.

§version_rx: <<I as IpCountersIpExt>::RxCounters as CounterCollectionSpec>::CounterCollection<u64>

Version specific rx counters.

§multicast_no_interest: u64

Count 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: u64

Count 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<u64>

IP fragmentation counters.

§socket_egress_filter_dropped: u64

Number of packets filtered out by the socket egress filter.

Implementations§

Source§

impl<I: IpCountersIpExt> IpCounterExpectations<I>

Source

pub fn expect_dispatched(count: u64) -> Self

Constructs the expected counter state when the given count of IP packets have been received & dispatched.

Source

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.