pub struct Flow {
pub nb_pkts: u64,
pub nb_malformed_pkts: u64,
pub nb_late_start_pkts: u64,
pub nb_pkt_bytes: u64,
pub nb_payload_bytes: u64,
pub max_simult_gaps: u64,
pub data_start: u32,
pub capacity: usize,
pub chunks: Vec<Chunk>,
pub gaps: HashMap<u32, u64>,
}Expand description
A uni-directional flow.
Fields§
§nb_pkts: u64Number of packets seen for this flow, including malformed and late start segments.
- Malformed segments are defined as those that have a payload offset (start of the payload, as computed from the header length field) beyond the end of the packet buffer, or the end of the payload exceeds the end of the packet buffer.
- Late start segments are those that arrive after the first packet seen in the flow, but have an earlier sequence number. Only applies to TCP flows.
nb_malformed_pkts: u64Number of malformed packets.
nb_late_start_pkts: u64Number of late start packets.
nb_pkt_bytes: u64Number of packet bytes observed in the flow. Includes bytes from malformed segments and ethernet and ip headers.
nb_payload_bytes: u64Number of payload bytes observed in the flow. Does not include bytes from malformed segments.
max_simult_gaps: u64Maximum number of simultaneous content gaps.
A content gap is a “hole” in the TCP sequence number, indicated re-ordered or missing packets. Only applies to TCP flows.
data_start: u32Starting sequence number of the first byte in the first payload (ISN + 1). Only applies to
TCP flows, and is set to 0 for UDP.
capacity: usizeMaximum chunk capacity (the maximum number of simultaneous gaps + 1). Only applies to TCP
flows. Used to prevent resizing chunks vector.
chunks: Vec<Chunk>The set of non-overlapping content intervals. Only applies to TCP flows.
gaps: HashMap<u32, u64>Maps relative sequence number of a content gap to the number of packets observed before it is filled. Only applies to TCP flows.
Implementations§
Source§impl Flow
impl Flow
Sourcepub fn content_gaps(&self) -> u64
pub fn content_gaps(&self) -> u64
Returns the number of content gaps at the connection end.
This is not the total number of content gaps ever observed, rather, it represents the total number of gaps remaining in the final state of the connection.
Sourcepub fn missed_bytes(&self) -> u64
pub fn missed_bytes(&self) -> u64
Number of bytes missed in content gaps at connection end.
This is not the total size of all content gaps ever observed, rather, it represents the total number of missing bytes in the final state of the connection.
Sourcepub fn mean_pkts_to_fill(&self) -> Option<f64>
pub fn mean_pkts_to_fill(&self) -> Option<f64>
Returns the mean number of packet arrivals before a content gap is filled, or 0 if there
were no gaps.
Sourcepub fn median_pkts_to_fill(&self) -> Option<u64>
pub fn median_pkts_to_fill(&self) -> Option<u64>
Returns the median number of packet arrivals before a content gap is filled, or 0 if there
were no gaps.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Flow
impl RefUnwindSafe for Flow
impl Send for Flow
impl Sync for Flow
impl Unpin for Flow
impl UnwindSafe for Flow
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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