Upgrade to NFD 22.02 and ndn-cxx 0.8.0 and fixes for NS-3.35
Change-Id: Ia26204f1ecddc93729e5565d5dbbb2a3d1d9637e
diff --git a/.waf-tools/version.py b/.waf-tools/version.py
index ef734dd..901ae10 100644
--- a/.waf-tools/version.py
+++ b/.waf-tools/version.py
@@ -23,7 +23,7 @@
p = Utils.subprocess.Popen(cmd, stdout=Utils.subprocess.PIPE,
cwd=submodule.abspath(),
stderr=None, stdin=None)
- out = str(p.communicate()[0].strip())
+ out = p.communicate()[0].strip().decode('utf-8')
didGetVersion = (p.returncode == 0 and out != "")
if didGetVersion:
if out.startswith(tagPrefix):
@@ -33,7 +33,7 @@
except OSError:
pass
- versionFile = submodule.find_node('VERSION')
+ versionFile = submodule.find_node('VERSION.info')
if not didGetVersion and versionFile is not None:
try:
@@ -49,7 +49,7 @@
except (OSError, IOError):
Logs.warn("VERSION file exists, but not readable")
else:
- versionFile = submodule.make_node('VERSION')
+ versionFile = submodule.make_node('VERSION.info')
if versionFile:
try:
diff --git a/NFD b/NFD
index d1d38c8..361b381 160000
--- a/NFD
+++ b/NFD
@@ -1 +1 @@
-Subproject commit d1d38c8558ce6ce71d9ba81ca6cf5dcfd0342820
+Subproject commit 361b381b9b552ff3341aa160858bea1d470d2122
diff --git a/apps/ndn-producer.cpp b/apps/ndn-producer.cpp
index 87e7a94..73f5e72 100644
--- a/apps/ndn-producer.cpp
+++ b/apps/ndn-producer.cpp
@@ -110,17 +110,18 @@
data->setContent(make_shared< ::ndn::Buffer>(m_virtualPayloadSize));
- Signature signature;
SignatureInfo signatureInfo(static_cast< ::ndn::tlv::SignatureTypeValue>(255));
if (m_keyLocator.size() > 0) {
signatureInfo.setKeyLocator(m_keyLocator);
}
- signature.setInfo(signatureInfo);
- signature.setValue(::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature));
+ data->setSignatureInfo(signatureInfo);
- data->setSignature(signature);
+ ::ndn::EncodingEstimator estimator;
+ ::ndn::EncodingBuffer encoder(estimator.appendVarNumber(m_signature), 0);
+ encoder.appendVarNumber(m_signature);
+ data->setSignatureValue(encoder.getBuffer());
NS_LOG_INFO("node(" << GetNode()->GetId() << ") responding with Data: " << data->getName());
diff --git a/examples/lfid.cpp b/examples/lfid.cpp
index e2d6f05..5536ef1 100644
--- a/examples/lfid.cpp
+++ b/examples/lfid.cpp
@@ -30,7 +30,7 @@
#include "ns3/ndnSIM/model/ndn-l3-protocol.hpp"
#include "ns3/ndnSIM/model/ndn-net-device-transport.hpp"
//#include "ns3/ndnSIM/NFD/daemon/fw/random-strategy.hpp"
-#include "ns3/ndnSIM/NFD/daemon/fw/best-route-strategy2.hpp"
+#include "ns3/ndnSIM/NFD/daemon/fw/best-route-strategy.hpp"
#include "ns3/ndnSIM/utils/topology/annotated-topology-reader.hpp"
namespace ns3 {
@@ -120,7 +120,7 @@
// IMPORTANT: Some strategy needs to be installed for displayRoutes() to work.
ndn::StrategyChoiceHelper strategyHelper;
- strategyHelper.InstallAll<nfd::fw::BestRouteStrategy2>("/");
+ strategyHelper.InstallAll<nfd::fw::BestRouteStrategy>("/");
// TODO: Needs RandomStrategy for test to work!
// Uncomment after NFD version has been updated.
diff --git a/examples/ndn-csma.cpp b/examples/ndn-csma.cpp
index 5e0ccfd..888b32e 100644
--- a/examples/ndn-csma.cpp
+++ b/examples/ndn-csma.cpp
@@ -55,7 +55,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::CsmaChannel::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::CsmaChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-different-strategy-per-prefix.cpp b/examples/ndn-different-strategy-per-prefix.cpp
index 631674e..a0075df 100644
--- a/examples/ndn-different-strategy-per-prefix.cpp
+++ b/examples/ndn-different-strategy-per-prefix.cpp
@@ -64,7 +64,7 @@
// Setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("10p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("10p"));
// Read optional command-line parameters
CommandLine cmd;
diff --git a/examples/ndn-grid-multiple-strategies.cpp b/examples/ndn-grid-multiple-strategies.cpp
index 474feb0..35ce899 100644
--- a/examples/ndn-grid-multiple-strategies.cpp
+++ b/examples/ndn-grid-multiple-strategies.cpp
@@ -64,7 +64,7 @@
// Setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("10p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("10p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-grid.cpp b/examples/ndn-grid.cpp
index 6027a0d..0283be0 100644
--- a/examples/ndn-grid.cpp
+++ b/examples/ndn-grid.cpp
@@ -57,7 +57,7 @@
// Setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("10p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("10p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-grid.py b/examples/ndn-grid.py
index b7884e7..f13dd43 100644
--- a/examples/ndn-grid.py
+++ b/examples/ndn-grid.py
@@ -51,7 +51,7 @@
Config.SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"))
Config.SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"))
-Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"))
+Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"))
import sys; cmd = CommandLine(); cmd.Parse(sys.argv);
diff --git a/examples/ndn-load-balancer/random-load-balancer-strategy.cpp b/examples/ndn-load-balancer/random-load-balancer-strategy.cpp
index 27756cd..5faf31f 100644
--- a/examples/ndn-load-balancer/random-load-balancer-strategy.cpp
+++ b/examples/ndn-load-balancer/random-load-balancer-strategy.cpp
@@ -49,8 +49,7 @@
static bool
canForwardToNextHop(const Face& inFace, shared_ptr<pit::Entry> pitEntry, const fib::NextHop& nexthop)
{
- return !wouldViolateScope(inFace, pitEntry->getInterest(), nexthop.getFace()) &&
- canForwardToLegacy(*pitEntry, nexthop.getFace());
+ return !wouldViolateScope(inFace, pitEntry->getInterest(), nexthop.getFace());
}
static bool
@@ -61,7 +60,7 @@
}
void
-RandomLoadBalancerStrategy::afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
+RandomLoadBalancerStrategy::afterReceiveInterest(const Interest& interest, const FaceEndpoint& ingress,
const shared_ptr<pit::Entry>& pitEntry)
{
NFD_LOG_TRACE("afterReceiveInterest");
@@ -92,7 +91,7 @@
}
} while (!canForwardToNextHop(ingress.face, pitEntry, *selected));
- this->sendInterest(pitEntry, FaceEndpoint(selected->getFace(), 0), interest);
+ this->sendInterest(interest, selected->getFace(), pitEntry);
}
const Name&
diff --git a/examples/ndn-load-balancer/random-load-balancer-strategy.hpp b/examples/ndn-load-balancer/random-load-balancer-strategy.hpp
index 1a2e2c0..5c5086a 100644
--- a/examples/ndn-load-balancer/random-load-balancer-strategy.hpp
+++ b/examples/ndn-load-balancer/random-load-balancer-strategy.hpp
@@ -42,7 +42,7 @@
~RandomLoadBalancerStrategy() override;
void
- afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
+ afterReceiveInterest(const Interest& interest, const FaceEndpoint& ingress,
const shared_ptr<pit::Entry>& pitEntry) override;
static const Name&
diff --git a/examples/ndn-simple-for-nrt-helper.cpp b/examples/ndn-simple-for-nrt-helper.cpp
index a43ab13..c287487 100644
--- a/examples/ndn-simple-for-nrt-helper.cpp
+++ b/examples/ndn-simple-for-nrt-helper.cpp
@@ -61,7 +61,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-simple-for-nrt-helper/requester-app.cpp b/examples/ndn-simple-for-nrt-helper/requester-app.cpp
index 4a5d2ff..0967879 100644
--- a/examples/ndn-simple-for-nrt-helper/requester-app.cpp
+++ b/examples/ndn-simple-for-nrt-helper/requester-app.cpp
@@ -72,7 +72,7 @@
m_delegation = delegation;
m_link = ::ndn::Link(Name(m_name).append("/LINK"));
- m_link.addDelegation(1, m_delegation);
+ m_link.addDelegation(m_delegation);
ndn::StackHelper::getKeyChain().sign(m_link, ::ndn::security::SigningInfo(::ndn::security::SigningInfo::SIGNER_TYPE_SHA256));
NS_LOG_DEBUG("Created Link Object "<< m_link);
@@ -90,7 +90,7 @@
auto interest = make_shared<Interest>(m_name);
interest->setInterestLifetime(time::seconds(1));
if (m_delegation.size() > 0) {
- interest->setForwardingHint(m_link.getDelegationList());
+ interest->setForwardingHint({m_link.getDelegationList().begin(), m_link.getDelegationList().end()});
}
NS_LOG_DEBUG("Sending an Interest for "<< *interest);
diff --git a/examples/ndn-simple-mpi.cpp b/examples/ndn-simple-mpi.cpp
index 6be5e5c..bc7b2fe 100644
--- a/examples/ndn-simple-mpi.cpp
+++ b/examples/ndn-simple-mpi.cpp
@@ -74,7 +74,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Gbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("1ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("10p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("10p"));
bool nullmsg = false;
diff --git a/examples/ndn-simple-wifi.cpp b/examples/ndn-simple-wifi.cpp
index d89db34..7c8ed0d 100644
--- a/examples/ndn-simple-wifi.cpp
+++ b/examples/ndn-simple-wifi.cpp
@@ -62,17 +62,16 @@
//////////////////////
WifiHelper wifi;
// wifi.SetRemoteStationManager ("ns3::AarfWifiManager");
- wifi.SetStandard(WIFI_PHY_STANDARD_80211a);
+ wifi.SetStandard(WIFI_STANDARD_80211a);
wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "DataMode",
StringValue("OfdmRate24Mbps"));
- YansWifiChannelHelper wifiChannel; // = YansWifiChannelHelper::Default ();
+ YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay("ns3::ConstantSpeedPropagationDelayModel");
wifiChannel.AddPropagationLoss("ns3::ThreeLogDistancePropagationLossModel");
wifiChannel.AddPropagationLoss("ns3::NakagamiPropagationLossModel");
- // YansWifiPhy wifiPhy = YansWifiPhy::Default();
- YansWifiPhyHelper wifiPhyHelper = YansWifiPhyHelper::Default();
+ YansWifiPhyHelper wifiPhyHelper;
wifiPhyHelper.SetChannel(wifiChannel.Create());
wifiPhyHelper.Set("TxPowerStart", DoubleValue(5));
wifiPhyHelper.Set("TxPowerEnd", DoubleValue(5));
diff --git a/examples/ndn-simple-with-content-freshness.cpp b/examples/ndn-simple-with-content-freshness.cpp
index 48b3c79..b9cfa32 100644
--- a/examples/ndn-simple-with-content-freshness.cpp
+++ b/examples/ndn-simple-with-content-freshness.cpp
@@ -48,7 +48,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-simple-with-link-failure.cpp b/examples/ndn-simple-with-link-failure.cpp
index 29ad00e..971d8fa 100644
--- a/examples/ndn-simple-with-link-failure.cpp
+++ b/examples/ndn-simple-with-link-failure.cpp
@@ -55,7 +55,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-simple-with-pcap.cpp b/examples/ndn-simple-with-pcap.cpp
index bda9208..ff6e78f 100644
--- a/examples/ndn-simple-with-pcap.cpp
+++ b/examples/ndn-simple-with-pcap.cpp
@@ -67,7 +67,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-simple.cpp b/examples/ndn-simple.cpp
index 0e84b4d..0aa129d 100644
--- a/examples/ndn-simple.cpp
+++ b/examples/ndn-simple.cpp
@@ -52,7 +52,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-simple.py b/examples/ndn-simple.py
index 447fd9c..e87b701 100644
--- a/examples/ndn-simple.py
+++ b/examples/ndn-simple.py
@@ -47,7 +47,7 @@
# Set default parameters for PointToPoint links and channels
Config.SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"))
Config.SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"))
-Config.SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"))
+Config.SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"))
# Read optional command-line parameters (e.g., enable visualizer with ./waf --pyrun=<> --visualize
import sys; cmd = CommandLine(); cmd.Parse(sys.argv);
diff --git a/examples/ndn-triangle-calculate-routes.cpp b/examples/ndn-triangle-calculate-routes.cpp
index 869d443..2e61888 100644
--- a/examples/ndn-triangle-calculate-routes.cpp
+++ b/examples/ndn-triangle-calculate-routes.cpp
@@ -33,7 +33,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/examples/ndn-zipf-mandelbrot.cpp b/examples/ndn-zipf-mandelbrot.cpp
index 7fd8d54..9052739 100644
--- a/examples/ndn-zipf-mandelbrot.cpp
+++ b/examples/ndn-zipf-mandelbrot.cpp
@@ -58,7 +58,7 @@
// Setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("1ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("10p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("10p"));
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
diff --git a/model/ndn-app-link-service.cpp b/model/ndn-app-link-service.cpp
index e5b1ee7..ad144b6 100644
--- a/model/ndn-app-link-service.cpp
+++ b/model/ndn-app-link-service.cpp
@@ -47,7 +47,7 @@
}
void
-AppLinkService::doSendInterest(const Interest& interest, const nfd::EndpointId& endpoint)
+AppLinkService::doSendInterest(const Interest& interest)
{
NS_LOG_FUNCTION(this << &interest);
@@ -56,7 +56,7 @@
}
void
-AppLinkService::doSendData(const Data& data, const nfd::EndpointId& endpoint)
+AppLinkService::doSendData(const Data& data)
{
NS_LOG_FUNCTION(this << &data);
@@ -65,7 +65,7 @@
}
void
-AppLinkService::doSendNack(const lp::Nack& nack, const nfd::EndpointId& endpoint)
+AppLinkService::doSendNack(const lp::Nack& nack)
{
NS_LOG_FUNCTION(this << &nack);
diff --git a/model/ndn-app-link-service.hpp b/model/ndn-app-link-service.hpp
index 21c50d1..40f05de 100644
--- a/model/ndn-app-link-service.hpp
+++ b/model/ndn-app-link-service.hpp
@@ -60,13 +60,13 @@
private:
virtual void
- doSendInterest(const Interest& interest, const nfd::EndpointId& endpoint) override;
+ doSendInterest(const Interest& interest) override;
virtual void
- doSendData(const Data& data, const nfd::EndpointId& endpoint) override;
+ doSendData(const Data& data) override;
virtual void
- doSendNack(const lp::Nack& nack, const nfd::EndpointId& endpoint) override;
+ doSendNack(const lp::Nack& nack) override;
virtual void
doReceivePacket(const Block& packet, const nfd::EndpointId& endpoint) override
diff --git a/model/ndn-block-header.cpp b/model/ndn-block-header.cpp
index 6665fa4..5a6177f 100644
--- a/model/ndn-block-header.cpp
+++ b/model/ndn-block-header.cpp
@@ -140,7 +140,7 @@
::ndn::Buffer::const_iterator first, last;
std::tie(first, last) = p.get<lp::FragmentField>(0);
try {
- Block fragmentBlock(&*first, std::distance(first, last));
+ Block fragmentBlock(::ndn::make_span(&*first, std::distance(first, last)));
decodeAndPrint(fragmentBlock);
}
catch (const tlv::Error& error) {
diff --git a/model/ndn-common.hpp b/model/ndn-common.hpp
index b0cfe7a..849627b 100644
--- a/model/ndn-common.hpp
+++ b/model/ndn-common.hpp
@@ -27,7 +27,6 @@
#include <ndn-cxx/interest.hpp>
#include <ndn-cxx/encoding/block.hpp>
-#include <ndn-cxx/signature.hpp>
#include <ndn-cxx/signature-info.hpp>
#include <ndn-cxx/name.hpp>
#include <ndn-cxx/data.hpp>
@@ -62,7 +61,6 @@
using ::ndn::Interest;
using ::ndn::Data;
using ::ndn::KeyLocator;
-using ::ndn::Signature;
using ::ndn::SignatureInfo;
using ::ndn::Block;
using ::ndn::KeyChain;
diff --git a/model/ndn-net-device-transport.cpp b/model/ndn-net-device-transport.cpp
index e0439f0..ffa7a1f 100644
--- a/model/ndn-net-device-transport.cpp
+++ b/model/ndn-net-device-transport.cpp
@@ -106,7 +106,7 @@
}
void
-NetDeviceTransport::doSend(const Block& packet, const nfd::EndpointId& endpoint)
+NetDeviceTransport::doSend(const Block& packet)
{
NS_LOG_FUNCTION(this << "Sending packet from netDevice with URI"
<< this->getLocalUri());
diff --git a/model/ndn-net-device-transport.hpp b/model/ndn-net-device-transport.hpp
index 22b07de..d3c26ac 100644
--- a/model/ndn-net-device-transport.hpp
+++ b/model/ndn-net-device-transport.hpp
@@ -62,7 +62,7 @@
doClose() override;
virtual void
- doSend(const Block& packet, const nfd::EndpointId& endpoint) override;
+ doSend(const Block& packet) override;
void
receiveFromNetDevice(Ptr<NetDevice> device,
diff --git a/model/null-transport.hpp b/model/null-transport.hpp
index 3c27e1f..07858d0 100644
--- a/model/null-transport.hpp
+++ b/model/null-transport.hpp
@@ -54,7 +54,7 @@
}
void
- doSend(const Block& packet, const nfd::EndpointId& endpoint) final
+ doSend(const Block& packet) final
{
}
};
diff --git a/ndn-cxx b/ndn-cxx
index f2a5806..f849c5e 160000
--- a/ndn-cxx
+++ b/ndn-cxx
@@ -1 +1 @@
-Subproject commit f2a5806bf49432ee7d1f98e98b1bc66b31a4aa54
+Subproject commit f849c5ef310da8375f3546e354ba9c9b1155bc59
diff --git a/tests/unit-tests/NFD/ncc.t.cpp b/tests/unit-tests/NFD/ncc.t.cpp
index 9884292..cc396d5 100644
--- a/tests/unit-tests/NFD/ncc.t.cpp
+++ b/tests/unit-tests/NFD/ncc.t.cpp
@@ -33,7 +33,7 @@
{
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("1ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("500p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("500p"));
// Creating a 3 node topology //
// //
diff --git a/tests/unit-tests/helper/lfid-routing-helper.t.cpp b/tests/unit-tests/helper/lfid-routing-helper.t.cpp
index 77eed91..1c0dfbb 100644
--- a/tests/unit-tests/helper/lfid-routing-helper.t.cpp
+++ b/tests/unit-tests/helper/lfid-routing-helper.t.cpp
@@ -24,7 +24,7 @@
#include "model/ndn-l3-protocol.hpp"
#include "model/ndn-net-device-transport.hpp"
-#include "NFD/daemon/fw/best-route-strategy2.hpp"
+#include "NFD/daemon/fw/best-route-strategy.hpp"
#include "ns3/channel.h"
#include "ns3/net-device.h"
@@ -73,7 +73,7 @@
// IMPORTANT: Some strategy needs to be installed for test to work.
ndn::StrategyChoiceHelper str;
- str.InstallAll<nfd::fw::BestRouteStrategy2>("/");
+ str.InstallAll<nfd::fw::BestRouteStrategy>("/");
int numNexthops = 0;
diff --git a/tests/unit-tests/helper/ndn-global-routing-helper.t.cpp b/tests/unit-tests/helper/ndn-global-routing-helper.t.cpp
index fe2c43b..e018508 100644
--- a/tests/unit-tests/helper/ndn-global-routing-helper.t.cpp
+++ b/tests/unit-tests/helper/ndn-global-routing-helper.t.cpp
@@ -91,14 +91,12 @@
auto ndn = Names::Find<Node>("A1")->GetObject<ndn::L3Protocol>();
for (const auto& entry : ndn->getForwarder()->getFib()) {
- bool isFirst = true;
for (auto& nextHop : entry.getNextHops()) {
auto& face = nextHop.getFace();
auto transport = dynamic_cast<NetDeviceTransport*>(face.getTransport());
if (transport == nullptr)
continue;
BOOST_CHECK_EQUAL(Names::FindName(transport->GetNetDevice()->GetChannel()->GetDevice(1)->GetNode()), "C1");
- isFirst = false;
}
}
}
@@ -136,14 +134,12 @@
auto ndn = Names::Find<Node>("A2")->GetObject<ndn::L3Protocol>();
for (const auto& entry : ndn->getForwarder()->getFib()) {
- bool isFirst = true;
for (auto& nextHop : entry.getNextHops()) {
auto& face = nextHop.getFace();
auto transport = dynamic_cast<NetDeviceTransport*>(face.getTransport());
if (transport == nullptr)
continue;
BOOST_CHECK_EQUAL(Names::FindName(transport->GetNetDevice()->GetChannel()->GetDevice(1)->GetNode()), "B2");
- isFirst = false;
}
}
}
diff --git a/tests/unit-tests/helper/ndn-link-control-helper.t.cpp b/tests/unit-tests/helper/ndn-link-control-helper.t.cpp
index 0df5280..983edb5 100644
--- a/tests/unit-tests/helper/ndn-link-control-helper.t.cpp
+++ b/tests/unit-tests/helper/ndn-link-control-helper.t.cpp
@@ -32,7 +32,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
createTopology({
{"1", "2"},
@@ -77,7 +77,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Connecting nodes in 6 node topology: //
// //
diff --git a/tests/unit-tests/helper/ndn-network-region-table-helper.t.cpp b/tests/unit-tests/helper/ndn-network-region-table-helper.t.cpp
index 868b9dc..4acc09d 100644
--- a/tests/unit-tests/helper/ndn-network-region-table-helper.t.cpp
+++ b/tests/unit-tests/helper/ndn-network-region-table-helper.t.cpp
@@ -26,9 +26,6 @@
namespace ns3 {
namespace ndn {
-using ::ndn::Delegation;
-using ::ndn::DelegationList;
-
BOOST_AUTO_TEST_SUITE(HelperNdnNetworkRegionTableHelper)
class BasicFixture : public ScenarioHelperWithCleanupFixture
@@ -95,14 +92,12 @@
::ndn::Face m_face;
};
-DelegationList
+std::vector<Name>
makeHint(const Name& delegation)
{
- Delegation del;
- del.name = Name(delegation);
- del.preference = 1;
- DelegationList list({del});
- return list;
+ std::vector<Name> ret;
+ ret.push_back(delegation);
+ return ret;
}
class MultiNodeWithAppFixture : public ScenarioHelperWithCleanupFixture
diff --git a/tests/unit-tests/helper/ndn-stack-helper.t.cpp b/tests/unit-tests/helper/ndn-stack-helper.t.cpp
index 2fc98b6..94f06c1 100644
--- a/tests/unit-tests/helper/ndn-stack-helper.t.cpp
+++ b/tests/unit-tests/helper/ndn-stack-helper.t.cpp
@@ -32,7 +32,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
// Creating nodes
NodeContainer nodes;
diff --git a/tests/unit-tests/helper/ndn-strategy-choice-helper.t.cpp b/tests/unit-tests/helper/ndn-strategy-choice-helper.t.cpp
index f1a8a14..9c82c45 100644
--- a/tests/unit-tests/helper/ndn-strategy-choice-helper.t.cpp
+++ b/tests/unit-tests/helper/ndn-strategy-choice-helper.t.cpp
@@ -33,7 +33,7 @@
{
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("1ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("500p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("500p"));
// Creating two 3 node topologies: //
// //
@@ -150,7 +150,7 @@
}
void
- afterReceiveInterest(const nfd::FaceEndpoint& ingress, const Interest& interest,
+ afterReceiveInterest(const Interest& interest, const nfd::FaceEndpoint& ingress,
const shared_ptr<nfd::pit::Entry>& pitEntry) override
{
// this strategy doesn't forward interests
diff --git a/tests/unit-tests/model/ndn-block-header.t.cpp b/tests/unit-tests/model/ndn-block-header.t.cpp
index 9360998..4bfaae4 100644
--- a/tests/unit-tests/model/ndn-block-header.t.cpp
+++ b/tests/unit-tests/model/ndn-block-header.t.cpp
@@ -66,7 +66,7 @@
packet->AddHeader(header);
boost::test_tools::output_test_stream output;
packet->Print(output);
- BOOST_CHECK(output.is_equal("ns3::ndn::Packet (Interest: /prefix?CanBePrefix&Nonce=10)"));
+ BOOST_CHECK(output.is_equal("ns3::ndn::Packet (Interest: /prefix?CanBePrefix&Nonce=0000000a)"));
}
}
@@ -107,7 +107,7 @@
packet->AddHeader(header);
boost::test_tools::output_test_stream output;
packet->Print(output);
- BOOST_CHECK(output.is_equal("ns3::ndn::Packet (NDNLP(Interest: /prefix?CanBePrefix&Nonce=10))"));
+ BOOST_CHECK(output.is_equal("ns3::ndn::Packet (NDNLP(Interest: /prefix?CanBePrefix&Nonce=0000000a))"));
}
lpPacket.add<::ndn::lp::NackField>(::ndn::lp::NackHeader().setReason(::ndn::lp::NackReason::NO_ROUTE));
@@ -118,7 +118,7 @@
packet->AddHeader(header);
boost::test_tools::output_test_stream output;
packet->Print(output);
- BOOST_CHECK(output.is_equal("ns3::ndn::Packet (NDNLP(NACK(NoRoute) for Interest: /prefix?CanBePrefix&Nonce=10))"));
+ BOOST_CHECK(output.is_equal("ns3::ndn::Packet (NDNLP(NACK(NoRoute) for Interest: /prefix?CanBePrefix&Nonce=0000000a))"));
}
lpPacket.remove<::ndn::lp::NackField>();
@@ -131,7 +131,7 @@
packet->AddHeader(header);
boost::test_tools::output_test_stream output;
packet->Print(output);
- BOOST_CHECK(output.is_equal("ns3::ndn::Packet (NDNLP(Interest: /prefix?CanBePrefix&Nonce=10))"));
+ BOOST_CHECK(output.is_equal("ns3::ndn::Packet (NDNLP(Interest: /prefix?CanBePrefix&Nonce=0000000a))"));
}
lpPacket.set<::ndn::lp::FragCountField>(2);
diff --git a/tests/unit-tests/ndn-cxx/face.t.cpp b/tests/unit-tests/ndn-cxx/face.t.cpp
index 98d880b..a86e329 100644
--- a/tests/unit-tests/ndn-cxx/face.t.cpp
+++ b/tests/unit-tests/ndn-cxx/face.t.cpp
@@ -37,7 +37,7 @@
{
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
createTopology({{"A", "B"}});
addRoutes({{"A", "B", "/test", 1}});
@@ -83,7 +83,7 @@
{
FactoryCallbackApp::Install(getNode("B"), [this] () -> shared_ptr<void> {
return make_shared<BasicProducer>("/test", [this] (const Name& interest) {
- BOOST_CHECK_EQUAL(interest, "/test/prefix/%FE%00");
+ BOOST_CHECK_EQUAL(interest, "/test/prefix/seq=0");
this->hasFired = true;
},
[] {
diff --git a/tests/unit-tests/utils/tracers/ndn-app-delay-tracer.t.cpp b/tests/unit-tests/utils/tracers/ndn-app-delay-tracer.t.cpp
index fe9b380..46e731f 100644
--- a/tests/unit-tests/utils/tracers/ndn-app-delay-tracer.t.cpp
+++ b/tests/unit-tests/utils/tracers/ndn-app-delay-tracer.t.cpp
@@ -39,7 +39,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
createTopology({
{"1", "2"},
diff --git a/tests/unit-tests/utils/tracers/ndn-l3-rate-tracer.t.cpp b/tests/unit-tests/utils/tracers/ndn-l3-rate-tracer.t.cpp
index 1a23ae4..7443675 100644
--- a/tests/unit-tests/utils/tracers/ndn-l3-rate-tracer.t.cpp
+++ b/tests/unit-tests/utils/tracers/ndn-l3-rate-tracer.t.cpp
@@ -39,7 +39,7 @@
// setting default parameters for PointToPoint links and channels
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
- Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
+ Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
createTopology({
{"1"},
diff --git a/utils/dummy-keychain.cpp b/utils/dummy-keychain.cpp
index 3f62a4e..7294c1e 100644
--- a/utils/dummy-keychain.cpp
+++ b/utils/dummy-keychain.cpp
@@ -66,8 +66,8 @@
const std::string DummyPib::SCHEME = "pib-dummy";
const std::string DummyTpm::SCHEME = "tpm-dummy";
-NDN_CXX_V2_KEYCHAIN_REGISTER_PIB_BACKEND(DummyPib);
-NDN_CXX_V2_KEYCHAIN_REGISTER_TPM_BACKEND(DummyTpm);
+NDN_CXX_KEYCHAIN_REGISTER_PIB_BACKEND(DummyPib);
+NDN_CXX_KEYCHAIN_REGISTER_TPM_BACKEND(DummyTpm);
DummyPib::DummyPib(const std::string& locator)
{
@@ -132,8 +132,7 @@
}
void
-DummyPib::addKey(const Name& identity, const Name& keyName,
- const uint8_t* key, size_t keyLen)
+DummyPib::addKey(const Name& identity, const Name& keyName, span<const uint8_t> key)
{
}
@@ -148,7 +147,7 @@
typedef boost::iostreams::stream<boost::iostreams::array_source> arrayStream;
arrayStream
is(reinterpret_cast<const char*>(DUMMY_CERT), sizeof(DUMMY_CERT));
- auto cert = io::load<v2::Certificate>(is, io::BASE64);
+ auto cert = io::load<Certificate>(is, io::BASE64);
return cert->getPublicKey();
}
@@ -178,7 +177,7 @@
}
void
-DummyPib::addCertificate(const v2::Certificate& certificate)
+DummyPib::addCertificate(const Certificate& certificate)
{
}
@@ -187,15 +186,15 @@
{
}
-v2::Certificate
+Certificate
DummyPib::getCertificate(const Name& certificateName) const
{
- static shared_ptr<v2::Certificate> cert = nullptr;
+ static shared_ptr<Certificate> cert = nullptr;
if (cert == nullptr) {
typedef boost::iostreams::stream<boost::iostreams::array_source> arrayStream;
arrayStream
is(reinterpret_cast<const char*>(DUMMY_CERT), sizeof(DUMMY_CERT));
- cert = io::load<v2::Certificate>(is, io::BASE64);
+ cert = io::load<Certificate>(is, io::BASE64);
}
return *cert;
@@ -214,15 +213,15 @@
{
}
-v2::Certificate
+Certificate
DummyPib::getDefaultCertificateOfKey(const Name& keyName) const
{
- static shared_ptr<v2::Certificate> cert = nullptr;
+ static shared_ptr<Certificate> cert = nullptr;
if (cert == nullptr) {
typedef boost::iostreams::stream<boost::iostreams::array_source> arrayStream;
arrayStream
is(reinterpret_cast<const char*>(DUMMY_CERT), sizeof(DUMMY_CERT));
- cert = io::load<v2::Certificate>(is, io::BASE64);
+ cert = io::load<Certificate>(is, io::BASE64);
}
return *cert;
@@ -246,20 +245,19 @@
}
ConstBufferPtr
-DummyKeyHandle::doSign(DigestAlgorithm digestAlgorithm, const uint8_t* buf, size_t size) const
+DummyKeyHandle::doSign(DigestAlgorithm digestAlgorithm, const InputBuffers& bufs) const
{
return make_shared<Buffer>(DUMMY_SIGNATURE, sizeof(DUMMY_SIGNATURE));
}
bool
-DummyKeyHandle::doVerify(DigestAlgorithm digestAlgorithm, const uint8_t* buf, size_t bufLen,
- const uint8_t* sig, size_t sigLen) const
+DummyKeyHandle::doVerify(DigestAlgorithm digestAlgorithm, const InputBuffers& bufs, span<const uint8_t> sig) const
{
throw Error("Not supported");
}
ConstBufferPtr
-DummyKeyHandle::doDecrypt(const uint8_t* cipherText, size_t cipherTextLen) const
+DummyKeyHandle::doDecrypt(span<const uint8_t> cipherText) const
{
throw Error("Not supported");
}
@@ -331,7 +329,7 @@
}
void
-DummyTpm::doImportKey(const Name& keyName, const uint8_t* pkcs8, size_t pkcs8Len, const char* pw, size_t pwLen)
+DummyTpm::doImportKey(const Name& keyName, span<const uint8_t> pkcs8, const char* pw, size_t pwLen)
{
throw Error("Not supported");
}
diff --git a/utils/dummy-keychain.hpp b/utils/dummy-keychain.hpp
index 7f8b0a3..95ee50e 100644
--- a/utils/dummy-keychain.hpp
+++ b/utils/dummy-keychain.hpp
@@ -83,8 +83,7 @@
hasKey(const Name& keyName) const override;
void
- addKey(const Name& identity, const Name& keyName, const uint8_t* key,
- size_t keyLen) override;
+ addKey(const Name& identity, const Name& keyName, span<const uint8_t> key) override;
void
removeKey(const Name& keyName) override;
@@ -106,12 +105,12 @@
hasCertificate(const Name& certName) const override;
void
- addCertificate(const v2::Certificate& certificate) override;
+ addCertificate(const Certificate& certificate) override;
void
removeCertificate(const Name& certName) override;
- v2::Certificate
+ Certificate
getCertificate(const Name& certificateName) const override;
std::set<Name>
@@ -120,7 +119,7 @@
void
setDefaultCertificateOfKey(const Name& keyName, const Name& certName) override;
- v2::Certificate
+ Certificate
getDefaultCertificateOfKey(const Name& keyName) const override;
static std::string
@@ -145,14 +144,13 @@
private:
ConstBufferPtr
- doSign(DigestAlgorithm digestAlgorithm, const uint8_t* buf, size_t size) const final;
+ doSign(DigestAlgorithm digestAlgorithm, const InputBuffers& bufs) const final;
bool
- doVerify(DigestAlgorithm digestAlgorithm, const uint8_t* buf, size_t bufLen,
- const uint8_t* sig, size_t sigLen) const final;
+ doVerify(DigestAlgorithm digestAlgorithm, const InputBuffers& bufs, span<const uint8_t> sig) const final;
ConstBufferPtr
- doDecrypt(const uint8_t* cipherText, size_t cipherTextLen) const final;
+ doDecrypt(span<const uint8_t> cipherText) const final;
ConstBufferPtr
doDerivePublicKey() const final;
@@ -211,7 +209,7 @@
doExportKey(const Name& keyName, const char* pw, size_t pwLen) final;
void
- doImportKey(const Name& keyName, const uint8_t* pkcs8, size_t pkcs8Len, const char* pw, size_t pwLen) final;
+ doImportKey(const Name& keyName, span<const uint8_t> pkcs8, const char* pw, size_t pwLen) final;
void
doImportKey(const Name& keyName, shared_ptr<transform::PrivateKey> key) final;
diff --git a/utils/tracers/ndn-app-delay-tracer.cpp b/utils/tracers/ndn-app-delay-tracer.cpp
index d893a72..63fdf73 100644
--- a/utils/tracers/ndn-app-delay-tracer.cpp
+++ b/utils/tracers/ndn-app-delay-tracer.cpp
@@ -197,13 +197,12 @@
void
AppDelayTracer::Connect()
{
- Config::ConnectWithoutContext("/NodeList/" + m_node
- + "/ApplicationList/*/LastRetransmittedInterestDataDelay",
- MakeCallback(&AppDelayTracer::LastRetransmittedInterestDataDelay,
- this));
+ Config::ConnectWithoutContextFailSafe("/NodeList/" + m_node + "/ApplicationList/*/LastRetransmittedInterestDataDelay",
+ MakeCallback(&AppDelayTracer::LastRetransmittedInterestDataDelay,
+ this));
- Config::ConnectWithoutContext("/NodeList/" + m_node + "/ApplicationList/*/FirstInterestDataDelay",
- MakeCallback(&AppDelayTracer::FirstInterestDataDelay, this));
+ Config::ConnectWithoutContextFailSafe("/NodeList/" + m_node + "/ApplicationList/*/FirstInterestDataDelay",
+ MakeCallback(&AppDelayTracer::FirstInterestDataDelay, this));
}
void
diff --git a/wscript b/wscript
index 94206b4..1dbb9f4 100644
--- a/wscript
+++ b/wscript
@@ -30,7 +30,7 @@
conf.check_cxx(lib='pthread', uselib_store='PTHREAD', define_name='HAVE_PTHREAD', mandatory=False)
conf.check_sqlite3(mandatory=True)
- conf.check_openssl(mandatory=True, use='OPENSSL', atleast_version=0x10001000)
+ conf.check_openssl(mandatory=True, use='OPENSSL', atleast_version='1.1.1')
if not conf.env['LIB_BOOST']:
conf.report_optional_feature("ndnSIM", "ndnSIM", False,
@@ -77,15 +77,22 @@
conf.write_config_header('../../ns3/ndnSIM/NFD/core/config.hpp', remove=False)
def build(bld):
- (base, build, split) = bld.getVersion('NFD')
+ (base, build, VERSION_SPLIT) = bld.getVersion('NFD')
+
+ vmajor = int(VERSION_SPLIT[0])
+ vminor = int(VERSION_SPLIT[1]) if len(VERSION_SPLIT) >= 2 else 0
+ vpatch = int(VERSION_SPLIT[2]) if len(VERSION_SPLIT) >= 3 else 0
+
bld(features="subst",
name="version-NFD",
source='NFD/core/version.hpp.in', target='../../ns3/ndnSIM/NFD/core/version.hpp',
install_path=None,
VERSION_STRING=base,
VERSION_BUILD="%s-ndnSIM" % build,
- VERSION=int(split[0]) * 1000000 + int(split[1]) * 1000 + int(split[2]),
- VERSION_MAJOR=split[0], VERSION_MINOR=split[1], VERSION_PATCH=split[2])
+ VERSION=vmajor * 1000000 + vminor * 1000 + vpatch,
+ VERSION_MAJOR=str(vmajor),
+ VERSION_MINOR=str(vminor),
+ VERSION_PATCH=str(vpatch))
bld(features="subst",
name="versioncpp-NFD",
@@ -93,8 +100,10 @@
install_path=None,
VERSION_STRING=base,
VERSION_BUILD="%s-ndnSIM" % build,
- VERSION=int(split[0]) * 1000000 + int(split[1]) * 1000 + int(split[2]),
- VERSION_MAJOR=split[0], VERSION_MINOR=split[1], VERSION_PATCH=split[2])
+ VERSION=vmajor * 1000000 + vminor * 1000 + vpatch,
+ VERSION_MAJOR=str(vmajor),
+ VERSION_MINOR=str(vminor),
+ VERSION_PATCH=str(vpatch))
bld.objects(
features="cxx",
@@ -103,15 +112,21 @@
includes='../../ns3/ndnSIM/NFD',
use='version-NFD versioncpp-NFD')
- (base, build, split) = bld.getVersion('ndn-cxx')
+ (base, build, VERSION_SPLIT) = bld.getVersion('ndn-cxx')
+ vmajor = int(VERSION_SPLIT[0])
+ vminor = int(VERSION_SPLIT[1]) if len(VERSION_SPLIT) >= 2 else 0
+ vpatch = int(VERSION_SPLIT[2]) if len(VERSION_SPLIT) >= 3 else 0
+
bld(features="subst",
name="version-ndn-cxx",
source='ndn-cxx/ndn-cxx/version.hpp.in', target='../../ns3/ndnSIM/ndn-cxx/version.hpp',
install_path=None,
VERSION_STRING=base,
VERSION_BUILD="%s-ndnSIM" % build,
- VERSION=int(split[0]) * 1000000 + int(split[1]) * 1000 + int(split[2]),
- VERSION_MAJOR=split[0], VERSION_MINOR=split[1], VERSION_PATCH=split[2])
+ VERSION=vmajor * 1000000 + vminor * 1000 + vpatch,
+ VERSION_MAJOR=str(vmajor),
+ VERSION_MINOR=str(vminor),
+ VERSION_PATCH=str(vpatch))
deps = ['core', 'network', 'point-to-point', 'topology-read', 'mobility', 'internet']
if 'ns3-visualizer' in bld.env['NS3_ENABLED_MODULES']:
@@ -125,7 +140,8 @@
'ndn-cxx/ndn-cxx/net/network-monitor*.cpp',
'ndn-cxx/ndn-cxx/util/dummy-client-face.cpp',
'ndn-cxx/ndn-cxx/**/*osx.cpp',
- 'ndn-cxx/ndn-cxx/net/network-interface.cpp'])
+ 'ndn-cxx/ndn-cxx/net/network-interface.cpp',
+ 'ndn-cxx/**/*-android.cpp'])
nfdSrc = bld.path.ant_glob(['%s/**/*.cpp' % dir for dir in ['NFD/core', 'NFD/daemon']],
excl=['NFD/daemon/main.cpp',