1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// SPDX-License-Identifier: MIT
/// Tunnel traffic/error counters.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[non_exhaustive]
pub struct TunnelStats {
/// Transmitted packet count.
pub tx_packets: u64,
/// Transmitted byte count.
pub tx_bytes: u64,
/// Transmit error count.
pub tx_errors: u64,
/// Received packet count.
pub rx_packets: u64,
/// Received byte count.
pub rx_bytes: u64,
/// Receive error count.
pub rx_errors: u64,
}
/// Session traffic/error counters.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[non_exhaustive]
pub struct SessionStats {
/// Transmitted packet count.
pub tx_packets: u64,
/// Transmitted byte count.
pub tx_bytes: u64,
/// Transmit error count.
pub tx_errors: u64,
/// Received packet count.
pub rx_packets: u64,
/// Received byte count.
pub rx_bytes: u64,
/// Receive error count.
pub rx_errors: u64,
/// Number of packets discarded due to sequence checks.
pub rx_seq_discards: u64,
/// Number of out-of-sequence packets.
pub rx_oos_packets: u64,
/// Number of packets discarded due to cookie mismatch.
pub rx_cookie_discards: u64,
/// Number of invalid received packets.
pub rx_invalid: u64,
}