INNER CODE UNIT · Rust

capture_drops

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

    pub fn capture_drops(&self) -> u32 {
        self.dropped
    }

    /// Packets dropped by the network interface or its driver.
    pub fn interface_drops(&self) -> u32 {
        self.if_dropped
    }

    /// Get total packets dropped (both kernel and interface level)
    pub fn total_dropped(&self) -> u32 {
        self.dropped.saturating_add(self.if_dropped)
    }
}

#[cfg(test)]
mod tests {
    use super::*;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…