Work on pure WireGuard test

This commit is contained in:
Mathias Hall-Andersen
2019-10-23 14:00:21 +02:00
parent ee3599d550
commit 8107973342
7 changed files with 156 additions and 83 deletions

View File

@@ -1,13 +1,14 @@
use std::error::Error;
use std::fmt;
use std::marker;
use std::net::SocketAddr;
use std::sync::mpsc::{sync_channel, Receiver, SyncSender};
use std::sync::Arc;
use std::sync::Mutex;
use super::super::bind::*;
use super::super::Endpoint;
use super::UnitEndpoint;
pub struct VoidOwner {}
@@ -57,29 +58,6 @@ impl fmt::Display for TunError {
}
}
/* Endpoint implementation */
#[derive(Clone, Copy)]
pub struct UnitEndpoint {}
impl Endpoint for UnitEndpoint {
fn from_address(_: SocketAddr) -> UnitEndpoint {
UnitEndpoint {}
}
fn into_address(&self) -> SocketAddr {
"127.0.0.1:8080".parse().unwrap()
}
fn clear_src(&mut self) {}
}
impl UnitEndpoint {
pub fn new() -> UnitEndpoint {
UnitEndpoint {}
}
}
#[derive(Clone, Copy)]
pub struct VoidBind {}