examples: Modifying examples to work with the new codebase
diff --git a/examples/ndn-grid.cpp b/examples/ndn-grid.cpp
index d475dfd..0469109 100644
--- a/examples/ndn-grid.cpp
+++ b/examples/ndn-grid.cpp
@@ -17,14 +17,16 @@
*
* Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
+
// ndn-grid.cc
+
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/point-to-point-layout-module.h"
#include "ns3/ndnSIM-module.h"
-using namespace ns3;
+namespace ns3 {
/**
* This scenario simulates a grid topology (using PointToPointGrid module)
@@ -69,9 +71,11 @@
// Install NDN stack on all nodes
ndn::StackHelper ndnHelper;
- ndnHelper.SetForwardingStrategy("ns3::ndn::fw::BestRoute");
ndnHelper.InstallAll();
+ // Set BestRoute strategy
+ ndn::StrategyChoiceHelper::InstallAll("/", "/localhost/nfd/strategy/best-route");
+
// Installing global routing interface on all nodes
ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
ndnGlobalRoutingHelper.InstallAll();
@@ -107,3 +111,11 @@
return 0;
}
+
+} // namespace ns3
+
+int
+main(int argc, char* argv[])
+{
+ return ns3::main(argc, argv);
+}