face: use NetworkMonitor in EthernetFactory
EthernetFactory now creates unicast channels and multicast faces
on eligible netifs found by NetworkMonitor. However,
EthernetFactory does not yet react to fine-grained signals from
NetworkMonitor.
refs #4021
Change-Id: I58aac67d5a1b00d3cda76e78627b887f93ffa541
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index b5225cd..a095a99 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -118,22 +118,9 @@
if (netif->isUp() && netif->canMulticast() && hasAddressFamily<AddressFamily::V4>(*netif)) {
netifs.push_back(netif);
}
-
- auto copy = netmon->makeNetworkInterface();
- copy->setIndex(netif->getIndex());
- copy->setName(netif->getName());
- copy->setType(netif->getType());
- copy->setFlags(netif->getFlags());
- copy->setState(netif->getState());
- copy->setMtu(netif->getMtu());
- copy->setEthernetAddress(netif->getEthernetAddress());
- copy->setEthernetBroadcastAddress(netif->getEthernetBroadcastAddress());
- for (const auto& na : netif->getNetworkAddresses()) {
- copy->addNetworkAddress(na);
- }
- netmon->addInterface(copy);
}
- netmon->emitEnumerationCompleted();
+
+ this->copyRealNetifsToNetmon();
}
std::vector<const Face*>