aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/router/workers.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-24 18:41:43 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-24 18:41:43 +0100
commit3bff078e3f1c59454d8db14e5dc7603e6fdbeaba (patch)
treeda301a422eb8aa38ac7960324b8b6fe2d0909302 /src/wireguard/router/workers.rs
parentDaemonization (diff)
downloadwireguard-rs-3bff078e3f1c59454d8db14e5dc7603e6fdbeaba.tar.xz
wireguard-rs-3bff078e3f1c59454d8db14e5dc7603e6fdbeaba.zip
Make IO traits suitable for Tun events (up/down)
Diffstat (limited to 'src/wireguard/router/workers.rs')
-rw-r--r--src/wireguard/router/workers.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wireguard/router/workers.rs b/src/wireguard/router/workers.rs
index cd8015b..3ed6311 100644
--- a/src/wireguard/router/workers.rs
+++ b/src/wireguard/router/workers.rs
@@ -19,7 +19,7 @@ use super::types::Callbacks;
use super::REJECT_AFTER_MESSAGES;
use super::super::types::KeyPair;
-use super::super::{bind, tun, Endpoint};
+use super::super::{tun, udp, Endpoint};
pub const SIZE_TAG: usize = 16;
@@ -40,7 +40,7 @@ pub enum JobParallel {
}
#[allow(type_alias_bounds)]
-pub type JobInbound<E, C, T, B: bind::Writer<E>> = (
+pub type JobInbound<E, C, T, B: udp::Writer<E>> = (
Arc<DecryptionState<E, C, T, B>>,
E,
oneshot::Receiver<Option<JobDecryption>>,
@@ -50,7 +50,7 @@ pub type JobOutbound = oneshot::Receiver<JobEncryption>;
/* TODO: Replace with run-queue
*/
-pub fn worker_inbound<E: Endpoint, C: Callbacks, T: tun::Writer, B: bind::Writer<E>>(
+pub fn worker_inbound<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>>(
device: Arc<DeviceInner<E, C, T, B>>, // related device
peer: Arc<PeerInner<E, C, T, B>>, // related peer
receiver: Receiver<JobInbound<E, C, T, B>>,
@@ -137,7 +137,7 @@ pub fn worker_inbound<E: Endpoint, C: Callbacks, T: tun::Writer, B: bind::Writer
/* TODO: Replace with run-queue
*/
-pub fn worker_outbound<E: Endpoint, C: Callbacks, T: tun::Writer, B: bind::Writer<E>>(
+pub fn worker_outbound<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>>(
peer: Arc<PeerInner<E, C, T, B>>,
receiver: Receiver<JobOutbound>,
) {