model+helper+tests: Create an ndnSIM-specific transport for the NFD face system
This commit replaces the previous hack of implementing NS-3's inter-node
communication using the LinkService abstraction of the NFD face system.
The new implementation has higher memory overhead, but allows simulation
of any LinkService versions, including GenericLinkService that
implements NDNLPv2 protocol (i.e., fragmentation, network NACKs, etc.).
Change-Id: I3d16bcf29f4858049d1040a3e421e1c7151b3ba2
Refs: #3871, #3873
diff --git a/helper/ndn-global-routing-helper.cpp b/helper/ndn-global-routing-helper.cpp
index 6d13d6b..282f784 100644
--- a/helper/ndn-global-routing-helper.cpp
+++ b/helper/ndn-global-routing-helper.cpp
@@ -27,7 +27,7 @@
#include "model/ndn-l3-protocol.hpp"
#include "helper/ndn-fib-helper.hpp"
-#include "model/ndn-net-device-link-service.hpp"
+#include "model/ndn-net-device-transport.hpp"
#include "model/ndn-global-router.hpp"
#include "daemon/table/fib.hpp"
@@ -81,15 +81,15 @@
node->AggregateObject(gr);
for (auto& face : ndn->getForwarder()->getFaceTable()) {
- auto linkService = dynamic_cast<NetDeviceLinkService*>(face.getLinkService());
- if (linkService == nullptr) {
- NS_LOG_DEBUG("Skipping non-netdevice face");
+ auto transport = dynamic_cast<NetDeviceTransport*>(face.getTransport());
+ if (transport == nullptr) {
+ NS_LOG_DEBUG("Skipping non ndnSIM-specific transport face");
continue;
}
- Ptr<NetDevice> nd = linkService->GetNetDevice();
+ Ptr<NetDevice> nd = transport->GetNetDevice();
if (nd == 0) {
- NS_LOG_DEBUG("Not a NetDevice associated with NetDeviceFace");
+ NS_LOG_DEBUG("Not a NetDevice associated with an ndnSIM-specific transport instance");
continue;
}
@@ -326,9 +326,9 @@
for (auto& faceId : faceIds) {
auto* face = l3->getForwarder()->getFaceTable().get(faceId);
NS_ASSERT(face != nullptr);
- auto linkService = dynamic_cast<NetDeviceLinkService*>(face->getLinkService());
- if (linkService == nullptr) {
- NS_LOG_DEBUG("Skipping non-netdevice face");
+ auto transport = dynamic_cast<NetDeviceTransport*>(face->getTransport());
+ if (transport == nullptr) {
+ NS_LOG_DEBUG("Skipping non ndnSIM-specific transport face");
continue;
}