use crate::probe::{ProbeInfo, ProbeResponse};
use crate::traceroute::TracerouteError;
use std::future::Future;
use std::net::IpAddr;
use std::pin::Pin;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ProbeMode {
DgramIcmp,
WindowsIcmp,
UdpWithRecverr,
RawIcmp,
}
pub trait ProbeSocket: Send + Sync {
fn mode(&self) -> ProbeMode;
fn send_probe_and_recv(
&self,
dest: IpAddr,
probe: ProbeInfo,
) -> Pin<Box<dyn Future<Output = Result<ProbeResponse, TracerouteError>> + Send + '_>>;
fn destination_reached(&self) -> bool;
fn pending_count(&self) -> usize;
}