usestd::sync::{atomic::{AtomicBool, Ordering},
Arc,};/// Cooperative cancellation token for long-running PCAP capture loops.
////// This is intentionally very small and dependency-free so it can be used across
/// CLI/TUI/MCP/Tauri surfaces without pulling in additional async utilities.
#[derive(Debug, Clone, Default)]pubstructPcapCancelToken{cancelled:Arc<AtomicBool>,
}implPcapCancelToken{pubfnnew()->Self{Self{
cancelled:Arc::new(AtomicBool::new(false)),}}pubfncancel(&self){self.cancelled.store(true,Ordering::SeqCst);}pubfnis_cancelled(&self)->bool{self.cancelled.load(Ordering::SeqCst)}}