Upgrade to the latest version of NS-3 (ns-3.27-22-g90fb309d5)

Change-Id: I01fa76eabc327a5638627b27bc51e6330d5ad221
Refs: #4311
diff --git a/README.md b/README.md
index 878e4fe..01c7a7c 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,8 @@
 - Allows [simulation of real applications](http://ndnsim.net/guide-to-simulate-real-apps.html)
   written against ndn-cxx library
 
+- Requires a modified version of NS-3 based on version `ns-3.27-22-g90fb309d5`
+
 [ndnSIM documentation](http://ndnsim.net)
 ---------------------------------------------
 
diff --git a/examples/ndn-csma.cpp b/examples/ndn-csma.cpp
index da41a41..a30b0e5 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // 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 40f30be..fcf12f5 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::DropTailQueue::MaxPackets", StringValue("10"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(10));
 
   // Read optional command-line parameters
   CommandLine cmd;
diff --git a/examples/ndn-grid-multiple-strategies.cpp b/examples/ndn-grid-multiple-strategies.cpp
index 3f14548..b6ca0ed 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::DropTailQueue::MaxPackets", StringValue("10"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(10));
 
   // 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 1ca7210..bf4d566 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::DropTailQueue::MaxPackets", StringValue("10"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(10));
 
   // 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 5569b11..c13c405 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::DropTailQueue::MaxPackets", StringValue("20"))
+Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20))
 
 import sys; cmd = CommandLine(); cmd.Parse(sys.argv);
 
diff --git a/examples/ndn-simple-for-nrt-helper.cpp b/examples/ndn-simple-for-nrt-helper.cpp
index af67ac6..eb320a9 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
   CommandLine cmd;
@@ -128,4 +128,3 @@
 {
   return ns3::main(argc, argv);
 }
-
diff --git a/examples/ndn-simple-mpi.cpp b/examples/ndn-simple-mpi.cpp
index 84ec673..f15af34 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::DropTailQueue::MaxPackets", StringValue("10"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(10));
 
   bool nullmsg = false;
 
diff --git a/examples/ndn-simple-with-content-freshness.cpp b/examples/ndn-simple-with-content-freshness.cpp
index 4557890..baef23c 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
   CommandLine cmd;
diff --git a/examples/ndn-simple-with-different-sizes-content-store.cpp b/examples/ndn-simple-with-different-sizes-content-store.cpp
index 7f24225..921f32e 100644
--- a/examples/ndn-simple-with-different-sizes-content-store.cpp
+++ b/examples/ndn-simple-with-different-sizes-content-store.cpp
@@ -49,7 +49,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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // 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 948d89e..0afab4a 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // 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 12a0cbb..e58348e 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // 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 52e6928..74a9131 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // 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 f8bf1ca..108406a 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::DropTailQueue::MaxPackets", StringValue("20"))
+Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20))
 
 # 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 3df714f..41a830b 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // 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 596a219..8ebeccd 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::DropTailQueue::MaxPackets", StringValue("10"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(10));
 
   // Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
   CommandLine cmd;
diff --git a/tests/unit-tests/NFD/ncc.t.cpp b/tests/unit-tests/NFD/ncc.t.cpp
index 7ef24ff..b7bd801 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::DropTailQueue::MaxPackets", StringValue("500"));
+    Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(500));
 
       //            Creating a 3 node topology                //
       //                                                      //
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 a88b9e3..6abcf43 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // Connecting nodes in 6 node topology:                        //
   //                                                             //
diff --git a/tests/unit-tests/helper/ndn-stack-helper.t.cpp b/tests/unit-tests/helper/ndn-stack-helper.t.cpp
index a4fb8ed..04d5bba 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::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   // 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 cf06179..d8f9f4e 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::DropTailQueue::MaxPackets", StringValue("500"));
+    Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(500));
 
     // Creating two 3 node topologies:                      //
     //                                                      //
diff --git a/tests/unit-tests/model/ndn-old-content-store.t.cpp b/tests/unit-tests/model/ndn-old-content-store.t.cpp
index 362988c..a2919f4 100644
--- a/tests/unit-tests/model/ndn-old-content-store.t.cpp
+++ b/tests/unit-tests/model/ndn-old-content-store.t.cpp
@@ -29,7 +29,7 @@
 {
   Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
   Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
-  Config::SetDefault("ns3::DropTailQueue::MaxPackets", StringValue("20"));
+  Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
   getStackHelper().SetOldContentStore("ns3::ndn::cs::Random", "MaxSize", "10");
 
diff --git a/tests/unit-tests/ndn-cxx/face.t.cpp b/tests/unit-tests/ndn-cxx/face.t.cpp
index 459b33a..324043d 100644
--- a/tests/unit-tests/ndn-cxx/face.t.cpp
+++ b/tests/unit-tests/ndn-cxx/face.t.cpp
@@ -38,7 +38,7 @@
   {
     Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("10Mbps"));
     Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("10ms"));
-    Config::SetDefault("ns3::DropTailQueue::MaxPackets", StringValue("20"));
+    Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
     createTopology({{"A", "B"}});
     addRoutes({{"A", "B", "/test", 1}});
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 66e90a6..0f24b80 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::DropTailQueue::MaxPackets", StringValue("20"));
+    Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
     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 e941edc..0bb895f 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::DropTailQueue::MaxPackets", StringValue("20"));
+    Config::SetDefault("ns3::QueueBase::MaxPackets", UintegerValue(20));
 
     createTopology({
         {"1"},
diff --git a/utils/topology/annotated-topology-reader.cpp b/utils/topology/annotated-topology-reader.cpp
index 6a47455..23abc84 100644
--- a/utils/topology/annotated-topology-reader.cpp
+++ b/utils/topology/annotated-topology-reader.cpp
@@ -349,7 +349,7 @@
         uint32_t maxPackets = boost::lexical_cast<uint32_t>(link.GetAttribute("MaxPackets"));
 
         // compatibility mode. Only DropTailQueue is supported
-        p2p.SetQueue("ns3::DropTailQueue", "MaxPackets", UintegerValue(maxPackets));
+        p2p.SetQueue("ns3::DropTailQueue<Packet>", "MaxPackets", UintegerValue(maxPackets));
       }
       catch (...) {
         typedef boost::tokenizer<boost::escaped_list_separator<char>> tokenizer;