face: construct EthernetTransport with NetworkInterface
EthernetTransport and EthernetChannel constructors now accept
ndn::net::NetworkInterface instead of NetworkInterfaceInfo,
in preparation for the transition to NetworkMonitor.
refs #4021
Change-Id: I1687a13dfaafde4ab3795a6f8c76c728c12929b9
diff --git a/tests/daemon/face/ethernet-channel.t.cpp b/tests/daemon/face/ethernet-channel.t.cpp
index 238e193..af9f788 100644
--- a/tests/daemon/face/ethernet-channel.t.cpp
+++ b/tests/daemon/face/ethernet-channel.t.cpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
@@ -38,7 +38,7 @@
makeChannel()
{
BOOST_ASSERT(netifs.size() > 0);
- return make_unique<EthernetChannel>(netifs.front(), time::seconds(2));
+ return make_unique<EthernetChannel>(netifs.front().asNetworkInterface(), time::seconds(2));
}
};
diff --git a/tests/daemon/face/ethernet-fixture.hpp b/tests/daemon/face/ethernet-fixture.hpp
index 6705481..c1f2b8e 100644
--- a/tests/daemon/face/ethernet-fixture.hpp
+++ b/tests/daemon/face/ethernet-fixture.hpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
@@ -46,7 +46,8 @@
for (const auto& netif : listNetworkInterfaces()) {
if (!netif.isLoopback() && netif.isUp()) {
try {
- MulticastEthernetTransport transport(netif, ethernet::getBroadcastAddress(),
+ MulticastEthernetTransport transport(*netif.asNetworkInterface(),
+ ethernet::getBroadcastAddress(),
ndn::nfd::LINK_TYPE_MULTI_ACCESS);
netifs.push_back(netif);
}
@@ -64,8 +65,8 @@
BOOST_ASSERT(netifs.size() > 0);
localEp = netifs.front().name;
remoteEp = remoteAddr;
- transport = make_unique<UnicastEthernetTransport>(netifs.front(), remoteEp,
- persistency, time::seconds(2));
+ transport = make_unique<UnicastEthernetTransport>(*netifs.front().asNetworkInterface(),
+ remoteEp, persistency, time::seconds(2));
}
void
@@ -75,7 +76,8 @@
BOOST_ASSERT(netifs.size() > 0);
localEp = netifs.front().name;
remoteEp = mcastGroup;
- transport = make_unique<MulticastEthernetTransport>(netifs.front(), remoteEp, linkType);
+ transport = make_unique<MulticastEthernetTransport>(*netifs.front().asNetworkInterface(),
+ remoteEp, linkType);
}
protected: