diff --git a/src/tracing/error.rs b/src/tracing/error.rs
index 0ec8c429f..757da29ca 100644
--- a/src/tracing/error.rs
+++ b/src/tracing/error.rs
@@ -23,4 +23,6 @@ pub enum TracerError {
AddressNotAvailable(SocketAddr),
#[error("invalid source IP address: {0}")]
InvalidSourceAddr(IpAddr),
+ #[error("error: {0}")]
+ ErrorString(String),
}
diff --git a/src/tracing/net/ipv4.rs b/src/tracing/net/ipv4.rs
index 9d05fc29f..4651e9ebd 100644
--- a/src/tracing/net/ipv4.rs
+++ b/src/tracing/net/ipv4.rs
@@ -154,7 +154,8 @@ pub fn dispatch_tcp_probe(
PortDirection::FixedDest(dest_port) => (probe.sequence.0, dest_port.0),
PortDirection::FixedBoth(_, _) | PortDirection::None => unimplemented!(),
};
- let socket = platform::make_stream_socket_ipv4()?;
+ #[allow(unused_mut)]
+ let mut socket = platform::make_stream_socket_ipv4()?;
let local_addr = SocketAddr::new(IpAddr::V4(src_addr), src_port);
socket.bind(local_addr)?;
socket.set_ttl(u32::from(probe.ttl.0))?;
@@ -180,6 +181,7 @@ pub fn dispatch_tcp_probe(
Ok(socket)
}
+#[cfg(unix)]
pub fn recv_icmp_probe(
recv_socket: &mut Socket,
protocol: TracerProtocol,
@@ -204,6 +206,20 @@ pub fn recv_icmp_probe(
}
}
+#[cfg(windows)]
+pub fn recv_icmp_probe(
+ recv_socket: &mut Socket,
+ protocol: TracerProtocol,
+ multipath_strategy: MultipathStrategy,
+ direction: PortDirection,
+) -> TraceResult