summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--talpid-core/src/lib.rs4
-rw-r--r--talpid-core/src/ping_monitor/mod.rs8
-rw-r--r--talpid-core/src/ping_monitor/unix.rs (renamed from talpid-core/src/tunnel/wireguard/ping_monitor.rs)0
3 files changed, 11 insertions, 1 deletions
diff --git a/talpid-core/src/lib.rs b/talpid-core/src/lib.rs
index 3324101117..cd88277d9d 100644
--- a/talpid-core/src/lib.rs
+++ b/talpid-core/src/lib.rs
@@ -23,7 +23,6 @@ mod winnet;
#[cfg(any(target_os = "linux", target_os = "macos"))]
/// Working with IP interface devices
pub mod network_interface;
-#[cfg(unix)]
/// Abstraction over operating system routing table.
pub mod routing;
@@ -60,3 +59,6 @@ mod mktemp;
/// Misc utilities for the Linux platform.
#[cfg(target_os = "linux")]
mod linux;
+
+/// A pair of functions to monitor and establish connectivity with ICMP
+mod ping_monitor;
diff --git a/talpid-core/src/ping_monitor/mod.rs b/talpid-core/src/ping_monitor/mod.rs
new file mode 100644
index 0000000000..25b33be0bb
--- /dev/null
+++ b/talpid-core/src/ping_monitor/mod.rs
@@ -0,0 +1,8 @@
+#[cfg(any(target_os = "android", target_os = "macos", target_os = "linux"))]
+#[path = "unix.rs"]
+mod imp;
+
+#[path = "win.rs"]
+mod imp;
+
+pub use imp::{monitor_ping, ping, Error};
diff --git a/talpid-core/src/tunnel/wireguard/ping_monitor.rs b/talpid-core/src/ping_monitor/unix.rs
index 9af4c3c8b1..9af4c3c8b1 100644
--- a/talpid-core/src/tunnel/wireguard/ping_monitor.rs
+++ b/talpid-core/src/ping_monitor/unix.rs