Compilation fixes after upgrade to NFD 0.6.6 and removal of old-style CS

Change-Id: I5472ae71675d8419d8d6c70990182ef028803087
diff --git a/examples/ndn-congestion-alt-topo-plugin.cpp b/examples/ndn-congestion-alt-topo-plugin.cpp
index 8779944..9f3775e 100644
--- a/examples/ndn-congestion-alt-topo-plugin.cpp
+++ b/examples/ndn-congestion-alt-topo-plugin.cpp
@@ -69,8 +69,8 @@
 
   // Install NDN stack on all nodes
   ndn::StackHelper ndnHelper;
-  ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize",
-                               "1"); // ! Attention ! If set to 0, then MaxSize is infinite
+  ndnHelper.setPolicy("nfd::cs::lru");
+  ndnHelper.setCsSize(1);
   ndnHelper.InstallAll();
 
   // Set BestRoute strategy
diff --git a/examples/ndn-congestion-topo-plugin.cpp b/examples/ndn-congestion-topo-plugin.cpp
index fa72462..427620b 100644
--- a/examples/ndn-congestion-topo-plugin.cpp
+++ b/examples/ndn-congestion-topo-plugin.cpp
@@ -57,7 +57,8 @@
 
   // Install NDN stack on all nodes
   ndn::StackHelper ndnHelper;
-  ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "10000");
+  ndnHelper.setPolicy("nfd::cs::lru");
+  ndnHelper.setCsSize(10000);
   ndnHelper.InstallAll();
 
   // Choosing forwarding strategy
diff --git a/examples/ndn-load-balancer/random-load-balancer-strategy.cpp b/examples/ndn-load-balancer/random-load-balancer-strategy.cpp
index 4f61162..27756cd 100644
--- a/examples/ndn-load-balancer/random-load-balancer-strategy.cpp
+++ b/examples/ndn-load-balancer/random-load-balancer-strategy.cpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+/*
+ * Copyright (c) 2014-2019, Regents of the University of California,
+ *                          Arizona Board of Regents,
+ *                          Colorado State University,
+ *                          University Pierre & Marie Curie, Sorbonne University,
+ *                          Washington University in St. Louis,
+ *                          Beijing Institute of Technology,
+ *                          The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -29,7 +29,7 @@
 
 #include <ndn-cxx/util/random.hpp>
 
-#include "core/logger.hpp"
+#include "daemon/common/logger.hpp"
 
 NFD_LOG_INIT("RandomLoadBalancerStrategy");
 
@@ -61,7 +61,7 @@
 }
 
 void
-RandomLoadBalancerStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+RandomLoadBalancerStrategy::afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
                                                  const shared_ptr<pit::Entry>& pitEntry)
 {
   NFD_LOG_TRACE("afterReceiveInterest");
@@ -75,7 +75,7 @@
   const fib::NextHopList& nexthops = fibEntry.getNextHops();
 
   // Ensure there is at least 1 Face is available for forwarding
-  if (!hasFaceForForwarding(inFace, nexthops, pitEntry)) {
+  if (!hasFaceForForwarding(ingress.face, nexthops, pitEntry)) {
     this->rejectPendingInterest(pitEntry);
     return;
   }
@@ -90,9 +90,9 @@
     for (selected = nexthops.begin(); selected != nexthops.end() && currentIndex != randomIndex;
          ++selected, ++currentIndex) {
     }
-  } while (!canForwardToNextHop(inFace, pitEntry, *selected));
+  } while (!canForwardToNextHop(ingress.face, pitEntry, *selected));
 
-  this->sendInterest(pitEntry, selected->getFace(), interest);
+  this->sendInterest(pitEntry, FaceEndpoint(selected->getFace(), 0), interest);
 }
 
 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 ef11ae8..1a2e2c0 100644
--- a/examples/ndn-load-balancer/random-load-balancer-strategy.hpp
+++ b/examples/ndn-load-balancer/random-load-balancer-strategy.hpp
@@ -38,10 +38,11 @@
 public:
   RandomLoadBalancerStrategy(Forwarder& forwarder, const Name& name = getStrategyName());
 
-  virtual ~RandomLoadBalancerStrategy() override;
+  virtual
+  ~RandomLoadBalancerStrategy() override;
 
-  virtual void
-  afterReceiveInterest(const Face& inFace, const Interest& interest,
+  void
+  afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
                        const shared_ptr<pit::Entry>& pitEntry) override;
 
   static const Name&
diff --git a/examples/ndn-simple-wifi.cpp b/examples/ndn-simple-wifi.cpp
index 3d6891e..d89db34 100644
--- a/examples/ndn-simple-wifi.cpp
+++ b/examples/ndn-simple-wifi.cpp
@@ -105,7 +105,8 @@
   ndn::StackHelper ndnHelper;
   // ndnHelper.AddNetDeviceFaceCreateCallback (WifiNetDevice::GetTypeId (), MakeCallback
   // (MyNetDeviceFaceCallback));
-  ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "1000");
+  ndnHelper.setPolicy("nfd::cs::lru");
+  ndnHelper.setCsSize(1000);
   ndnHelper.SetDefaultRoutes(true);
   ndnHelper.Install(nodes);
 
diff --git a/examples/ndn-simple-with-different-sizes-content-store.cpp b/examples/ndn-simple-with-different-sizes-content-store.cpp
deleted file mode 100644
index 355d37d..0000000
--- a/examples/ndn-simple-with-different-sizes-content-store.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2011-2015  Regents of the University of California.
- *
- * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and
- * contributors.
- *
- * ndnSIM is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * ndnSIM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ndnSIM, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-// ndn-simple-with-different-sizes-content-store.cc
-
-#include "ns3/core-module.h"
-#include "ns3/network-module.h"
-#include "ns3/point-to-point-module.h"
-#include "ns3/ndnSIM-module.h"
-
-namespace ns3 {
-
-/**
- * This scenario simulates a very simple network topology:
- *
- *
- *      +----------+     1Mbps      +--------+     1Mbps      +----------+
- *      | consumer | <------------> | router | <------------> | producer |
- *      +----------+         10ms   +--------+          10ms  +----------+
- *
- * This scenario demonstrates how to use content store that responds to Freshness parameter set in
- *Datas.
- * That is, if producer set Freshness field to 2 seconds, the corresponding content object will not
- *be cached
- * more than 2 seconds (can be cached for a shorter time, if entry is evicted earlier)
- *
- *     NS_LOG=ndn.Consumer ./waf --run ndn-simple-with-different-sizes-content-store
- */
-
-int
-main(int argc, char* argv[])
-{
-  // 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"));
-
-  // Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
-  CommandLine cmd;
-  cmd.Parse(argc, argv);
-
-  // Creating nodes
-  NodeContainer nodes;
-  nodes.Create(3);
-
-  // Connecting nodes using two links
-  PointToPointHelper p2p;
-  p2p.Install(nodes.Get(0), nodes.Get(1));
-  p2p.Install(nodes.Get(1), nodes.Get(2));
-
-  // Install NDN stack on all nodes
-  ndn::StackHelper ndnHelper;
-  ndnHelper.SetDefaultRoutes(true);
-  ndnHelper.SetOldContentStore(
-    "ns3::ndn::cs::Freshness::Lru"); // don't set up max size here, will use default value = 100
-  ndnHelper.InstallAll();
-
-  // set up max sizes, after NDN stack is installed
-  Config::Set("/NodeList/0/$ns3::ndn::ContentStore/MaxSize",
-              UintegerValue(
-                1)); // number after nodeList is global ID of the node (= node->GetId ())
-  Config::Set("/NodeList/1/$ns3::ndn::ContentStore/MaxSize", UintegerValue(2));
-  Config::Set("/NodeList/2/$ns3::ndn::ContentStore/MaxSize", UintegerValue(200));
-
-  // Installing applications
-
-  // Consumer
-  ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");
-  // Consumer will request /prefix/0, /prefix/1, ...
-  consumerHelper.SetPrefix("/prefix");
-  consumerHelper.SetAttribute("Frequency", StringValue("10")); // 10 interests a second
-  consumerHelper.Install(nodes.Get(0));                        // first node
-
-  // Producer
-  ndn::AppHelper producerHelper("ns3::ndn::Producer");
-  // Producer will reply to all requests starting with /prefix
-  producerHelper.SetPrefix("/prefix");
-  producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
-  producerHelper.Install(nodes.Get(2)); // last node
-
-  Simulator::Stop(Seconds(20.0));
-
-  Simulator::Run();
-  Simulator::Destroy();
-
-  return 0;
-}
-
-} // namespace ns3
-
-int
-main(int argc, char* argv[])
-{
-  return ns3::main(argc, argv);
-}
diff --git a/examples/ndn-tree-cs-tracers.cpp b/examples/ndn-tree-cs-tracers.cpp
index cee7302..5cac62b 100644
--- a/examples/ndn-tree-cs-tracers.cpp
+++ b/examples/ndn-tree-cs-tracers.cpp
@@ -69,8 +69,8 @@
 
   // Install NDN stack on all nodes
   ndn::StackHelper ndnHelper;
-  ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize",
-                               "100"); // default ContentStore parameters
+  ndnHelper.setPolicy("nfd::cs::lru");
+  ndnHelper.setCsSize(100);
   ndnHelper.InstallAll();
 
   // Choosing forwarding strategy
diff --git a/examples/ndn-tree-with-l2tracer.cpp b/examples/ndn-tree-with-l2tracer.cpp
index ab80675..200ae1a 100644
--- a/examples/ndn-tree-with-l2tracer.cpp
+++ b/examples/ndn-tree-with-l2tracer.cpp
@@ -38,7 +38,8 @@
   /****************************************************************************/
   // Install NDN stack on all nodes
   ndn::StackHelper ndnHelper;
-  ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "1000");
+  ndnHelper.setPolicy("nfd::cs::lru");
+  ndnHelper.setCsSize(1000);
   ndnHelper.InstallAll();
   /****************************************************************************/
   // Installing global routing interface on all nodes