Struct pcarp::block::InterfaceStatistics
source · pub struct InterfaceStatistics {
pub interface_id: u32,
pub timestamp: Timestamp,
pub isb_starttime: Option<Timestamp>,
pub isb_endtime: Option<Timestamp>,
pub isb_ifrecv: Option<u64>,
pub isb_ifdrop: Option<u64>,
pub isb_filter_accept: Option<u64>,
pub isb_osdrop: Option<u64>,
pub isb_usrdeliv: Option<u64>,
}
Expand description
Defines how to store some statistical data (e.g. packet dropped, etc) which can be useful to understand the conditions in which the capture has been made. If this appears in a file, an Interface Description Block is also required, before this block.
The Interface Statistics Block (ISB) contains the capture statistics for a given interface and it is optional. The statistics are referred to the interface defined in the current Section identified by the Interface ID field. An Interface Statistics Block is normally placed at the end of the file, but no assumptions can be taken about its position - it can even appear multiple times for the same interface.
This documentation is copyright (c) 2018 IETF Trust and the persons identified as the authors of this document. All rights reserved. Please see the linked document for the full copyright notice.
Fields§
§interface_id: u32
Specifies the interface these statistics refers to; the correct interface will be the one whose Interface Description Block (within the current Section of the file) is identified by same number (see Section 4.2) of this field.
timestamp: Timestamp
Time this statistics refers to. The format of the timestamp is the same already defined in the Enhanced Packet Block (Section 4.3).
isb_starttime: Option<Timestamp>
The isb_starttime option specifies the time the capture started; time will be stored in two blocks of four octets each. The format of the timestamp is the same as the one defined in the Enhanced Packet Block (Section 4.3); the length of a unit of time is specified by the ‘if_tsresol’ option (see Figure 10) of the Interface Description Block referenced by this packet.
isb_endtime: Option<Timestamp>
The isb_endtime option specifies the time the capture ended; time will be stored in two blocks of four octets each. The format of the timestamp is the same as the one defined in the Enhanced Packet Block (Section 4.3); the length of a unit of time is specified by the ‘if_tsresol’ option (see Figure 10) of the Interface Description Block referenced by this packet.
isb_ifrecv: Option<u64>
The isb_ifrecv option specifies the 64-bit unsigned integer number of packets received from the physical interface starting from the beginning of the capture.
isb_ifdrop: Option<u64>
The isb_ifdrop option specifies the 64-bit unsigned integer number of packets dropped by the interface due to lack of resources starting from the beginning of the capture.
isb_filter_accept: Option<u64>
The isb_filteraccept option specifies the 64-bit unsigned integer number of packets accepted by filter starting from the beginning of the capture.
isb_osdrop: Option<u64>
The isb_osdrop option specifies the 64-bit unsigned integer number of packets dropped by the operating system starting from the beginning of the capture.
isb_usrdeliv: Option<u64>
The isb_usrdeliv option specifies the 64-bit unsigned integer number of packets delivered to the user starting from the beginning of the capture. The value contained in this field can be different from the value ‘isb_filteraccept - isb_osdrop’ because some packets could still be in the OS buffers when the capture ended.
Trait Implementations§
source§impl Clone for InterfaceStatistics
impl Clone for InterfaceStatistics
source§fn clone(&self) -> InterfaceStatistics
fn clone(&self) -> InterfaceStatistics
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InterfaceStatistics
impl Debug for InterfaceStatistics
source§impl From<InterfaceStatistics> for Block
impl From<InterfaceStatistics> for Block
source§fn from(x: InterfaceStatistics) -> Self
fn from(x: InterfaceStatistics) -> Self
source§impl PartialEq<InterfaceStatistics> for InterfaceStatistics
impl PartialEq<InterfaceStatistics> for InterfaceStatistics
source§fn eq(&self, other: &InterfaceStatistics) -> bool
fn eq(&self, other: &InterfaceStatistics) -> bool
self
and other
values to be equal, and is used
by ==
.