summaryrefslogtreecommitdiffstats
path: root/src/wireguard/router/mod.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-12-03 21:49:08 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-12-03 21:49:08 +0100
commit5a7f762d6ce6b5bbdbd10f5966adc909597f37d6 (patch)
treeb53fa0c1ee02c1e211d6cf94c6ba0334135ec42e /src/wireguard/router/mod.rs
parentClose socket fd after getmtu ioctl (diff)
downloadwireguard-rs-5a7f762d6ce6b5bbdbd10f5966adc909597f37d6.tar.xz
wireguard-rs-5a7f762d6ce6b5bbdbd10f5966adc909597f37d6.zip
Moving away from peer threads
Diffstat (limited to 'src/wireguard/router/mod.rs')
-rw-r--r--src/wireguard/router/mod.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/wireguard/router/mod.rs b/src/wireguard/router/mod.rs
index 6aa894d..3243b88 100644
--- a/src/wireguard/router/mod.rs
+++ b/src/wireguard/router/mod.rs
@@ -1,12 +1,16 @@
mod anti_replay;
mod constants;
mod device;
+mod inbound;
mod ip;
mod messages;
+mod outbound;
mod peer;
+mod pool;
mod route;
mod types;
-mod workers;
+
+// mod workers;
#[cfg(test)]
mod tests;
@@ -16,15 +20,17 @@ use std::mem;
use super::constants::REJECT_AFTER_MESSAGES;
use super::types::*;
+use super::{tun, udp, Endpoint};
+pub const SIZE_TAG: usize = 16;
pub const SIZE_MESSAGE_PREFIX: usize = mem::size_of::<TransportHeader>();
-pub const CAPACITY_MESSAGE_POSTFIX: usize = workers::SIZE_TAG;
+pub const CAPACITY_MESSAGE_POSTFIX: usize = SIZE_TAG;
pub const fn message_data_len(payload: usize) -> usize {
- payload + mem::size_of::<TransportHeader>() + workers::SIZE_TAG
+ payload + mem::size_of::<TransportHeader>() + SIZE_TAG
}
-pub use device::Device;
+pub use device::DeviceHandle as Device;
pub use messages::TYPE_TRANSPORT;
-pub use peer::Peer;
+pub use peer::PeerHandle;
pub use types::Callbacks;