WIP: TUN IO worker

Also removed the type parameters from the handshake device.
This commit is contained in:
Mathias Hall-Andersen
2019-09-18 15:31:10 +02:00
parent dfe4a22920
commit 6311aa3402
6 changed files with 217 additions and 134 deletions

View File

@@ -121,7 +121,6 @@ fn get_route<C: Callbacks, T: Tun, B: Bind>(
}
impl<C: Callbacks, T: Tun, B: Bind> Device<C, T, B> {
pub fn new(num_workers: usize, tun: T, bind: B) -> Device<C, T, B> {
// allocate shared device state
let mut inner = DeviceInner {
@@ -149,6 +148,10 @@ impl<C: Callbacks, T: Tun, B: Bind> Device<C, T, B> {
}
}
/// A new secret key has been set for the device.
/// According to WireGuard semantics, this should cause all "sending" keys to be discarded.
pub fn new_sk(&self) {}
/// Adds a new peer to the device
///
/// # Returns