use thiserror::Error;
#[derive(Debug, Error)]
pub enum NetPulseError {
#[error("socket error: {0}")]
SocketError(#[from] std::io::Error),
#[error("probe timed out after {timeout_ms}ms")]
Timeout { timeout_ms: u64 },
#[error("failed to parse probe response: {reason}")]
ParseError { reason: String },
#[error("invalid target address '{target}': {reason}")]
InvalidTarget { target: String, reason: String },
#[error("configuration error: {0}")]
ConfigError(String),
#[error("insufficient privileges — ICMP requires root or CAP_NET_RAW")]
InsufficientPrivileges,
}