#[non_exhaustive]pub struct CaptureCounts {
pub received: u64,
pub dropped: u64,
pub if_dropped: u64,
pub stopped_early: u64,
}Expand description
What became of the frames a capture’s BPF filter admitted, cumulative over its lifetime, and whether it lasted the scan.
dropped matters most. It counts frames that matched the filter, reached the
kernel’s buffer, and were discarded because this process did not read them in time.
A reply lost there is indistinguishable from a host that did not answer, and
retransmission does not help if the retry’s reply is lost the same way, so the
scanner has to be told.
Compare against a scanner’s own counters with care. The filters are narrow but not
private: the SYN filter admits every TCP SYN and RST crossing any captured
interface, so received includes unrelated traffic. It bounds the receive path’s
load, not the scan’s share of it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.received: u64Frames the capture accepted and handed to this process.
dropped: u64Frames discarded because the buffer was full when they arrived.
if_dropped: u64Frames discarded by the interface or its driver before the capture saw
them. Not every platform reports this, so a zero is weaker evidence here
than in dropped.
stopped_early: u64How many captures ended before they were told to.
Counted in captures, not frames. A capture whose reader stops leaves an
interface deaf for the rest of the run, and every reply that would have arrived
on it reads as a host that did not answer. Where dropped says
frames were lost, this says a link was, and the counts beside it describe less
of the network than they appear to.
A scan across eight interfaces reports how many of the eight went deaf.
Trait Implementations§
Source§impl Add for CaptureCounts
impl Add for CaptureCounts
Source§impl AddAssign for CaptureCounts
impl AddAssign for CaptureCounts
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
+= operation. Read moreSource§impl Clone for CaptureCounts
impl Clone for CaptureCounts
impl Copy for CaptureCounts
Source§impl Debug for CaptureCounts
impl Debug for CaptureCounts
Source§impl Default for CaptureCounts
impl Default for CaptureCounts
impl Eq for CaptureCounts
Source§impl From<&CaptureRecord> for CaptureCounts
impl From<&CaptureRecord> for CaptureCounts
Source§fn from(record: &CaptureRecord) -> Self
fn from(record: &CaptureRecord) -> Self
Source§impl From<CaptureCounts> for CaptureRecord
impl From<CaptureCounts> for CaptureRecord
Source§fn from(counts: CaptureCounts) -> Self
fn from(counts: CaptureCounts) -> Self
Source§impl PartialEq for CaptureCounts
impl PartialEq for CaptureCounts
impl StructuralPartialEq for CaptureCounts
Auto Trait Implementations§
impl Freeze for CaptureCounts
impl RefUnwindSafe for CaptureCounts
impl Send for CaptureCounts
impl Sync for CaptureCounts
impl Unpin for CaptureCounts
impl UnsafeUnpin for CaptureCounts
impl UnwindSafe for CaptureCounts
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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