diff --git a/.gitmodules b/.gitmodules
index fb3347b..e250871 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,8 +1,8 @@
 [submodule "NFD"]
 	path = NFD
 	url = https://github.com/named-data-ndnSIM/NFD
-	branch = NFD-0.6.1-ndnSIM
+	branch = NFD-0.6.5-ndnSIM
 [submodule "ndn-cxx"]
 	path = ndn-cxx
 	url = https://github.com/named-data-ndnSIM/ndn-cxx
-	branch = ndn-cxx-0.6.1-ndnSIM
+	branch = ndn-cxx-0.6.5-ndnSIM
diff --git a/NFD b/NFD
index 0a30676..49f22b0 160000
--- a/NFD
+++ b/NFD
@@ -1 +1 @@
-Subproject commit 0a30676920b9d3f2b2c8bc68e583befc415210cc
+Subproject commit 49f22b05e1a57b0a88d90cc0111f9a1d7a5cbd21
diff --git a/README.md b/README.md
index 883b7ae..b667af9 100644
--- a/README.md
+++ b/README.md
@@ -7,22 +7,22 @@
 went through extensive refactoring and rewriting.  The key new features of the new
 version:
 
-- Packet format changed to [NDN Packet Specification](http://named-data.net/doc/ndn-tlv/)
+- [NDN Packet Specification](http://named-data.net/doc/NDN-packet-spec/current/)
 
 - ndnSIM uses implementation of basic NDN primitives from
   [ndn-cxx library (NDN C++ library with eXperimental eXtensions)](http://named-data.net/doc/ndn-cxx/)
 
-  Based on version `0.6.0`
+  Based on version `0.6.5`
 
 - All NDN forwarding and management is implemented directly using source code of
   [Named Data Networking Forwarding Daemon (NFD)](http://named-data.net/doc/NFD/)
 
-  Based on version `0.6.0`
+  Based on version `0.6.5`
 
 - 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`
+- Requires a modified version of NS-3 based on version `ns-3.29`
 
 [ndnSIM documentation](http://ndnsim.net)
 ---------------------------------------------
diff --git a/apps/ndn-consumer.cpp b/apps/ndn-consumer.cpp
index a174fb3..c1dc44e 100644
--- a/apps/ndn-consumer.cpp
+++ b/apps/ndn-consumer.cpp
@@ -190,6 +190,7 @@
   shared_ptr<Interest> interest = make_shared<Interest>();
   interest->setNonce(m_rand->GetValue(0, std::numeric_limits<uint32_t>::max()));
   interest->setName(*nameWithSequence);
+  interest->setCanBePrefix(false);
   time::milliseconds interestLifeTime(m_interestLifeTime.GetMilliSeconds());
   interest->setInterestLifetime(interestLifeTime);
 
diff --git a/bindings/modulegen__gcc_ILP32.py b/bindings/modulegen__gcc_ILP32.py
index 6d139d2..7e539ef 100644
--- a/bindings/modulegen__gcc_ILP32.py
+++ b/bindings/modulegen__gcc_ILP32.py
@@ -41,7 +41,6 @@
         module.add_class('Interest')
         module.add_class('Data')
         module.add_class('Face', memory_policy=StdSharedPtr('ns3::ndn::Face'))
-        module.add_class('FaceContainer', memory_policy=Ns3PtrMemoryPolicy('::ns3::ndn::FaceContainer'))
 
         def reg_name(module):
             module.add_class('Component')
@@ -52,6 +51,8 @@
             module.add_class('Fib')
             module.add_class('Pit')
             module.add_class('Cs')
+            module.add_class('FaceTable')
+            module.add_class('Face')
 
             def reg_fib(module):
                 module.add_class('Entry')#, memory_policy=StdSharedPtr('ns3::ndn::nfd::fib::Entry'))
@@ -76,10 +77,10 @@
     def reg_stackhelper(cls):
         cls.add_constructor([])
 
-        cls.add_method('Install', 'ns3::Ptr<ns3::ndn::FaceContainer>', [param('ns3::Ptr<ns3::Node>', 'node')], is_const=True)
-        cls.add_method('Install', 'ns3::Ptr<ns3::ndn::FaceContainer>', [param('std::string const&', 'nodeName')], is_const=True)
-        cls.add_method('Install', 'ns3::Ptr<ns3::ndn::FaceContainer>', [param('const ns3::NodeContainer&', 'c')], is_const=True)
-        cls.add_method('InstallAll', 'ns3::Ptr<ns3::ndn::FaceContainer>', [], is_const=True)
+        cls.add_method('Install', retval('void'), [param('ns3::Ptr<ns3::Node>', 'node')], is_const=True)
+        cls.add_method('Install', retval('void'), [param('std::string const&', 'nodeName')], is_const=True)
+        cls.add_method('Install', retval('void'), [param('const ns3::NodeContainer&', 'c')], is_const=True)
+        cls.add_method('InstallAll', retval('void'), [], is_const=True)
 
         cls.add_method('SetDefaultRoutes', retval('void'), [param('bool', 'isEnabled', default_value='true')], is_const=True)
         cls.add_method('SetStackAttributes',
@@ -210,15 +211,23 @@
         cls.add_method('getForwarder', 'std::shared_ptr<ns3::ndn::nfd::Forwarder>', [])
     register_L3Protocol(root_module['ns3::ndn::L3Protocol'])
 
+    # shared_ptr<Face>
     def reg_Face(cls):
         cls.add_output_stream_operator()
         cls.add_method('getId', retval('int64_t'), [], is_const=True)
     reg_Face(root_module['ns3::ndn::Face'])
 
+    # without shared_ptr
+    def reg_nfdFace(cls):
+        cls.add_output_stream_operator()
+        cls.add_method('getId', retval('int64_t'), [], is_const=True)
+    reg_nfdFace(root_module['ns3::ndn::nfd::Face'])
+
     def reg_NfdForwarder(cls):
         cls.add_method('getFib', retval('const ns3::ndn::nfd::Fib&', caller_manages_return=False), [], is_const=True)
         cls.add_method('getPit', retval('const ns3::ndn::nfd::Pit&', caller_manages_return=False), [], is_const=True)
         cls.add_method('getCs', retval('const ns3::ndn::nfd::Cs&', caller_manages_return=False), [], is_const=True)
+        cls.add_method('getFaceTable', retval('const ns3::ndn::nfd::FaceTable&', caller_manages_return=False), [], is_const=True)
     reg_NfdForwarder(root_module['ns3::ndn::nfd::Forwarder'])
 
     #############
@@ -250,7 +259,7 @@
         reg_Entry(root_module['ns3::ndn::nfd::fib::Entry'])
 
         def reg_NextHop(cls):
-            cls.add_constructor([param('const ns3::ndn::Face&', 'face')])
+            cls.add_constructor([param('const ns3::ndn::Face&', 'face'), param('uint64_t', 'endpointId')])
 
             cls.add_function_as_method('getFaceFromFibNextHop', 'std::shared_ptr<ns3::ndn::Face>',
                                        [param('const ns3::ndn::nfd::fib::NextHop&', 'obj')],
@@ -297,6 +306,16 @@
     #### CS ####
     #############
 
+    ###################
+    #### FaceTable ####
+    def reg_NfdFaceTable(root_module, cls):
+        cls.add_method('size', retval('size_t'), [], is_const=True)
+        cls.add_container_traits(retval('const ns3::ndn::nfd::Face&', caller_manages_return=False),
+                                 begin_method='begin', end_method='end', iterator_type='const_iterator')
+    reg_NfdFaceTable(root_module, root_module['ns3::ndn::nfd::FaceTable'])
+    #### FaceTable ####
+    ###################
+
 def reg_other_modules(root_module):
     def reg_ApplicationContainer(cls):
         cls.add_constructor([])
diff --git a/bindings/modulegen__gcc_LP64.py b/bindings/modulegen__gcc_LP64.py
index 6d139d2..7e539ef 100644
--- a/bindings/modulegen__gcc_LP64.py
+++ b/bindings/modulegen__gcc_LP64.py
@@ -41,7 +41,6 @@
         module.add_class('Interest')
         module.add_class('Data')
         module.add_class('Face', memory_policy=StdSharedPtr('ns3::ndn::Face'))
-        module.add_class('FaceContainer', memory_policy=Ns3PtrMemoryPolicy('::ns3::ndn::FaceContainer'))
 
         def reg_name(module):
             module.add_class('Component')
@@ -52,6 +51,8 @@
             module.add_class('Fib')
             module.add_class('Pit')
             module.add_class('Cs')
+            module.add_class('FaceTable')
+            module.add_class('Face')
 
             def reg_fib(module):
                 module.add_class('Entry')#, memory_policy=StdSharedPtr('ns3::ndn::nfd::fib::Entry'))
@@ -76,10 +77,10 @@
     def reg_stackhelper(cls):
         cls.add_constructor([])
 
-        cls.add_method('Install', 'ns3::Ptr<ns3::ndn::FaceContainer>', [param('ns3::Ptr<ns3::Node>', 'node')], is_const=True)
-        cls.add_method('Install', 'ns3::Ptr<ns3::ndn::FaceContainer>', [param('std::string const&', 'nodeName')], is_const=True)
-        cls.add_method('Install', 'ns3::Ptr<ns3::ndn::FaceContainer>', [param('const ns3::NodeContainer&', 'c')], is_const=True)
-        cls.add_method('InstallAll', 'ns3::Ptr<ns3::ndn::FaceContainer>', [], is_const=True)
+        cls.add_method('Install', retval('void'), [param('ns3::Ptr<ns3::Node>', 'node')], is_const=True)
+        cls.add_method('Install', retval('void'), [param('std::string const&', 'nodeName')], is_const=True)
+        cls.add_method('Install', retval('void'), [param('const ns3::NodeContainer&', 'c')], is_const=True)
+        cls.add_method('InstallAll', retval('void'), [], is_const=True)
 
         cls.add_method('SetDefaultRoutes', retval('void'), [param('bool', 'isEnabled', default_value='true')], is_const=True)
         cls.add_method('SetStackAttributes',
@@ -210,15 +211,23 @@
         cls.add_method('getForwarder', 'std::shared_ptr<ns3::ndn::nfd::Forwarder>', [])
     register_L3Protocol(root_module['ns3::ndn::L3Protocol'])
 
+    # shared_ptr<Face>
     def reg_Face(cls):
         cls.add_output_stream_operator()
         cls.add_method('getId', retval('int64_t'), [], is_const=True)
     reg_Face(root_module['ns3::ndn::Face'])
 
+    # without shared_ptr
+    def reg_nfdFace(cls):
+        cls.add_output_stream_operator()
+        cls.add_method('getId', retval('int64_t'), [], is_const=True)
+    reg_nfdFace(root_module['ns3::ndn::nfd::Face'])
+
     def reg_NfdForwarder(cls):
         cls.add_method('getFib', retval('const ns3::ndn::nfd::Fib&', caller_manages_return=False), [], is_const=True)
         cls.add_method('getPit', retval('const ns3::ndn::nfd::Pit&', caller_manages_return=False), [], is_const=True)
         cls.add_method('getCs', retval('const ns3::ndn::nfd::Cs&', caller_manages_return=False), [], is_const=True)
+        cls.add_method('getFaceTable', retval('const ns3::ndn::nfd::FaceTable&', caller_manages_return=False), [], is_const=True)
     reg_NfdForwarder(root_module['ns3::ndn::nfd::Forwarder'])
 
     #############
@@ -250,7 +259,7 @@
         reg_Entry(root_module['ns3::ndn::nfd::fib::Entry'])
 
         def reg_NextHop(cls):
-            cls.add_constructor([param('const ns3::ndn::Face&', 'face')])
+            cls.add_constructor([param('const ns3::ndn::Face&', 'face'), param('uint64_t', 'endpointId')])
 
             cls.add_function_as_method('getFaceFromFibNextHop', 'std::shared_ptr<ns3::ndn::Face>',
                                        [param('const ns3::ndn::nfd::fib::NextHop&', 'obj')],
@@ -297,6 +306,16 @@
     #### CS ####
     #############
 
+    ###################
+    #### FaceTable ####
+    def reg_NfdFaceTable(root_module, cls):
+        cls.add_method('size', retval('size_t'), [], is_const=True)
+        cls.add_container_traits(retval('const ns3::ndn::nfd::Face&', caller_manages_return=False),
+                                 begin_method='begin', end_method='end', iterator_type='const_iterator')
+    reg_NfdFaceTable(root_module, root_module['ns3::ndn::nfd::FaceTable'])
+    #### FaceTable ####
+    ###################
+
 def reg_other_modules(root_module):
     def reg_ApplicationContainer(cls):
         cls.add_constructor([])
diff --git a/examples/ndn-simple.py b/examples/ndn-simple.py
index 7aeebce..447fd9c 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::QueueBase::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/helper/ndn-app-helper.cpp b/helper/ndn-app-helper.cpp
index 2556659..0fe7f5c 100644
--- a/helper/ndn-app-helper.cpp
+++ b/helper/ndn-app-helper.cpp
@@ -84,15 +84,20 @@
 Ptr<Application>
 AppHelper::InstallPriv(Ptr<Node> node)
 {
+  Ptr<Application> app;
+  Simulator::ScheduleWithContext(node->GetId(), Seconds(0), MakeEvent([=, &app] {
 #ifdef NS3_MPI
-  if (MpiInterface::IsEnabled() && node->GetSystemId() != MpiInterface::GetSystemId()) {
-    // don't create an app if MPI is enabled and node is not in the correct partition
-    return 0;
-  }
+        if (MpiInterface::IsEnabled() && node->GetSystemId() != MpiInterface::GetSystemId()) {
+          // don't create an app if MPI is enabled and node is not in the correct partition
+          return 0;
+        }
 #endif
 
-  Ptr<Application> app = m_factory.Create<Application>();
-  node->AddApplication(app);
+        app = m_factory.Create<Application>();
+        node->AddApplication(app);
+      }));
+  Simulator::Stop(Seconds(0));
+  Simulator::Run();
 
   return app;
 }
diff --git a/helper/ndn-face-container.cpp b/helper/ndn-face-container.cpp
deleted file mode 100644
index 5e9c6e3..0000000
--- a/helper/ndn-face-container.cpp
+++ /dev/null
@@ -1,92 +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/>.
- **/
-
-#include "ndn-face-container.hpp"
-
-#include <algorithm>
-
-namespace ns3 {
-namespace ndn {
-
-FaceContainer::FaceContainer() = default;
-
-FaceContainer::FaceContainer(const FaceContainer& other)
-{
-  AddAll(other);
-}
-
-FaceContainer&
-FaceContainer::operator= (const FaceContainer &other)
-{
-  m_faces.clear();
-  AddAll(other);
-
-  return *this;
-}
-
-void
-FaceContainer::AddAll(Ptr<FaceContainer> other)
-{
-  AddAll(*other);
-}
-
-void
-FaceContainer::AddAll(const FaceContainer& other)
-{
-  if (this == &other) { // adding self to self, need to make a copy
-    auto copyOfFaces = other.m_faces;
-    m_faces.insert(m_faces.end(), copyOfFaces.begin(), copyOfFaces.end());
-  }
-  else {
-    m_faces.insert(m_faces.end(), other.m_faces.begin(), other.m_faces.end());
-  }
-}
-
-FaceContainer::Iterator
-FaceContainer::Begin(void) const
-{
-  return m_faces.begin();
-}
-
-FaceContainer::Iterator
-FaceContainer::End(void) const
-{
-  return m_faces.end();
-}
-
-uint32_t
-FaceContainer::GetN(void) const
-{
-  return m_faces.size();
-}
-
-void
-FaceContainer::Add(shared_ptr<Face> face)
-{
-  m_faces.push_back(face);
-}
-
-shared_ptr<Face>
-FaceContainer::Get(size_t i) const
-{
-  return m_faces.at(i);
-}
-
-} // namespace ndn
-} // namespace ns3
diff --git a/helper/ndn-face-container.hpp b/helper/ndn-face-container.hpp
deleted file mode 100644
index 545ff4d..0000000
--- a/helper/ndn-face-container.hpp
+++ /dev/null
@@ -1,139 +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/>.
- **/
-
-#ifndef NDN_FACE_CONTAINER_H
-#define NDN_FACE_CONTAINER_H
-
-#include "ns3/ndnSIM/model/ndn-common.hpp"
-
-#include <stdint.h>
-#include <vector>
-
-#include "ns3/ptr.h"
-#include "ns3/simple-ref-count.h"
-
-namespace ns3 {
-namespace ndn {
-
-/**
- * @ingroup ndn-helpers
- * @brief A pool for Ndn faces
- *
- * Provides tools to perform basic manipulation on faces, such as setting metrics and
- * states on faces
- *
- * @see ndn::StackHelper
- */
-class FaceContainer : public SimpleRefCount<FaceContainer> {
-private:
-  typedef std::vector<shared_ptr<Face>> Container;
-
-public:
-  typedef Container::const_iterator Iterator; ///< @brief Iterator over FaceContainer
-
-  /**
-   * @brief Create an empty FaceContainer.
-   */
-  FaceContainer();
-
-  /**
-   * @brief Copy constructor for FaceContainer. Calls AddAll method
-   *
-   * @see FaceContainer::AddAll
-   */
-  FaceContainer(const FaceContainer& other);
-
-  /**
-   * @brief Copy operator for FaceContainer. Empties vector and calls AddAll method
-   *
-   * All previously obtained iterators (Begin() and End()) will be invalidated
-   *
-   * @see FaceContainer::AddAll
-   */
-  FaceContainer&
-  operator=(const FaceContainer& other);
-
-  /**
-   * Add an entry to the container
-   *
-   * @param face a smart pointer to a Face-derived object
-   */
-  void
-  Add(shared_ptr<Face> face);
-
-  /**
-   * @brief Add all entries from other container
-   *
-   * @param other smart pointer to a container
-   */
-  void
-  AddAll(Ptr<FaceContainer> other);
-
-  /**
-   * @brief Add all entries from other container
-   *
-   * @param other container
-   */
-  void
-  AddAll(const FaceContainer& other);
-
-public: // accessors
-  /**
-   * @brief Get an iterator which refers to the first pair in the
-   * container.
-   *
-   * @returns an iterator which refers to the first pair in the container.
-   */
-  Iterator
-  Begin() const;
-
-  /**
-   * @brief Get an iterator which indicates past-the-last Node in the
-   * container.
-   *
-   * @returns an iterator which indicates an ending condition for a loop.
-   */
-  Iterator
-  End() const;
-
-  /**
-   * @brief Get the number of faces stored in this container
-   *
-   * @returns the number of faces stored in this container
-   */
-  uint32_t
-  GetN() const;
-
-  /**
-   * Get a Face stored in the container
-   *
-   * @param pos index of the Face in the container
-   * @throw std::out_of_range if !(pos < GetN()).
-   */
-  shared_ptr<Face>
-  Get(size_t pos) const;
-
-private:
-  Container m_faces;
-};
-
-} // namespace ndn
-} // namespace ns3
-
-#endif /* NDN_FACE_CONTAINER_H */
diff --git a/helper/ndn-fib-helper.cpp b/helper/ndn-fib-helper.cpp
index a74ddb2..921c20f 100644
--- a/helper/ndn-fib-helper.cpp
+++ b/helper/ndn-fib-helper.cpp
@@ -50,7 +50,6 @@
 void
 FibHelper::AddNextHop(const ControlParameters& parameters, Ptr<Node> node)
 {
-  NS_LOG_DEBUG("Add Next Hop command was initialized");
   Block encodedParameters(parameters.wireEncode());
 
   Name commandName("/localhost/nfd/fib");
@@ -58,6 +57,7 @@
   commandName.append(encodedParameters);
 
   shared_ptr<Interest> command(make_shared<Interest>(commandName));
+  command->setCanBePrefix(false);
   StackHelper::getKeyChain().sign(*command);
 
   Ptr<L3Protocol> l3protocol = node->GetObject<L3Protocol>();
@@ -67,7 +67,6 @@
 void
 FibHelper::RemoveNextHop(const ControlParameters& parameters, Ptr<Node> node)
 {
-  NS_LOG_DEBUG("Remove Next Hop command was initialized");
   Block encodedParameters(parameters.wireEncode());
 
   Name commandName("/localhost/nfd/fib");
@@ -75,6 +74,7 @@
   commandName.append(encodedParameters);
 
   shared_ptr<Interest> command(make_shared<Interest>(commandName));
+  command->setCanBePrefix(false);
   StackHelper::getKeyChain().sign(*command);
 
   Ptr<L3Protocol> l3protocol = node->GetObject<L3Protocol>();
@@ -87,11 +87,6 @@
   NS_LOG_LOGIC("[" << node->GetId() << "]$ route add " << prefix << " via " << face->getLocalUri()
                    << " metric " << metric);
 
-  // Get L3Protocol object
-  Ptr<L3Protocol> L3protocol = node->GetObject<L3Protocol>();
-  // Get the forwarder instance
-  shared_ptr<nfd::Forwarder> m_forwarder = L3protocol->getForwarder();
-
   ControlParameters parameters;
   parameters.setName(prefix);
   parameters.setFaceId(face->getId());
@@ -177,6 +172,8 @@
 void
 FibHelper::RemoveRoute(Ptr<Node> node, const Name& prefix, shared_ptr<Face> face)
 {
+  NS_LOG_LOGIC("[" << node->GetId() << "]$ route del " << prefix << " via " << face->getLocalUri());
+
   // Get L3Protocol object
   Ptr<L3Protocol> L3protocol = node->GetObject<L3Protocol>();
   // Get the forwarder instance
diff --git a/helper/ndn-scenario-helper.cpp b/helper/ndn-scenario-helper.cpp
index af74386..a36a7c7 100644
--- a/helper/ndn-scenario-helper.cpp
+++ b/helper/ndn-scenario-helper.cpp
@@ -65,18 +65,6 @@
 }
 
 void
-ScenarioHelper::disableRibManager()
-{
-  ndnHelper.disableRibManager();
-}
-
-// void
-// ScenarioHelper::disableFaceManager()
-// {
-//   ndnHelper.disableFaceManager();
-// }
-
-void
 ScenarioHelper::disableStrategyChoiceManager()
 {
   ndnHelper.disableStrategyChoiceManager();
diff --git a/helper/ndn-scenario-helper.hpp b/helper/ndn-scenario-helper.hpp
index 292bc85..6a318ac 100644
--- a/helper/ndn-scenario-helper.hpp
+++ b/helper/ndn-scenario-helper.hpp
@@ -166,19 +166,6 @@
   getNetDevice(const std::string& node1, const std::string& node2);
 
   /**
-   * \brief Disable RIB Manager
-   */
-  void
-  disableRibManager();
-
-  // Cannot be disabled for now
-  // /**
-  //  * \brief Disable Face Manager
-  //  */
-  // void
-  // disableFaceManager();
-
-  /**
    * \brief Disable Strategy Choice Manager
    */
   void
diff --git a/helper/ndn-stack-helper.cpp b/helper/ndn-stack-helper.cpp
index 8391843..d2b8abb 100644
--- a/helper/ndn-stack-helper.cpp
+++ b/helper/ndn-stack-helper.cpp
@@ -25,6 +25,7 @@
 #include "ns3/point-to-point-net-device.h"
 #include "ns3/point-to-point-channel.h"
 #include "ns3/node-list.h"
+#include "ns3/simulator.h"
 
 #include "model/ndn-l3-protocol.hpp"
 #include "model/ndn-net-device-transport.hpp"
@@ -46,9 +47,7 @@
 namespace ndn {
 
 StackHelper::StackHelper()
-  : m_isRibManagerDisabled(false)
-  // , m_isFaceManagerDisabled(false)
-  , m_isForwarderStatusManagerDisabled(false)
+  : m_isForwarderStatusManagerDisabled(false)
   , m_isStrategyChoiceManagerDisabled(false)
   , m_needSetDefaultRoutes(false)
   , m_maxCsSize(100)
@@ -152,43 +151,39 @@
   }
 }
 
-Ptr<FaceContainer>
+void
 StackHelper::Install(const NodeContainer& c) const
 {
-  Ptr<FaceContainer> faces = Create<FaceContainer>();
   for (NodeContainer::Iterator i = c.Begin(); i != c.End(); ++i) {
-    faces->AddAll(Install(*i));
+    Install(*i);
   }
-  return faces;
 }
 
-Ptr<FaceContainer>
+void
 StackHelper::InstallAll() const
 {
-  return Install(NodeContainer::GetGlobal());
+  Install(NodeContainer::GetGlobal());
 }
 
-Ptr<FaceContainer>
+void
 StackHelper::Install(Ptr<Node> node) const
 {
-  Ptr<FaceContainer> faces = Create<FaceContainer>();
-
   if (node->GetObject<L3Protocol>() != 0) {
     NS_FATAL_ERROR("Cannot re-install NDN stack on node "
                    << node->GetId());
-    return 0;
+    return;
   }
+  Simulator::ScheduleWithContext(node->GetId(), Seconds(0), &StackHelper::doInstall, this, node);
+  Simulator::Stop(Seconds(0));
+  Simulator::Run(); // to automatically dispatch events on proper nodes
+}
 
+void
+StackHelper::doInstall(Ptr<Node> node) const
+{
+  // async install to ensure proper context
   Ptr<L3Protocol> ndn = m_ndnFactory.Create<L3Protocol>();
 
-  if (m_isRibManagerDisabled) {
-    ndn->getConfig().put("ndnSIM.disable_rib_manager", true);
-  }
-
-  // if (m_isFaceManagerDisabled) {
-  //   ndn->getConfig().put("ndnSIM.disable_face_manager", true);
-  // }
-
   if (m_isForwarderStatusManagerDisabled) {
     ndn->getConfig().put("ndnSIM.disable_forwarder_status_manager", true);
   }
@@ -218,10 +213,8 @@
     // if (DynamicCast<LoopbackNetDevice> (device) != 0)
     //   continue; // don't create face for a LoopbackNetDevice
 
-    faces->Add(this->createAndRegisterFace(node, ndn, device));
+    this->createAndRegisterFace(node, ndn, device);
   }
-
-  return faces;
 }
 
 void
@@ -332,11 +325,11 @@
   return face;
 }
 
-Ptr<FaceContainer>
+void
 StackHelper::Install(const std::string& nodeName) const
 {
   Ptr<Node> node = Names::Find<Node>(nodeName);
-  return Install(node);
+  Install(node);
 }
 
 void
@@ -400,24 +393,14 @@
 
   if (m_needSetDefaultRoutes) {
     // default route with lowest priority possible
-    FibHelper::AddRoute(node, "/", face, std::numeric_limits<int32_t>::max());
+    Simulator::ScheduleWithContext(node->GetId(), Seconds(0), MakeEvent([=] {
+          FibHelper::AddRoute(node, "/", face, std::numeric_limits<int32_t>::max());
+        }));
   }
   return face;
 }
 
 void
-StackHelper::disableRibManager()
-{
-  m_isRibManagerDisabled = true;
-}
-
-// void
-// StackHelper::disableFaceManager()
-// {
-//   m_isFaceManagerDisabled = true;
-// }
-
-void
 StackHelper::disableStrategyChoiceManager()
 {
   m_isStrategyChoiceManagerDisabled = true;
diff --git a/helper/ndn-stack-helper.hpp b/helper/ndn-stack-helper.hpp
index 2d2b8fb..18ce308 100644
--- a/helper/ndn-stack-helper.hpp
+++ b/helper/ndn-stack-helper.hpp
@@ -27,7 +27,6 @@
 #include "ns3/node.h"
 #include "ns3/node-container.h"
 
-#include "ndn-face-container.hpp"
 #include "ndn-fib-helper.hpp"
 #include "ndn-strategy-choice-helper.hpp"
 
@@ -143,7 +142,7 @@
   * \returns list of installed faces in the form of a smart pointer
   * to NdnFaceContainer object
   */
-  Ptr<FaceContainer>
+  void
   Install(const std::string& nodeName) const;
 
   /**
@@ -157,7 +156,7 @@
    * \returns list of installed faces in the form of a smart pointer
    * to FaceContainer object
    */
-  Ptr<FaceContainer>
+  void
   Install(Ptr<Node> node) const;
 
   /**
@@ -172,7 +171,7 @@
    * \returns list of installed faces in the form of a smart pointer
    * to FaceContainer object
    */
-  Ptr<FaceContainer>
+  void
   Install(const NodeContainer& c) const;
 
   /**
@@ -181,7 +180,7 @@
    * \returns list of installed faces in the form of a smart pointer
    * to FaceContainer object
    */
-  Ptr<FaceContainer>
+  void
   InstallAll() const;
 
   /**
@@ -224,19 +223,6 @@
   UpdateAll();
 
   /**
-   *\brief Disable the RIB manager of NFD
-   */
-  void
-  disableRibManager();
-
-  // Cannot be disabled for now
-  // /**
-  //  * \brief Disable Face Manager
-  //  */
-  // void
-  // disableFaceManager();
-
-  /**
    * \brief Disable Strategy Choice Manager
    */
   void
@@ -255,6 +241,10 @@
   SetLinkDelayAsFaceMetric();
 
 private:
+  void
+  doInstall(Ptr<Node> node) const;
+
+private:
   shared_ptr<Face>
   DefaultNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol> ndn, Ptr<NetDevice> netDevice) const;
 
@@ -264,8 +254,6 @@
   shared_ptr<Face>
   createAndRegisterFace(Ptr<Node> node, Ptr<L3Protocol> ndn, Ptr<NetDevice> device) const;
 
-  bool m_isRibManagerDisabled;
-  // bool m_isFaceManagerDisabled;
   bool m_isForwarderStatusManagerDisabled;
   bool m_isStrategyChoiceManagerDisabled;
 
diff --git a/helper/ndn-strategy-choice-helper.cpp b/helper/ndn-strategy-choice-helper.cpp
index 6958fce..215d34b 100644
--- a/helper/ndn-strategy-choice-helper.cpp
+++ b/helper/ndn-strategy-choice-helper.cpp
@@ -39,6 +39,7 @@
   commandName.append(encodedParameters);
 
   shared_ptr<Interest> command(make_shared<Interest>(commandName));
+  command->setCanBePrefix(false);
   StackHelper::getKeyChain().sign(*command);
 
   Ptr<L3Protocol> l3protocol = node->GetObject<L3Protocol>();
@@ -60,7 +61,11 @@
   parameters.setName(namePrefix);
   NS_LOG_DEBUG("Node ID: " << node->GetId() << " with forwarding strategy " << strategy);
   parameters.setStrategy(strategy);
-  sendCommand(parameters, node);
+
+  Simulator::ScheduleWithContext(node->GetId(), Seconds(0),
+                                 &StrategyChoiceHelper::sendCommand, parameters, node);
+  Simulator::Stop(Seconds(0));
+  Simulator::Run();
 }
 
 void
diff --git a/model/ndn-l3-protocol.cpp b/model/ndn-l3-protocol.cpp
index efb14f3..c5db46c 100644
--- a/model/ndn-l3-protocol.cpp
+++ b/model/ndn-l3-protocol.cpp
@@ -42,12 +42,13 @@
 #include "ns3/ndnSIM/NFD/daemon/mgmt/fib-manager.hpp"
 #include "ns3/ndnSIM/NFD/daemon/mgmt/face-manager.hpp"
 #include "ns3/ndnSIM/NFD/daemon/mgmt/strategy-choice-manager.hpp"
+#include "ns3/ndnSIM/NFD/daemon/mgmt/cs-manager.hpp"
 #include "ns3/ndnSIM/NFD/daemon/mgmt/forwarder-status-manager.hpp"
 // #include "ns3/ndnSIM/NFD/daemon/mgmt/general-config-section.hpp"
 #include "ns3/ndnSIM/NFD/daemon/mgmt/tables-config-section.hpp"
 #include "ns3/ndnSIM/NFD/daemon/mgmt/command-authenticator.hpp"
 
-#include "ns3/ndnSIM/NFD/rib/rib-manager.hpp"
+#include "ns3/ndnSIM/NFD/rib/service.hpp"
 
 #include "ns3/ndnSIM/NFD/daemon/face/null-face.hpp"
 #include "ns3/ndnSIM/NFD/daemon/face/internal-face.hpp"
@@ -167,24 +168,27 @@
 
   friend class L3Protocol;
 
-  std::shared_ptr<nfd::Forwarder> m_forwarder;
+  // note that shared_ptr needed for Python bindings
 
-  std::shared_ptr<nfd::Face> m_internalFace;
+  std::shared_ptr<::nfd::Forwarder> m_forwarder;
+  std::unique_ptr<::nfd::face::FaceSystem> m_faceSystem;
+
+  std::shared_ptr<::nfd::face::Face> m_internalFace;
   std::shared_ptr<::ndn::Face> m_internalClientFace;
-  std::shared_ptr<nfd::CommandAuthenticator> m_authenticator;
-
-  std::shared_ptr<nfd::Face> m_internalRibFace;
-  std::shared_ptr<::ndn::Face> m_internalRibClientFace;
-
   std::unique_ptr<::ndn::mgmt::Dispatcher> m_dispatcher;
-  std::unique_ptr<::ndn::mgmt::Dispatcher> m_dispatcherRib;
-  std::shared_ptr<nfd::FibManager> m_fibManager;
-  std::shared_ptr<nfd::FaceManager> m_faceManager;
-  std::shared_ptr<nfd::StrategyChoiceManager> m_strategyChoiceManager;
-  std::shared_ptr<nfd::ForwarderStatusManager> m_forwarderStatusManager;
-  std::shared_ptr<nfd::rib::RibManager> m_ribManager;
+  std::shared_ptr<::nfd::CommandAuthenticator> m_authenticator;
+  std::unique_ptr<::nfd::ForwarderStatusManager> m_forwarderStatusManager;
+  std::unique_ptr<::nfd::FaceManager> m_faceManager;
+  std::shared_ptr<::nfd::FibManager> m_fibManager;
+  std::unique_ptr<::nfd::CsManager> m_csManager;
+  std::unique_ptr<::nfd::StrategyChoiceManager> m_strategyChoiceManager;
 
-  std::shared_ptr<nfd::face::FaceSystem> m_faceSystem;
+  std::shared_ptr<::nfd::face::Face> m_internalFaceForInjects;
+  std::shared_ptr<::ndn::Face> m_internalClientFaceForInjects;
+
+  std::shared_ptr<::nfd::Face> m_internalRibFace;
+  std::shared_ptr<::ndn::Face> m_internalRibClientFace;
+  std::unique_ptr<::nfd::rib::Service> m_ribService;
 
   nfd::ConfigSection m_config;
 
@@ -206,16 +210,15 @@
 void
 L3Protocol::initialize()
 {
-  m_impl->m_forwarder = make_shared<nfd::Forwarder>();
+  m_impl->m_forwarder = make_shared<::nfd::Forwarder>();
+
+  ::nfd::FaceTable& faceTable = m_impl->m_forwarder->getFaceTable();
+  faceTable.addReserved(::nfd::face::makeNullFace(), ::nfd::face::FACEID_NULL);
+  // faceTable.addReserved(face::makeNullFace(FaceUri("contentstore://")), face::FACEID_CONTENT_STORE);
+  m_impl->m_faceSystem = make_unique<::nfd::face::FaceSystem>(faceTable, nullptr);
 
   initializeManagement();
-
-  nfd::FaceTable& faceTable = m_impl->m_forwarder->getFaceTable();
-  faceTable.addReserved(nfd::face::makeNullFace(), nfd::face::FACEID_NULL);
-
-  if (!this->getConfig().get<bool>("ndnSIM.disable_rib_manager", false)) {
-    Simulator::ScheduleWithContext(m_node->GetId(), Seconds(0), &L3Protocol::initializeRibManager, this);
-  }
+  initializeRibManager();
 
   m_impl->m_forwarder->beforeSatisfyInterest.connect(std::ref(m_satisfiedInterests));
   m_impl->m_forwarder->beforeExpirePendingInterest.connect(std::ref(m_timedOutInterests));
@@ -245,7 +248,7 @@
 void
 L3Protocol::injectInterest(const Interest& interest)
 {
-  m_impl->m_internalFace->sendInterest(interest);
+  m_impl->m_internalClientFaceForInjects->expressInterest(interest, nullptr, nullptr, nullptr);
 }
 
 void
@@ -260,43 +263,32 @@
   auto& forwarder = m_impl->m_forwarder;
   using namespace nfd;
 
-  m_impl->m_faceSystem = make_shared<nfd::face::FaceSystem>(forwarder->getFaceTable(), nullptr);
-
   std::tie(m_impl->m_internalFace, m_impl->m_internalClientFace) = face::makeInternalFace(StackHelper::getKeyChain());
   forwarder->getFaceTable().addReserved(m_impl->m_internalFace, face::FACEID_INTERNAL_FACE);
-  m_impl->m_dispatcher.reset(new ::ndn::mgmt::Dispatcher(*m_impl->m_internalClientFace, StackHelper::getKeyChain()));
 
-  m_impl->m_authenticator = CommandAuthenticator::create();
+  std::tie(m_impl->m_internalFaceForInjects, m_impl->m_internalClientFaceForInjects) = face::makeInternalFace(StackHelper::getKeyChain());
+  forwarder->getFaceTable().addReserved(m_impl->m_internalFaceForInjects, face::FACEID_INTERNAL_FACE + 1);
 
-  m_impl->m_fibManager.reset(new FibManager(forwarder->getFib(),
-                                            forwarder->getFaceTable(),
-                                            *m_impl->m_dispatcher,
-                                            *m_impl->m_authenticator));
+  m_impl->m_dispatcher = make_unique<::ndn::mgmt::Dispatcher>(*m_impl->m_internalClientFace, StackHelper::getKeyChain());
+  m_impl->m_authenticator = ::nfd::CommandAuthenticator::create();
 
-  // Cannot be disabled for now
-  // if (!this->getConfig().get<bool>("ndnSIM.disable_face_manager", false))
-
-  m_impl->m_faceManager.reset(new FaceManager(*m_impl->m_faceSystem,
-                                              *m_impl->m_dispatcher,
-                                              *m_impl->m_authenticator));
-  // }
-  // else {
-  //   this->getConfig().get_child("authorizations").get_child("authorize").get_child("privileges").erase("faces");
-  // }
-
+  if (!this->getConfig().get<bool>("ndnSIM.disable_forwarder_status_manager", false)) {
+    m_impl->m_forwarderStatusManager = make_unique<::nfd::ForwarderStatusManager>(*m_impl->m_forwarder, *m_impl->m_dispatcher);
+  }
+  m_impl->m_faceManager = make_unique<::nfd::FaceManager>(*m_impl->m_faceSystem, *m_impl->m_dispatcher, *m_impl->m_authenticator);
+  m_impl->m_fibManager = make_shared<::nfd::FibManager>(m_impl->m_forwarder->getFib(), m_impl->m_forwarder->getFaceTable(),
+                                                        *m_impl->m_dispatcher, *m_impl->m_authenticator);
+  m_impl->m_csManager = make_unique<::nfd::CsManager>(m_impl->m_forwarder->getCs(), m_impl->m_forwarder->getCounters(),
+                                                      *m_impl->m_dispatcher, *m_impl->m_authenticator);
   if (!this->getConfig().get<bool>("ndnSIM.disable_strategy_choice_manager", false)) {
-    m_impl->m_strategyChoiceManager.reset(new StrategyChoiceManager(forwarder->getStrategyChoice(),
-                                                                    *m_impl->m_dispatcher,
-                                                                    *m_impl->m_authenticator));
+    m_impl->m_strategyChoiceManager = make_unique<::nfd::StrategyChoiceManager>(m_impl->m_forwarder->getStrategyChoice(),
+                                                                                *m_impl->m_dispatcher, *m_impl->m_authenticator);
+
   }
   else {
     this->getConfig().get_child("authorizations").get_child("authorize").get_child("privileges").erase("strategy-choice");
   }
 
-  if (!this->getConfig().get<bool>("ndnSIM.disable_forwarder_status_manager", false)) {
-    m_impl->m_forwarderStatusManager.reset(new ForwarderStatusManager(*forwarder, *m_impl->m_dispatcher));
-  }
-
   ConfigFile config(&ConfigFile::ignoreUnknownSection);
 
   // if we use NFD's CS, we have to specify a replacement policy
@@ -321,8 +313,7 @@
 
   // add FIB entry for NFD Management Protocol
   Name topPrefix("/localhost/nfd");
-  auto entry = forwarder->getFib().insert(topPrefix).first;
-  entry->addNextHop(*(m_impl->m_internalFace), 0);
+  m_impl->m_forwarder->getFib().insert(topPrefix).first->addOrUpdateNextHop(*m_impl->m_internalFace, 0, 0);
   m_impl->m_dispatcher->addTopPrefix(topPrefix, false);
 }
 
@@ -334,30 +325,9 @@
   std::tie(m_impl->m_internalRibFace, m_impl->m_internalRibClientFace) = face::makeInternalFace(StackHelper::getKeyChain());
   m_impl->m_forwarder->getFaceTable().add(m_impl->m_internalRibFace);
 
-  m_impl->m_dispatcherRib.reset(new ::ndn::mgmt::Dispatcher(*m_impl->m_internalRibClientFace, StackHelper::getKeyChain()));
-
-  m_impl->m_ribManager = make_shared<rib::RibManager>(*(m_impl->m_dispatcherRib), *(m_impl->m_internalRibClientFace),
-                                                      StackHelper::getKeyChain());
-
-  ConfigFile config([] (const std::string& filename, const std::string& sectionName,
-                        const ConfigSection& section, bool isDryRun) {
-      // Ignore "log" and sections belonging to NFD,
-      // but raise an error if we're missing a handler for a "rib" section.
-      if (sectionName != "rib" || sectionName == "log") {
-        // do nothing
-      }
-      else {
-        // missing RIB section
-        ConfigFile::throwErrorOnUnknownSection(filename, sectionName, section, isDryRun);
-      }
-    });
-
-  m_impl->m_ribManager->setConfigFile(config);
-
-  // apply config
-  config.parse(m_impl->m_config, false, "ndnSIM.conf");
-
-  m_impl->m_ribManager->registerWithNfd();
+  m_impl->m_ribService = make_unique<rib::Service>(m_impl->m_config,
+                                                   std::ref(*m_impl->m_internalRibClientFace),
+                                                   std::ref(StackHelper::getKeyChain()));
 }
 
 shared_ptr<nfd::Forwarder>
@@ -372,10 +342,16 @@
   return m_impl->m_fibManager;
 }
 
-shared_ptr<nfd::StrategyChoiceManager>
+nfd::StrategyChoiceManager&
 L3Protocol::getStrategyChoiceManager()
 {
-  return m_impl->m_strategyChoiceManager;
+  return *m_impl->m_strategyChoiceManager;
+}
+
+::nfd::rib::Service&
+L3Protocol::getRibService()
+{
+  return *m_impl->m_ribService;
 }
 
 nfd::ConfigSection&
@@ -415,7 +391,7 @@
   // MUST HAPPEN BEFORE Simulator IS DESTROYED
   m_impl.reset();
 
-  nfd::scheduler::getGlobalScheduler().cancelAllEvents();
+  nfd::scheduler::resetGlobalScheduler();
 
   m_node = 0;
 
diff --git a/model/ndn-l3-protocol.hpp b/model/ndn-l3-protocol.hpp
index c3619aa..e5169af 100644
--- a/model/ndn-l3-protocol.hpp
+++ b/model/ndn-l3-protocol.hpp
@@ -43,6 +43,9 @@
 namespace cs {
 class Policy;
 } // namespace cs
+namespace rib {
+class Service;
+}
 } // namespace nfd
 
 namespace ns3 {
@@ -108,11 +111,14 @@
   getFibManager();
 
   /**
-   * \brief Get smart pointer to nfd::StrategyChoiceManager, used by node's NFD
+   * \brief Get nfd::StrategyChoiceManager, used by node's NFD
    */
-  shared_ptr<nfd::StrategyChoiceManager>
+  nfd::StrategyChoiceManager&
   getStrategyChoiceManager();
 
+  ::nfd::rib::Service&
+  getRibService();
+
   /**
    * \brief Add face to NDN stack
    *
diff --git a/ndn-cxx b/ndn-cxx
index c37bf16..4e37270 160000
--- a/ndn-cxx
+++ b/ndn-cxx
@@ -1 +1 @@
-Subproject commit c37bf1633828ef6b69646a4989a9cef855e08248
+Subproject commit 4e372702cfd09f76d5fa4ea1aea5b9152fc60c43
diff --git a/tests/unit-tests/NFD/ncc.t.cpp b/tests/unit-tests/NFD/ncc.t.cpp
index e53e00e..9884292 100644
--- a/tests/unit-tests/NFD/ncc.t.cpp
+++ b/tests/unit-tests/NFD/ncc.t.cpp
@@ -60,7 +60,7 @@
       addApps({
           {"A1", "ns3::ndn::ConsumerCbr",
               {{"Prefix", "/prefix"}, {"Frequency", "1000"}},
-              "0s", "5s"},
+              "0.1s", "1.1s"},
           {"A3", "ns3::ndn::Producer",
               {{"Prefix", "/prefix"}, {"PayloadSize", "1024"}},
               "0s", "10s"},
@@ -79,11 +79,11 @@
   Simulator::Stop(Seconds(5.2));
   BOOST_CHECK_NO_THROW(Simulator::Run());
 
-  BOOST_CHECK_EQUAL(getFace("A1", "A2")->getCounters().nOutInterests, 5000);
-  BOOST_CHECK_EQUAL(getFace("A2", "A3")->getCounters().nOutInterests, 5000);
+  BOOST_CHECK_EQUAL(getFace("A1", "A2")->getCounters().nOutInterests, 1000);
+  BOOST_CHECK_EQUAL(getFace("A2", "A3")->getCounters().nOutInterests, 1000);
 
-  BOOST_CHECK_EQUAL(getFace("A3", "A2")->getCounters().nOutData, 5000);
-  BOOST_CHECK_EQUAL(getFace("A2", "A1")->getCounters().nOutData, 5000);
+  BOOST_CHECK_EQUAL(getFace("A3", "A2")->getCounters().nOutData, 1000);
+  BOOST_CHECK_EQUAL(getFace("A2", "A1")->getCounters().nOutData, 1000);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/unit-tests/helper/ndn-face-container.t.cpp b/tests/unit-tests/helper/ndn-face-container.t.cpp
deleted file mode 100644
index 4129cbc..0000000
--- a/tests/unit-tests/helper/ndn-face-container.t.cpp
+++ /dev/null
@@ -1,101 +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/>.
- **/
-
-#include "helper/ndn-face-container.hpp"
-
-#include "ns3/node-container.h"
-#include "ns3/point-to-point-net-device.h"
-#include "ns3/node.h"
-#include "ns3/core-module.h"
-#include "ns3/network-module.h"
-#include "ns3/point-to-point-module.h"
-#include "ns3/ndnSIM-module.h"
-
-#include "NFD/daemon/face/null-face.hpp"
-
-#include "../tests-common.hpp"
-
-namespace ns3 {
-namespace ndn {
-
-BOOST_FIXTURE_TEST_SUITE(HelperNdnFaceContainer, CleanupFixture)
-
-BOOST_AUTO_TEST_CASE(Basic)
-{
-  FaceContainer c1;
-  BOOST_CHECK_EQUAL(c1.GetN(), 0);
-
-  c1.Add(nfd::face::makeNullFace(FaceUri("null://1")));
-  BOOST_CHECK_EQUAL(c1.GetN(), 1);
-
-  c1.Add(nfd::face::makeNullFace(FaceUri("null://2")));
-  BOOST_CHECK_EQUAL(c1.GetN(), 2);
-
-  FaceContainer c2(c1);
-  BOOST_CHECK_EQUAL(c2.GetN(), c1.GetN());
-
-  FaceContainer c3;
-  BOOST_CHECK_EQUAL(c3.GetN(), 0);
-
-  c3 = c1;
-  BOOST_CHECK_EQUAL(c3.GetN(), c1.GetN());
-
-  for (size_t i = 0; i < c1.GetN(); ++i) {
-    BOOST_CHECK_EQUAL(c1.Get(i)->getLocalUri(), c2.Get(i)->getLocalUri());
-    BOOST_CHECK_EQUAL(c1.Get(i)->getLocalUri(), c3.Get(i)->getLocalUri());
-  }
-
-  size_t pos = 0;
-  for (FaceContainer::Iterator i = c1.Begin(); i != c1.End(); ++i, ++pos) {
-    BOOST_CHECK_EQUAL((*i)->getLocalUri(), c2.Get(pos)->getLocalUri());
-    BOOST_CHECK_EQUAL((*i)->getLocalUri(), c3.Get(pos)->getLocalUri());
-  }
-}
-
-BOOST_AUTO_TEST_CASE(AddAll)
-{
-  FaceContainer c1;
-  c1.Add(nfd::face::makeNullFace(FaceUri("null://1")));
-  c1.Add(nfd::face::makeNullFace(FaceUri("null://2")));
-
-  FaceContainer c2(c1);
-  c2.AddAll(c1);
-  BOOST_CHECK_EQUAL(c2.GetN(), 4);
-
-  FaceContainer c3(c1);
-  c3.AddAll(c3);
-  BOOST_CHECK_EQUAL(c3.GetN(), 4);
-
-  Ptr<FaceContainer> c4 = Create<FaceContainer>(c1);
-  c4->AddAll(c4);
-
-  BOOST_CHECK_EQUAL_COLLECTIONS(c2.Begin(), c2.Begin() + c1.GetN(),
-                                c1.Begin(), c1.End());
-
-  BOOST_CHECK_EQUAL_COLLECTIONS(c2.Begin() + c1.GetN(), c2.End(),
-                                c1.Begin(), c1.End());
-
-  BOOST_CHECK_EQUAL_COLLECTIONS(c2.Begin(), c2.End(), c3.Begin(), c3.End());
-  BOOST_CHECK_EQUAL_COLLECTIONS(c2.Begin(), c2.End(), c4->Begin(), c4->End());
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace ndn
-} // namespace ns3
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 41f2057..868b9dc 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
@@ -155,6 +155,7 @@
 {
   FactoryCallbackApp::Install(getNode("1"), [this] () -> shared_ptr<void> {
       Interest i("/prefix/someData");
+      i.setCanBePrefix(false);
       i.setForwardingHint(makeHint(Name("/otherPrefix")));
       return make_shared<TesterApp>(i, this);
     })
@@ -174,6 +175,7 @@
 
   FactoryCallbackApp::Install(getNode("1"), [this] () -> shared_ptr<void> {
       Interest i("/prefix/someData");
+      i.setCanBePrefix(false);
       i.setForwardingHint(makeHint(Name("/otherPrefix")));
       return make_shared<TesterApp>(i, this);
     })
@@ -193,6 +195,7 @@
 
   FactoryCallbackApp::Install(getNode("1"), [this] () -> shared_ptr<void> {
       Interest i("/prefix/someData");
+      i.setCanBePrefix(false);
       i.setForwardingHint(makeHint(Name("/otherPrefix")));
       return make_shared<TesterApp>(i, this);
     })
@@ -212,6 +215,7 @@
 
   FactoryCallbackApp::Install(getNode("1"), [this] () -> shared_ptr<void> {
       Interest i("/prefix/someData");
+      i.setCanBePrefix(false);
       i.setForwardingHint(makeHint(Name("/otherPrefix/moreSpecific")));
       return make_shared<TesterApp>(i, this);
     })
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 a539141..cbcec2e 100644
--- a/tests/unit-tests/helper/ndn-strategy-choice-helper.t.cpp
+++ b/tests/unit-tests/helper/ndn-strategy-choice-helper.t.cpp
@@ -66,10 +66,10 @@
     addApps({
         {"A1", "ns3::ndn::ConsumerCbr",
             {{"Prefix", "/prefix"}, {"Frequency", "1"}},
-            "0s", "100s"},
+            "0.1s", "100s"},
         {"A2", "ns3::ndn::ConsumerCbr",
             {{"Prefix", "/prefix"}, {"Frequency", "1"}},
-            "0s", "100s"},
+            "0.1s", "100s"},
       });
   }
 };
@@ -78,7 +78,7 @@
 
 BOOST_AUTO_TEST_CASE(DefaultStrategies)
 {
-  Simulator::Stop(Seconds(5.0));
+  Simulator::Stop(Seconds(5));
   Simulator::Run();
 
   BOOST_CHECK_EQUAL(getFace("A1", "B1")->getCounters().nOutInterests, 0);
@@ -94,7 +94,7 @@
 {
   StrategyChoiceHelper::Install(getNode("A2"), "/prefix", "/localhost/nfd/strategy/multicast");
 
-  Simulator::Stop(Seconds(5.0));
+  Simulator::Stop(Seconds(5));
   Simulator::Run();
 
   BOOST_CHECK_EQUAL(getFace("A1", "B1")->getCounters().nOutInterests, 0);
@@ -114,7 +114,7 @@
 
   StrategyChoiceHelper::Install(nodes, "/prefix", "/localhost/nfd/strategy/multicast");
 
-  Simulator::Stop(Seconds(5.0));
+  Simulator::Stop(Seconds(5));
   Simulator::Run();
 
   BOOST_CHECK_EQUAL(getFace("A1", "B1")->getCounters().nOutInterests, 5);
@@ -130,7 +130,7 @@
 {
   StrategyChoiceHelper::InstallAll("/prefix", "/localhost/nfd/strategy/multicast");
 
-  Simulator::Stop(Seconds(5.0));
+  Simulator::Stop(Seconds(5));
   Simulator::Run();
 
   BOOST_CHECK_EQUAL(getFace("A1", "B1")->getCounters().nOutInterests, 5);
@@ -171,7 +171,7 @@
 {
   StrategyChoiceHelper::Install<NullStrategy>(getNode("A2"), "/prefix");
 
-  Simulator::Stop(Seconds(5.0));
+  Simulator::Stop(Seconds(5));
   Simulator::Run();
 
   BOOST_CHECK_EQUAL(getFace("A1", "B1")->getCounters().nOutInterests, 0);
@@ -192,7 +192,7 @@
 
   StrategyChoiceHelper::Install<NullStrategy>(nodes, "/prefix");
 
-  Simulator::Stop(Seconds(5.0));
+  Simulator::Stop(Seconds(5));
   Simulator::Run();
 
   BOOST_CHECK_EQUAL(getFace("A1", "B1")->getCounters().nOutInterests, 0);
@@ -209,7 +209,7 @@
 {
   StrategyChoiceHelper::InstallAll<NullStrategy>("/prefix");
 
-  Simulator::Stop(Seconds(5.0));
+  Simulator::Stop(Seconds(5));
   Simulator::Run();
 
   BOOST_CHECK_EQUAL(getFace("A1", "B1")->getCounters().nOutInterests, 0);
diff --git a/tests/unit-tests/model/ndn-block-header.t.cpp b/tests/unit-tests/model/ndn-block-header.t.cpp
index a8e10a9..5dc65f1 100644
--- a/tests/unit-tests/model/ndn-block-header.t.cpp
+++ b/tests/unit-tests/model/ndn-block-header.t.cpp
@@ -51,6 +51,7 @@
 {
   Interest interest("/prefix");
   interest.setNonce(10);
+  interest.setCanBePrefix(true);
   lp::Packet lpPacket(interest.wireEncode());
   nfd::face::Transport::Packet packet(lpPacket.wireEncode());
   BlockHeader header(packet);
@@ -91,6 +92,7 @@
 {
   Interest interest("/prefix");
   interest.setNonce(10);
+  interest.setCanBePrefix(true);
 
   lp::Packet lpPacket;
   lpPacket.add<::ndn::lp::SequenceField>(0); // to make sure that the NDNLP header is added
diff --git a/tests/unit-tests/model/ndn-l3-protocol.t.cpp b/tests/unit-tests/model/ndn-l3-protocol.t.cpp
index b8e51b8..cbfba58 100644
--- a/tests/unit-tests/model/ndn-l3-protocol.t.cpp
+++ b/tests/unit-tests/model/ndn-l3-protocol.t.cpp
@@ -62,6 +62,7 @@
         return make_shared<TesterApp>([this] (::ndn::Face& face) {
             for (const Name& dataset : requestedDatasets) {
               Interest i(dataset);
+              i.setCanBePrefix(true);
               face.expressInterest(i, [&] (const Interest& i, const Data& data) {
                   BOOST_TEST_MESSAGE(data.getName());
                   receivedDatasets.insert(data.getName().getPrefix(-2));
@@ -93,34 +94,6 @@
                                 receivedDatasets.begin(), receivedDatasets.end());
 }
 
-BOOST_AUTO_TEST_CASE(DisabledRibManager)
-{
-  // Disable RIB manager
-  disableRibManager();
-
-  setupAndRun();
-
-  BOOST_CHECK_EQUAL(requestedDatasets.size(), receivedDatasets.size() + 1);
-
-  requestedDatasets.erase("/localhost/nfd/rib/list");
-  BOOST_CHECK_EQUAL_COLLECTIONS(requestedDatasets.begin(), requestedDatasets.end(),
-                                receivedDatasets.begin(), receivedDatasets.end());
-}
-
-// BOOST_AUTO_TEST_CASE(DisabledFaceManager)
-// {
-//   // Disable Face manager
-//   disableFaceManager();
-
-//   setupAndRun();
-
-//   BOOST_CHECK_EQUAL(requestedDatasets.size(), receivedDatasets.size() + 1);
-
-//   requestedDatasets.erase("/localhost/nfd/faces/list");
-//   BOOST_CHECK_EQUAL_COLLECTIONS(requestedDatasets.begin(), requestedDatasets.end(),
-//                                 receivedDatasets.begin(), receivedDatasets.end());
-// }
-
 BOOST_AUTO_TEST_CASE(DisabledStrategyChoiceManager)
 {
   // Disable Strategy Choice Manager manager
diff --git a/tests/unit-tests/ndn-cxx/face.t.cpp b/tests/unit-tests/ndn-cxx/face.t.cpp
index f062728..6eb39c2 100644
--- a/tests/unit-tests/ndn-cxx/face.t.cpp
+++ b/tests/unit-tests/ndn-cxx/face.t.cpp
@@ -19,7 +19,6 @@
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
-#include <ndn-cxx/util/scheduler-scoped-event-id.hpp>
 #include <ndn-cxx/lp/tags.hpp>
 
 #include "ns3/ndnSIM/helper/ndn-app-helper.hpp"
@@ -112,7 +111,7 @@
   SingleInterest(const Name& name, const std::function<void(const Data&)>& onData,
                  const VoidCallback& onNack, const VoidCallback& onTimeout)
   {
-    m_face.expressInterest(Interest(name), std::bind([onData] (const Data& data) {
+    m_face.expressInterest(Interest(name).setCanBePrefix(true), std::bind([onData] (const Data& data) {
           onData(data);
         }, _2),
       std::bind(onNack),
@@ -209,7 +208,6 @@
   MultipleInterest(const Name& name, const NameCallback& onData, const VoidCallback& onTimeout,
                    const VoidCallback& onNack)
     : m_scheduler(m_face.getIoService())
-    , m_event(m_scheduler)
   {
     expressNextInterest(name, 0, onData, onTimeout, onNack);
   }
@@ -219,7 +217,7 @@
   expressNextInterest(const Name& name, uint32_t seqNo, const NameCallback& onData,
                       const VoidCallback& onTimeout, const VoidCallback& onNack)
   {
-    m_face.expressInterest(Interest(Name(name).appendSegment(seqNo)), std::bind([=] (const Data& data) {
+    m_face.expressInterest(Interest(Name(name).appendSegment(seqNo)).setCanBePrefix(true), std::bind([=] (const Data& data) {
           onData(data.getName());
 
           m_event = m_scheduler.scheduleEvent(time::seconds(1),
@@ -267,7 +265,7 @@
 public:
   SingleInterestWithFaceShutdown()
   {
-    m_face.expressInterest(Interest(Name("/interest/to/timeout")),
+    m_face.expressInterest(Interest(Name("/interest/to/timeout")).setCanBePrefix(true),
                            std::bind([] {
                                BOOST_ERROR("Unexpected response");
                              }),
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 953eec1..7150139 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
@@ -89,12 +89,12 @@
 
   BOOST_CHECK_EQUAL(buffer.str(),
                     R"STR(Time	Node	AppId	SeqNo	Type	DelayS	DelayUS	RetxCount	HopCount
-0.0417888	1	0	0	LastDelay	0.0417888	41788.8	1	2
-0.0417888	1	0	0	FullDelay	0.0417888	41788.8	1	2
+0.0417968	1	0	0	LastDelay	0.0417968	41796.8	1	2
+0.0417968	1	0	0	FullDelay	0.0417968	41796.8	1	2
 2	2	0	0	LastDelay	0	0	1	0
 2	2	0	0	FullDelay	0	0	1	0
-3.02089	2	0	1	LastDelay	0.0208944	20894.4	1	1
-3.02089	2	0	1	FullDelay	0.0208944	20894.4	1	1
+3.0209	2	0	1	LastDelay	0.0208984	20898.4	1	1
+3.0209	2	0	1	FullDelay	0.0208984	20898.4	1	1
 )STR");
 }
 
@@ -116,8 +116,8 @@
 
   BOOST_CHECK_EQUAL(buffer.str(),
     R"STR(Time	Node	AppId	SeqNo	Type	DelayS	DelayUS	RetxCount	HopCount
-0.0417888	1	0	0	LastDelay	0.0417888	41788.8	1	2
-0.0417888	1	0	0	FullDelay	0.0417888	41788.8	1	2
+0.0417968	1	0	0	LastDelay	0.0417968	41796.8	1	2
+0.0417968	1	0	0	FullDelay	0.0417968	41796.8	1	2
 )STR");
 }
 
@@ -138,8 +138,8 @@
     R"STR(Time	Node	AppId	SeqNo	Type	DelayS	DelayUS	RetxCount	HopCount
 2	2	0	0	LastDelay	0	0	1	0
 2	2	0	0	FullDelay	0	0	1	0
-3.02089	2	0	1	LastDelay	0.0208944	20894.4	1	1
-3.02089	2	0	1	FullDelay	0.0208944	20894.4	1	1
+3.0209	2	0	1	LastDelay	0.0208984	20898.4	1	1
+3.0209	2	0	1	FullDelay	0.0208984	20898.4	1	1
 )STR");
 }
 
@@ -156,8 +156,8 @@
   BOOST_CHECK(output->is_equal(
     R"STR(2	2	0	0	LastDelay	0	0	1	0
 2	2	0	0	FullDelay	0	0	1	0
-3.02089	2	0	1	LastDelay	0.0208944	20894.4	1	1
-3.02089	2	0	1	FullDelay	0.0208944	20894.4	1	1
+3.0209	2	0	1	LastDelay	0.0208984	20898.4	1	1
+3.0209	2	0	1	FullDelay	0.0208984	20898.4	1	1
 )STR"));
 }
 
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 ef000de..1a23ae4 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
@@ -86,7 +86,7 @@
      << "1	1	1	internal://	OutNacks	0	0	0	0\n"
      << "1	1	1	internal://	InSatisfiedInterests	0	0	0	0\n"
      << "1	1	1	internal://	InTimedOutInterests	0	0	0	0\n"
-     << "1	1	1	internal://	OutSatisfiedInterests	2.4	0	3	0\n"
+     << "1	1	1	internal://	OutSatisfiedInterests	4	0	5	0\n"
      << "1	1	1	internal://	OutTimedOutInterests	0	0	0	0\n";
   BOOST_CHECK(os.match_pattern());
 
@@ -96,7 +96,7 @@
      << "1	1	256	internal://	OutData	0	0	0	0\n"
      << "1	1	256	internal://	InNacks	0	0	0	0\n"
      << "1	1	256	internal://	OutNacks	0	0	0	0\n"
-     << "1	1	256	internal://	InSatisfiedInterests	2.4	0	3	0\n"
+     << "1	1	256	internal://	InSatisfiedInterests	4	0	5	0\n"
      << "1	1	256	internal://	InTimedOutInterests	0	0	0	0\n"
      << "1	1	256	internal://	OutSatisfiedInterests	0	0	0	0\n"
      << "1	1	256	internal://	OutTimedOutInterests	0	0	0	0\n";
@@ -114,7 +114,7 @@
      << "1	1	257	appFace://	OutTimedOutInterests	0	0	0	0\n";
   BOOST_CHECK(os.match_pattern());
 
-  os << "1	1	-1	all	SatisfiedInterests	2.4	0	3	0\n"
+  os << "1	1	-1	all	SatisfiedInterests	4	0	5	0\n"
      << "1	1	-1	all	TimedOutInterests	0.8	0	1	0\n";
   BOOST_CHECK(os.match_pattern());
 }
diff --git a/wscript b/wscript
index 9aab1de..973165e 100644
--- a/wscript
+++ b/wscript
@@ -15,11 +15,11 @@
 
 def options(opt):
     opt.load(['version'], tooldir=['%s/.waf-tools' % opt.path.abspath()])
-    opt.load(['doxygen', 'sphinx_build', 'type_traits', 'compiler-features', 'sqlite3', 'openssl'],
+    opt.load(['doxygen', 'sphinx_build', 'compiler-features', 'sqlite3', 'openssl'],
              tooldir=['%s/ndn-cxx/.waf-tools' % opt.path.abspath()])
 
 def configure(conf):
-    conf.load(['doxygen', 'sphinx_build', 'type_traits', 'compiler-features', 'version', 'sqlite3', 'openssl'])
+    conf.load(['doxygen', 'sphinx_build', 'compiler-features', 'version', 'sqlite3', 'openssl'])
 
     conf.env['ENABLE_NDNSIM']=False
 
@@ -71,7 +71,7 @@
 
     conf.report_optional_feature("ndnSIM", "ndnSIM", True, "")
 
-    conf.write_config_header('../../ns3/ndnSIM/ndn-cxx/ndn-cxx-config.hpp', define_prefix='NDN_CXX_', remove=False)
+    conf.write_config_header('../../ns3/ndnSIM/ndn-cxx/detail/config.hpp', define_prefix='NDN_CXX_', remove=False)
     conf.write_config_header('../../ns3/ndnSIM/NFD/core/config.hpp', remove=False)
 
 def build(bld):
@@ -88,7 +88,7 @@
     (base, build, split) = bld.getVersion('ndn-cxx')
     bld(features="subst",
         name="version-ndn-cxx",
-        source='ndn-cxx/src/version.hpp.in', target='../../ns3/ndnSIM/ndn-cxx/version.hpp',
+        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,
@@ -102,12 +102,13 @@
     if bld.env.ENABLE_EXAMPLES:
         deps += ['point-to-point-layout', 'csma', 'applications', 'wifi']
 
-    ndnCxxSrc = bld.path.ant_glob('ndn-cxx/src/**/*.cpp',
-                                  excl=['ndn-cxx/src/net/detail/*.cpp',
-                                        'ndn-cxx/src/net/network-monitor*.cpp',
-                                        'ndn-cxx/src/util/dummy-client-face.cpp',
-                                        'ndn-cxx/src/security/tpm/*osx.cpp',
-                                        'ndn-cxx/src/net/network-interface.cpp'])
+    ndnCxxSrc = bld.path.ant_glob('ndn-cxx/ndn-cxx/**/*.cpp',
+                                  excl=['ndn-cxx/ndn-cxx/net/impl/*.cpp',
+                                        'ndn-cxx/ndn-cxx/net/network-monitor*.cpp',
+                                        'ndn-cxx/ndn-cxx/util/dummy-client-face.cpp',
+                                        'ndn-cxx/ndn-cxx/security/tpm/*osx.cpp',
+                                        'ndn-cxx/ndn-cxx/detail/*osx.cpp',
+                                        'ndn-cxx/ndn-cxx/net/network-interface.cpp'])
 
     nfdSrc = bld.path.ant_glob(['%s/**/*.cpp' % dir for dir in ['NFD/core', 'NFD/daemon', 'NFD/rib']],
                                excl=['NFD/daemon/main.cpp',
@@ -117,8 +118,7 @@
                                      'NFD/daemon/face/tcp*',
                                      'NFD/daemon/face/*udp*',
                                      'NFD/daemon/face/unix-stream*',
-                                     'NFD/daemon/face/websocket*',
-                                     'NFD/rib/service.cpp'])
+                                     'NFD/daemon/face/websocket*'])
 
     module = bld.create_ns3_module('ndnSIM', deps)
     module.module = 'ndnSIM'
@@ -144,8 +144,8 @@
     module.full_headers = bld.path.ant_glob(['%s/**/*.hpp' % dir for dir in module_dirs])
     module.full_headers += bld.path.ant_glob('NFD/common.hpp')
 
-    module.ndncxx_headers = bld.path.ant_glob(['ndn-cxx/src/**/*.hpp'],
-                                              excl=['src/**/*-osx.hpp', 'src/detail/**/*'])
+    module.ndncxx_headers = bld.path.ant_glob(['ndn-cxx/ndn-cxx/**/*.hpp'],
+                                              excl=['src/**/*-osx.hpp', 'src/impl/**/*'])
 
     if bld.env.ENABLE_EXAMPLES:
         bld.recurse('examples')
@@ -188,10 +188,10 @@
     mode = getattr(self, "mode", "install")
 
     for src_node in set(self.ndncxx_headers):
-        dst_node = ndncxx_dir_node.find_or_declare(src_node.path_from(self.bld.path.find_dir('src/ndnSIM/ndn-cxx/src')))
+        dst_node = ndncxx_dir_node.find_or_declare(src_node.path_from(self.bld.path.find_dir('src/ndnSIM/ndn-cxx/ndn-cxx')))
         assert dst_node is not None
 
-        relpath = src_node.parent.path_from(self.bld.path.find_dir('src/ndnSIM/ndn-cxx/src'))
+        relpath = src_node.parent.path_from(self.bld.path.find_dir('src/ndnSIM/ndn-cxx/ndn-cxx'))
 
         task = self.create_task('ns3header')
         task.mode = getattr(self, 'mode', 'install')
