INNER CODE UNIT · Rust
interface_drops
domcyrus/rustnet · crates/rustnet-capture/src/lib.rs:628
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::*;
#[test]
fn test_default_config() {
let config = CaptureConfig::default();
assert_eq!(config.snaplen, 1514);