INNER CODE UNIT · Rust

stats

domcyrus/rustnet · crates/rustnet-capture/src/lib.rs:577

    pub fn stats(&mut self) -> Result<CaptureStats> {
        let stats = self.capture.stats()?;
        let capture_stats = CaptureStats {
            received: stats.received,
            dropped: stats.dropped,
            if_dropped: stats.if_dropped,
        };

        if capture_stats.total_dropped() > 0 {
            log::debug!(
                "Total {} packets dropped (kernel: {}, interface: {})",
                capture_stats.total_dropped(),
                capture_stats.dropped,
                capture_stats.if_dropped
            );
        }

        Ok(capture_stats)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…