aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform/tun.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/platform/tun.rs (renamed from src/wireguard/types/tun.rs)5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wireguard/types/tun.rs b/src/platform/tun.rs
index 2ba16ff..f49d4af 100644
--- a/src/wireguard/types/tun.rs
+++ b/src/platform/tun.rs
@@ -54,3 +54,8 @@ pub trait Tun: Send + Sync + 'static {
type MTU: MTU;
type Error: Error;
}
+
+/// On some platforms the application can create the TUN device itself.
+pub trait Platform: Tun {
+ fn create(name: &str) -> Result<(Vec<Self::Reader>, Self::Writer, Self::MTU), Self::Error>;
+}