Skip to main content

NetworkStatistics

Struct NetworkStatistics 

Source
#[repr(C)]
pub struct NetworkStatistics {
Show 26 fields pub rx_total_frames: u64, pub rx_good_frames: u64, pub rx_undersize_frames: u64, pub rx_oversize_frames: u64, pub rx_dropped_frames: u64, pub rx_unicast_frames: u64, pub rx_broadcast_frames: u64, pub rx_multicast_frames: u64, pub rx_crc_error_frames: u64, pub rx_total_bytes: u64, pub tx_total_frames: u64, pub tx_good_frames: u64, pub tx_undersize_frames: u64, pub tx_oversize_frames: u64, pub tx_dropped_frames: u64, pub tx_unicast_frames: u64, pub tx_broadcast_frames: u64, pub tx_multicast_frames: u64, pub tx_crc_error_frames: u64, pub tx_total_bytes: u64, pub collisions: u64, pub unsupported_protocol: u64, pub rx_duplicated_frames: u64, pub rx_decrypt_error_frames: u64, pub tx_error_frames: u64, pub tx_retry_frames: u64,
}
Expand description

Network Statistics

The description of statistics on the network with the SNP’s statistics function is returned in this structure

Any of these statistics may or may not be available on the device. So, all the retriever functions of the statistics return None when a statistic is not supported

Fields§

§rx_total_frames: u64§rx_good_frames: u64§rx_undersize_frames: u64§rx_oversize_frames: u64§rx_dropped_frames: u64§rx_unicast_frames: u64§rx_broadcast_frames: u64§rx_multicast_frames: u64§rx_crc_error_frames: u64§rx_total_bytes: u64§tx_total_frames: u64§tx_good_frames: u64§tx_undersize_frames: u64§tx_oversize_frames: u64§tx_dropped_frames: u64§tx_unicast_frames: u64§tx_broadcast_frames: u64§tx_multicast_frames: u64§tx_crc_error_frames: u64§tx_total_bytes: u64§collisions: u64§unsupported_protocol: u64§rx_duplicated_frames: u64§rx_decrypt_error_frames: u64§tx_error_frames: u64§tx_retry_frames: u64

Implementations§

Source§

impl NetworkStatistics

Source

pub const fn rx_total_frames(&self) -> Option<u64>

The total number of frames received, including error frames and dropped frames

Source

pub const fn rx_good_frames(&self) -> Option<u64>

The total number of good frames received and copied into receive buffers

Source

pub const fn rx_undersize_frames(&self) -> Option<u64>

The number of frames below the minimum length for the communications device

Source

pub const fn rx_oversize_frames(&self) -> Option<u64>

The number of frames longer than the maximum length for the communications length device

Source

pub const fn rx_dropped_frames(&self) -> Option<u64>

The number of valid frames that were dropped because the receive buffers were full

Source

pub const fn rx_unicast_frames(&self) -> Option<u64>

The number of valid unicast frames received and not dropped

Source

pub const fn rx_broadcast_frames(&self) -> Option<u64>

The number of valid broadcast frames received and not dropped

Source

pub const fn rx_multicast_frames(&self) -> Option<u64>

The number of valid multicast frames received and not dropped

Source

pub const fn rx_crc_error_frames(&self) -> Option<u64>

Number of frames with CRC or alignment errors

Source

pub const fn rx_total_bytes(&self) -> Option<u64>

The total number of bytes received including frames with errors and dropped frames

Source

pub const fn tx_total_frames(&self) -> Option<u64>

The total number of frames transmitted including frames with errors and dropped frames

Source

pub const fn tx_good_frames(&self) -> Option<u64>

The total number of valid frames transmitted and copied into receive buffers

Source

pub const fn tx_undersize_frames(&self) -> Option<u64>

The number of frames below the minimum length for the media. This would be less than 64 for Ethernet

Source

pub const fn tx_oversize_frames(&self) -> Option<u64>

The number of frames longer than the maximum length for the media. This would be 1500 for Ethernet

Source

pub const fn tx_dropped_frames(&self) -> Option<u64>

The number of valid frames that were dropped because received buffers were full

Source

pub const fn tx_unicast_frames(&self) -> Option<u64>

The number of valid unicast frames transmitted and not dropped

Source

pub const fn tx_broadcast_frames(&self) -> Option<u64>

The number of valid broadcast frames transmitted and not dropped

Source

pub const fn tx_multicast_frames(&self) -> Option<u64>

The number of valid multicast frames transmitted and not dropped

Source

pub const fn tx_crc_error_frames(&self) -> Option<u64>

The number of transmitted frames with CRC or alignment errors

Source

pub const fn tx_total_bytes(&self) -> Option<u64>

The total number of bytes transmitted including error frames and dropped frames

Source

pub const fn collisions(&self) -> Option<u64>

The number of collisions detected on this subnet

Source

pub const fn unsupported_protocol(&self) -> Option<u64>

The number of frames destined for unsupported protocol

Source

pub const fn rx_duplicated_frames(&self) -> Option<u64>

The number of valid frames received that were duplicated

Source

pub const fn rx_decrypt_error_frames(&self) -> Option<u64>

The number of encrypted frames received that failed to decrypt

Source

pub const fn tx_error_frames(&self) -> Option<u64>

The number of frames that failed to transmit after exceeding the retry limit

Source

pub const fn tx_retry_frames(&self) -> Option<u64>

The number of frames that transmitted successfully after more than one attempt

Trait Implementations§

Source§

impl Debug for NetworkStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NetworkStatistics

Source§

fn default() -> NetworkStatistics

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for NetworkStatistics

§

impl RefUnwindSafe for NetworkStatistics

§

impl Send for NetworkStatistics

§

impl Sync for NetworkStatistics

§

impl Unpin for NetworkStatistics

§

impl UnsafeUnpin for NetworkStatistics

§

impl UnwindSafe for NetworkStatistics

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.