Skip to content

Commit f007a99

Browse files
committed
Upgrade to NFD 22.02 and ndn-cxx 0.8.0 and fixes for NS-3.35
Change-Id: Ia26204f1ecddc93729e5565d5dbbb2a3d1d9637e
1 parent 28da73c commit f007a99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+119
-120
lines changed

.waf-tools/version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def getVersion(conf, submodule, **kw):
2323
p = Utils.subprocess.Popen(cmd, stdout=Utils.subprocess.PIPE,
2424
cwd=submodule.abspath(),
2525
stderr=None, stdin=None)
26-
out = str(p.communicate()[0].strip())
26+
out = p.communicate()[0].strip().decode('utf-8')
2727
didGetVersion = (p.returncode == 0 and out != "")
2828
if didGetVersion:
2929
if out.startswith(tagPrefix):
@@ -33,7 +33,7 @@ def getVersion(conf, submodule, **kw):
3333
except OSError:
3434
pass
3535

36-
versionFile = submodule.find_node('VERSION')
36+
versionFile = submodule.find_node('VERSION.info')
3737

3838
if not didGetVersion and versionFile is not None:
3939
try:
@@ -49,7 +49,7 @@ def getVersion(conf, submodule, **kw):
4949
except (OSError, IOError):
5050
Logs.warn("VERSION file exists, but not readable")
5151
else:
52-
versionFile = submodule.make_node('VERSION')
52+
versionFile = submodule.make_node('VERSION.info')
5353

5454
if versionFile:
5555
try:

NFD

Submodule NFD updated 352 files

apps/ndn-producer.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,18 @@ Producer::OnInterest(shared_ptr<const Interest> interest)
110110

111111
data->setContent(make_shared< ::ndn::Buffer>(m_virtualPayloadSize));
112112

113-
Signature signature;
114113
SignatureInfo signatureInfo(static_cast< ::ndn::tlv::SignatureTypeValue>(255));
115114

116115
if (m_keyLocator.size() > 0) {
117116
signatureInfo.setKeyLocator(m_keyLocator);
118117
}
119118

120-
signature.setInfo(signatureInfo);
121-
signature.setValue(::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature));
119+
data->setSignatureInfo(signatureInfo);
122120

123-
data->setSignature(signature);
121+
::ndn::EncodingEstimator estimator;
122+
::ndn::EncodingBuffer encoder(estimator.appendVarNumber(m_signature), 0);
123+
encoder.appendVarNumber(m_signature);
124+
data->setSignatureValue(encoder.getBuffer());
124125

125126
NS_LOG_INFO("node(" << GetNode()->GetId() << ") responding with Data: " << data->getName());
126127

examples/lfid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "ns3/ndnSIM/model/ndn-l3-protocol.hpp"
3131
#include "ns3/ndnSIM/model/ndn-net-device-transport.hpp"
3232
//#include "ns3/ndnSIM/NFD/daemon/fw/random-strategy.hpp"
33-
#include "ns3/ndnSIM/NFD/daemon/fw/best-route-strategy2.hpp"
33+
#include "ns3/ndnSIM/NFD/daemon/fw/best-route-strategy.hpp"
3434
#include "ns3/ndnSIM/utils/topology/annotated-topology-reader.hpp"
3535

3636
namespace ns3 {
@@ -120,7 +120,7 @@ main(int argc, char* argv[])
120120

121121
// IMPORTANT: Some strategy needs to be installed for displayRoutes() to work.
122122
ndn::StrategyChoiceHelper strategyHelper;
123-
strategyHelper.InstallAll<nfd::fw::BestRouteStrategy2>("/");
123+
strategyHelper.InstallAll<nfd::fw::BestRouteStrategy>("/");
124124

125125
// TODO: Needs RandomStrategy for test to work!
126126
// Uncomment after NFD version has been updated.

examples/ndn-csma.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ main(int argc, char* argv[])
5555
// setting default parameters for PointToPoint links and channels
5656
Config::SetDefault("ns3::CsmaChannel::DataRate", StringValue("1Mbps"));
5757
Config::SetDefault("ns3::CsmaChannel::Delay", StringValue("10ms"));
58-
Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"));
58+
Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"));
5959

6060
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
6161
CommandLine cmd;

examples/ndn-different-strategy-per-prefix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ main(int argc, char* argv[])
6464
// Setting default parameters for PointToPoint links and channels
6565
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
6666
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
67-
Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("10p"));
67+
Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("10p"));
6868

6969
// Read optional command-line parameters
7070
CommandLine cmd;

examples/ndn-grid-multiple-strategies.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ main(int argc, char* argv[])
6464
// Setting default parameters for PointToPoint links and channels
6565
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
6666
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
67-
Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("10p"));
67+
Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("10p"));
6868

6969
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
7070
CommandLine cmd;

examples/ndn-grid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ main(int argc, char* argv[])
5757
// Setting default parameters for PointToPoint links and channels
5858
Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));
5959
Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
60-
Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("10p"));
60+
Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("10p"));
6161

6262
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
6363
CommandLine cmd;

examples/ndn-grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
Config.SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"))
5353
Config.SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"))
54-
Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("20p"))
54+
Config::SetDefault("ns3::DropTailQueue<Packet>::MaxSize", StringValue("20p"))
5555

5656
import sys; cmd = CommandLine(); cmd.Parse(sys.argv);
5757

examples/ndn-load-balancer/random-load-balancer-strategy.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ RandomLoadBalancerStrategy::~RandomLoadBalancerStrategy()
4949
static bool
5050
canForwardToNextHop(const Face& inFace, shared_ptr<pit::Entry> pitEntry, const fib::NextHop& nexthop)
5151
{
52-
return !wouldViolateScope(inFace, pitEntry->getInterest(), nexthop.getFace()) &&
53-
canForwardToLegacy(*pitEntry, nexthop.getFace());
52+
return !wouldViolateScope(inFace, pitEntry->getInterest(), nexthop.getFace());
5453
}
5554

5655
static bool
@@ -61,7 +60,7 @@ hasFaceForForwarding(const Face& inFace, const fib::NextHopList& nexthops, const
6160
}
6261

6362
void
64-
RandomLoadBalancerStrategy::afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
63+
RandomLoadBalancerStrategy::afterReceiveInterest(const Interest& interest, const FaceEndpoint& ingress,
6564
const shared_ptr<pit::Entry>& pitEntry)
6665
{
6766
NFD_LOG_TRACE("afterReceiveInterest");
@@ -92,7 +91,7 @@ RandomLoadBalancerStrategy::afterReceiveInterest(const FaceEndpoint& ingress, co
9291
}
9392
} while (!canForwardToNextHop(ingress.face, pitEntry, *selected));
9493

95-
this->sendInterest(pitEntry, FaceEndpoint(selected->getFace(), 0), interest);
94+
this->sendInterest(interest, selected->getFace(), pitEntry);
9695
}
9796

9897
const Name&

0 commit comments

Comments
 (0)