summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorKelvin Zhang <zhangxp1998@gmail.com>2020-01-06 14:47:00 -0500
committerKelvin Zhang <zhangxp1998@gmail.com>2020-01-07 15:31:00 -0500
commitfc39cffa29e4c56f15f5533ba45c8f65b84ec116 (patch)
tree427b04b57771e8e06f87254179923564a2ba7c8e /src/tests
parent4270893f007f6a45e8c34ab064aa94b1ba5ba26b (diff)
Add local_ip field to Connection/RawConnection struct
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/fakes/fake_input.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/fakes/fake_input.rs b/src/tests/fakes/fake_input.rs
index a3b84b3..7f384f6 100644
--- a/src/tests/fakes/fake_input.rs
+++ b/src/tests/fakes/fake_input.rs
@@ -87,9 +87,11 @@ impl DataLinkReceiver for NetworkFrames {
pub fn get_open_sockets() -> HashMap<Connection, String> {
let mut open_sockets = HashMap::new();
+ let local_ip = IpAddr::V4(Ipv4Addr::new(10, 0, 0, 2));
open_sockets.insert(
Connection::new(
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(1, 1, 1, 1)), 12345),
+ local_ip,
443,
Protocol::Tcp,
)
@@ -99,6 +101,7 @@ pub fn get_open_sockets() -> HashMap<Connection, String> {
open_sockets.insert(
Connection::new(
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(2, 2, 2, 2)), 54321),
+ local_ip,
443,
Protocol::Tcp,
)
@@ -108,6 +111,7 @@ pub fn get_open_sockets() -> HashMap<Connection, String> {
open_sockets.insert(
Connection::new(
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(3, 3, 3, 3)), 1337),
+ local_ip,
443,
Protocol::Tcp,
)
@@ -117,6 +121,7 @@ pub fn get_open_sockets() -> HashMap<Connection, String> {
open_sockets.insert(
Connection::new(
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(4, 4, 4, 4)), 1337),
+ local_ip,
443,
Protocol::Tcp,
)
@@ -126,6 +131,7 @@ pub fn get_open_sockets() -> HashMap<Connection, String> {
open_sockets.insert(
Connection::new(
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(1, 1, 1, 1)), 12346),
+ local_ip,
443,
Protocol::Tcp,
)