aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform/tun.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-25 13:33:00 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-25 13:33:00 +0100
commitf228b6f98b141940a3302d4cd1978f56f5edb13e (patch)
treef0486d26f494ce7f5d507205aa5cd475d05385c1 /src/platform/tun.rs
parentMake IO traits suitable for Tun events (up/down) (diff)
downloadwireguard-rs-f228b6f98b141940a3302d4cd1978f56f5edb13e.tar.xz
wireguard-rs-f228b6f98b141940a3302d4cd1978f56f5edb13e.zip
Enable up/down from configuration interface
Diffstat (limited to '')
-rw-r--r--src/platform/tun.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platform/tun.rs b/src/platform/tun.rs
index fda17fd..801754e 100644
--- a/src/platform/tun.rs
+++ b/src/platform/tun.rs
@@ -51,11 +51,12 @@ pub trait Reader: Send + 'static {
pub trait Tun: Send + Sync + 'static {
type Writer: Writer;
type Reader: Reader;
- type Status: Status;
type Error: Error;
}
/// On some platforms the application can create the TUN device itself.
pub trait PlatformTun: Tun {
+ type Status: Status;
+
fn create(name: &str) -> Result<(Vec<Self::Reader>, Self::Writer, Self::Status), Self::Error>;
}