aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-17 16:31:08 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-17 16:31:08 +0200
commit78ab1a93e6d519bf404fbe61fc7ec3c3ab35a72a (patch)
tree75106e1ff89a03a6869184994b902a70315dfc30 /src/platform
parentBegin drafting cross-platform interface (diff)
downloadwireguard-rs-78ab1a93e6d519bf404fbe61fc7ec3c3ab35a72a.tar.xz
wireguard-rs-78ab1a93e6d519bf404fbe61fc7ec3c3ab35a72a.zip
Remove peer from cryptkey router on drop
Diffstat (limited to '')
-rw-r--r--src/platform/tun.rs10
-rw-r--r--src/platform/udp.rs11
2 files changed, 0 insertions, 21 deletions
diff --git a/src/platform/tun.rs b/src/platform/tun.rs
deleted file mode 100644
index 45fd591..0000000
--- a/src/platform/tun.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-use std::sync::atomic::AtomicUsize;
-use std::sync::Arc;
-
-pub trait Tun: Send + Sync {
- type Error;
-
- fn new(mtu: Arc<AtomicUsize>) -> Self;
- fn read(&self, dst: &mut [u8]) -> Result<usize, Self::Error>;
- fn write(&self, src: &[u8]) -> Result<(), Self::Error>;
-}
diff --git a/src/platform/udp.rs b/src/platform/udp.rs
deleted file mode 100644
index f21a3d3..0000000
--- a/src/platform/udp.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Often times an a file descriptor in an atomic might suffice.
- */
-pub trait Bind<Endpoint>: Send + Sync {
- type Error;
-
- fn new() -> Self;
- fn set_port(&self, port: u16) -> Result<(), Self::Error>;
- fn get_port(&self) -> u16;
- fn recv(&self, dst: &mut [u8]) -> Endpoint;
- fn send(&self, src: &[u8], dst: &Endpoint);
-}