diff options
author | Eduardo Broto <ebroto@tutanota.com> | 2019-12-10 22:53:48 +0100 |
---|---|---|
committer | Eduardo Broto <ebroto@tutanota.com> | 2019-12-20 20:23:51 +0100 |
commit | 596889dbd3fa6cea2ce559bfd025fd3c2763056a (patch) | |
tree | 848a95da75459cda862935ef7dc097bb8388dd4b /src/tests/fakes | |
parent | 408ec397c81bb99d6727f01d5dc058e814012714 (diff) |
feat(interfaces): listen on all interfaces by default
Specifying an interface is now optional.
The interface is shown in the connections table.
Diffstat (limited to 'src/tests/fakes')
-rw-r--r-- | src/tests/fakes/fake_input.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/fakes/fake_input.rs b/src/tests/fakes/fake_input.rs index b3b089b..5e02d83 100644 --- a/src/tests/fakes/fake_input.rs +++ b/src/tests/fakes/fake_input.rs @@ -50,7 +50,7 @@ pub struct NetworkFrames { } impl NetworkFrames { - pub fn new(packets: Vec<Option<Vec<u8>>>) -> Box<Self> { + pub fn new(packets: Vec<Option<Vec<u8>>>) -> Box<dyn DataLinkReceiver> { Box::new(NetworkFrames { packets, current_index: 0, @@ -135,14 +135,14 @@ pub fn get_open_sockets() -> HashMap<Connection, String> { open_sockets } -pub fn get_interface() -> NetworkInterface { - NetworkInterface { +pub fn get_interfaces() -> Vec<NetworkInterface> { + vec![NetworkInterface { name: String::from("interface_name"), index: 42, mac: None, ips: vec![IpNetwork::V4("10.0.0.2".parse().unwrap())], flags: 42, - } + }] } pub fn create_fake_on_winch(should_send_winch_event: bool) -> Box<OnSigWinch> { |