diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-12-03 21:49:08 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-12-03 21:49:08 +0100 |
commit | 5a7f762d6ce6b5bbdbd10f5966adc909597f37d6 (patch) | |
tree | b53fa0c1ee02c1e211d6cf94c6ba0334135ec42e /src/wireguard/router/mod.rs | |
parent | Close socket fd after getmtu ioctl (diff) | |
download | wireguard-rs-5a7f762d6ce6b5bbdbd10f5966adc909597f37d6.tar.xz wireguard-rs-5a7f762d6ce6b5bbdbd10f5966adc909597f37d6.zip |
Moving away from peer threads
Diffstat (limited to '')
-rw-r--r-- | src/wireguard/router/mod.rs | 16 |
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; |