diff --git a/common.hpp b/common.hpp
index ef2ce3d..3b9d2ce 100644
--- a/common.hpp
+++ b/common.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_COMMON_HPP
 #define NFD_COMMON_HPP
@@ -39,8 +40,10 @@
 #define PROTECTED_WITH_TESTS_ELSE_PRIVATE private
 #endif
 
+#include <cstddef>
 #include <list>
 #include <set>
+#include <queue>
 #include <vector>
 
 #include <ndn-cxx/common.hpp>
@@ -57,6 +60,8 @@
 
 namespace nfd {
 
+using std::size_t;
+
 using boost::noncopyable;
 using boost::scoped_ptr;
 
diff --git a/core/segment-publisher.hpp b/core/segment-publisher.hpp
new file mode 100644
index 0000000..b1aa4a9
--- /dev/null
+++ b/core/segment-publisher.hpp
@@ -0,0 +1,121 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_CORE_SEGMENT_PUBLISHER_HPP
+#define NFD_CORE_SEGMENT_PUBLISHER_HPP
+
+#include "common.hpp"
+
+#include <ndn-cxx/encoding/encoding-buffer.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+
+namespace nfd {
+
+template <class FaceBase>
+class SegmentPublisher : noncopyable
+{
+public:
+  SegmentPublisher(FaceBase& face, const Name& prefix, ndn::KeyChain& keyChain)
+    : m_face(face)
+    , m_prefix(prefix)
+    , m_keyChain(keyChain)
+  {
+  }
+
+  virtual
+  ~SegmentPublisher()
+  {
+  }
+
+  static size_t
+  getMaxSegmentSize()
+  {
+    static const size_t MAX_SEGMENT_SIZE = ndn::MAX_NDN_PACKET_SIZE >> 1;
+    return MAX_SEGMENT_SIZE;
+  }
+
+  void
+  publish()
+  {
+    Name segmentPrefix(m_prefix);
+    segmentPrefix.appendVersion();
+
+    ndn::EncodingBuffer buffer;
+
+    generate(buffer);
+
+    const uint8_t* rawBuffer = buffer.buf();
+    const uint8_t* segmentBegin = rawBuffer;
+    const uint8_t* end = rawBuffer + buffer.size();
+
+    uint64_t segmentNo = 0;
+    do
+      {
+        const uint8_t* segmentEnd = segmentBegin + getMaxSegmentSize();
+        if (segmentEnd > end)
+          {
+            segmentEnd = end;
+          }
+
+        Name segmentName(segmentPrefix);
+        segmentName.appendSegment(segmentNo);
+
+        shared_ptr<Data> data(make_shared<Data>(segmentName));
+        data->setContent(segmentBegin, segmentEnd - segmentBegin);
+
+        segmentBegin = segmentEnd;
+        if (segmentBegin >= end)
+          {
+            data->setFinalBlockId(segmentName[-1]);
+          }
+
+        publishSegment(data);
+        segmentNo++;
+      }
+    while (segmentBegin < end);
+  }
+
+protected:
+
+  virtual size_t
+  generate(ndn::EncodingBuffer& outBuffer) =0;
+
+private:
+  void
+  publishSegment(shared_ptr<Data>& data)
+  {
+    m_keyChain.sign(*data);
+    m_face.put(*data);
+  }
+
+private:
+  FaceBase& m_face;
+  const Name m_prefix;
+  ndn::KeyChain& m_keyChain;
+};
+
+} // namespace nfd
+
+#endif // NFD_CORE_SEGMENT_PUBLISHER_HPP
diff --git a/daemon/face/datagram-face.hpp b/daemon/face/datagram-face.hpp
index dff2012..d065487 100644
--- a/daemon/face/datagram-face.hpp
+++ b/daemon/face/datagram-face.hpp
@@ -83,7 +83,8 @@
 protected:
   void
   handleSend(const boost::system::error_code& error,
-             const Block& wire);
+             size_t nBytesSent,
+             const Block& payload);
 
   void
   handleReceive(const boost::system::error_code& error,
@@ -129,9 +130,9 @@
 DatagramFace<T, U>::sendInterest(const Interest& interest)
 {
   this->onSendInterest(interest);
-  m_socket->async_send(boost::asio::buffer(interest.wireEncode().wire(),
-                                           interest.wireEncode().size()),
-                       bind(&DatagramFace<T, U>::handleSend, this, _1, interest.wireEncode()));
+  const Block& payload = interest.wireEncode();
+  m_socket->async_send(boost::asio::buffer(payload.wire(), payload.size()),
+                       bind(&DatagramFace<T, U>::handleSend, this, _1, _2, payload));
 
   // anything else should be done here?
 }
@@ -141,9 +142,9 @@
 DatagramFace<T, U>::sendData(const Data& data)
 {
   this->onSendData(data);
-  m_socket->async_send(boost::asio::buffer(data.wireEncode().wire(),
-                                           data.wireEncode().size()),
-                       bind(&DatagramFace<T, U>::handleSend, this, _1, data.wireEncode()));
+  const Block& payload = data.wireEncode();
+  m_socket->async_send(boost::asio::buffer(payload.wire(), payload.size()),
+                       bind(&DatagramFace<T, U>::handleSend, this, _1, _2, payload));
 
   // anything else should be done here?
 }
@@ -151,14 +152,15 @@
 template<class T, class U>
 inline void
 DatagramFace<T, U>::handleSend(const boost::system::error_code& error,
-                               const Block& wire)
+                               size_t nBytesSent,
+                               const Block& payload)
+// 'payload' is unused; it's needed to retain the underlying Buffer
 {
   if (error != 0) {
     if (error == boost::system::errc::operation_canceled) // when socket is closed by someone
       return;
 
-    if (!m_socket->is_open())
-    {
+    if (!m_socket->is_open()) {
       fail("Tunnel closed");
       return;
     }
@@ -170,12 +172,10 @@
 
     closeSocket();
 
-    if (error == boost::asio::error::eof)
-    {
+    if (error == boost::asio::error::eof) {
       fail("Tunnel closed");
     }
-    else
-    {
+    else {
       fail("Send operation failed, closing socket: " +
              error.category().message(error.value()));
     }
@@ -184,8 +184,8 @@
 
   NFD_LOG_TRACE("[id:" << this->getId()
                 << ",uri:" << this->getRemoteUri()
-                << "] Successfully sent: " << wire.size() << " bytes");
-  // do nothing (needed to retain validity of wire memory block
+                << "] Successfully sent: " << nBytesSent << " bytes");
+  this->getMutableCounters().getNOutBytes() += nBytesSent;
 }
 
 template<class T, class U>
@@ -226,8 +226,7 @@
       return;
 
     // this should be unnecessary, but just in case
-    if (!m_socket->is_open())
-    {
+    if (!m_socket->is_open()) {
       fail("Tunnel closed");
       return;
     }
@@ -239,12 +238,10 @@
 
     closeSocket();
 
-    if (error == boost::asio::error::eof)
-    {
+    if (error == boost::asio::error::eof) {
       fail("Tunnel closed");
     }
-    else
-    {
+    else {
       fail("Receive operation failed, closing socket: " +
              error.category().message(error.value()));
     }
@@ -254,6 +251,7 @@
   NFD_LOG_TRACE("[id:" << this->getId()
                 << ",uri:" << this->getRemoteUri()
                 << "] Received: " << nBytesReceived << " bytes");
+  this->getMutableCounters().getNInBytes() += nBytesReceived;
 
   Block element;
   bool isOk = Block::fromBuffer(buffer, nBytesReceived, element);
diff --git a/daemon/face/face-counter.hpp b/daemon/face/face-counter.hpp
deleted file mode 100644
index 152c5a1..0000000
--- a/daemon/face/face-counter.hpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- 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
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-#ifndef NFD_DAEMON_FACE_FACE_COUNTER_HPP
-#define NFD_DAEMON_FACE_FACE_COUNTER_HPP
-
-#include "common.hpp"
-
-namespace nfd {
-
-/** \class FaceCounter
- *  \brief represents a counter on face
- *
- *  \todo This class should be noncopyable
- */
-typedef uint64_t FaceCounter;
-
-
-/** \brief contains counters on face
- */
-class FaceCounters : noncopyable
-{
-public:
-  FaceCounters();
-
-  /// incoming Interest (total packets since Face establishment)
-  const FaceCounter&
-  getNInInterests() const;
-
-  FaceCounter&
-  getNInInterests();
-
-  /// incoming Data (total packets since Face establishment)
-  const FaceCounter&
-  getNInDatas() const;
-
-  FaceCounter&
-  getNInDatas();
-
-  /// outgoing Interest (total packets since Face establishment)
-  const FaceCounter&
-  getNOutInterests() const;
-
-  FaceCounter&
-  getNOutInterests();
-
-  /// outgoing Data (total packets since Face establishment)
-  const FaceCounter&
-  getNOutDatas() const;
-
-  FaceCounter&
-  getNOutDatas();
-
-private:
-  FaceCounter m_nInInterests;
-  FaceCounter m_nInDatas;
-  FaceCounter m_outInterests;
-  FaceCounter m_outDatas;
-};
-
-inline
-FaceCounters::FaceCounters()
-  : m_nInInterests(0)
-  , m_nInDatas(0)
-  , m_outInterests(0)
-  , m_outDatas(0)
-{
-}
-
-inline const FaceCounter&
-FaceCounters::getNInInterests() const
-{
-  return m_nInInterests;
-}
-
-inline FaceCounter&
-FaceCounters::getNInInterests()
-{
-  return m_nInInterests;
-}
-
-inline const FaceCounter&
-FaceCounters::getNInDatas() const
-{
-  return m_nInDatas;
-}
-
-inline FaceCounter&
-FaceCounters::getNInDatas()
-{
-  return m_nInDatas;
-}
-
-inline const FaceCounter&
-FaceCounters::getNOutInterests() const
-{
-  return m_outInterests;
-}
-
-inline FaceCounter&
-FaceCounters::getNOutInterests()
-{
-  return m_outInterests;
-}
-
-inline const FaceCounter&
-FaceCounters::getNOutDatas() const
-{
-  return m_outDatas;
-}
-
-inline FaceCounter&
-FaceCounters::getNOutDatas()
-{
-  return m_outDatas;
-}
-
-
-} // namespace nfd
-
-#endif // NFD_DAEMON_FACE_FACE_COUNTER_HPP
diff --git a/daemon/face/face-counters.hpp b/daemon/face/face-counters.hpp
new file mode 100644
index 0000000..6dc1d6a
--- /dev/null
+++ b/daemon/face/face-counters.hpp
@@ -0,0 +1,251 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_FACE_FACE_COUNTERS_HPP
+#define NFD_DAEMON_FACE_FACE_COUNTERS_HPP
+
+#include "common.hpp"
+
+namespace nfd {
+
+/** \brief represents a counter of number of packets
+ */
+// PacketCounter is noncopyable, because increment should be called on the counter,
+// not a copy of it; it's implicitly convertible to uint64_t to be observed
+class PacketCounter : noncopyable
+{
+public:
+  typedef uint64_t rep;
+
+  PacketCounter()
+    : m_value(0)
+  {
+  }
+
+  operator rep() const
+  {
+    return m_value;
+  }
+
+  PacketCounter&
+  operator++()
+  {
+    ++m_value;
+    return *this;
+  }
+  // postfix ++ operator is not provided because it's not needed
+
+  void
+  set(rep value)
+  {
+    m_value = value;
+  }
+
+private:
+  rep m_value;
+};
+
+/** \brief represents a counter of number of bytes
+ */
+// ByteCounter is noncopyable, because increment should be called on the counter,
+// not a copy of it; it's implicitly convertible to uint64_t to be observed
+class ByteCounter : noncopyable
+{
+public:
+  typedef uint64_t rep;
+
+  ByteCounter()
+    : m_value(0)
+  {
+  }
+
+  operator rep() const
+  {
+    return m_value;
+  }
+
+  ByteCounter&
+  operator+=(rep n)
+  {
+    m_value += n;
+    return *this;
+  }
+
+  void
+  set(rep value)
+  {
+    m_value = value;
+  }
+
+private:
+  rep m_value;
+};
+
+/** \brief contains network layer packet counters
+ */
+class NetworkLayerCounters : noncopyable
+{
+public:
+  /// incoming Interest
+  const PacketCounter&
+  getNInInterests() const
+  {
+    return m_nInInterests;
+  }
+
+  PacketCounter&
+  getNInInterests()
+  {
+    return m_nInInterests;
+  }
+
+  /// incoming Data
+  const PacketCounter&
+  getNInDatas() const
+  {
+    return m_nInDatas;
+  }
+
+  PacketCounter&
+  getNInDatas()
+  {
+    return m_nInDatas;
+  }
+
+  /// outgoing Interest
+  const PacketCounter&
+  getNOutInterests() const
+  {
+    return m_nOutInterests;
+  }
+
+  PacketCounter&
+  getNOutInterests()
+  {
+    return m_nOutInterests;
+  }
+
+  /// outgoing Data
+  const PacketCounter&
+  getNOutDatas() const
+  {
+    return m_nOutDatas;
+  }
+
+  PacketCounter&
+  getNOutDatas()
+  {
+    return m_nOutDatas;
+  }
+
+protected:
+  /** \brief copy current obseverations to a struct
+   *  \param recipient an object with set methods for counters
+   */
+  template<typename R>
+  void
+  copyTo(R& recipient) const
+  {
+    recipient.setNInInterests(this->getNInInterests());
+    recipient.setNInDatas(this->getNInDatas());
+    recipient.setNOutInterests(this->getNOutInterests());
+    recipient.setNOutDatas(this->getNOutDatas());
+  }
+
+private:
+  PacketCounter m_nInInterests;
+  PacketCounter m_nInDatas;
+  PacketCounter m_nOutInterests;
+  PacketCounter m_nOutDatas;
+};
+
+/** \brief contains link layer byte counters
+ */
+class LinkLayerCounters : noncopyable
+{
+public:
+  /// received bytes
+  const ByteCounter&
+  getNInBytes() const
+  {
+    return m_nInBytes;
+  }
+
+  ByteCounter&
+  getNInBytes()
+  {
+    return m_nInBytes;
+  }
+
+  /// sent bytes
+  const ByteCounter&
+  getNOutBytes() const
+  {
+    return m_nOutBytes;
+  }
+
+  ByteCounter&
+  getNOutBytes()
+  {
+    return m_nOutBytes;
+  }
+
+protected:
+  /** \brief copy current obseverations to a struct
+   *  \param recipient an object with set methods for counters
+   */
+  template<typename R>
+  void
+  copyTo(R& recipient) const
+  {
+    recipient.setNInBytes(this->getNInBytes());
+    recipient.setNOutBytes(this->getNOutBytes());
+  }
+
+private:
+  ByteCounter m_nInBytes;
+  ByteCounter m_nOutBytes;
+};
+
+/** \brief contains counters on face
+ */
+class FaceCounters : public NetworkLayerCounters, public LinkLayerCounters
+{
+public:
+  /** \brief copy current obseverations to a struct
+   *  \param recipient an object with set methods for counters
+   */
+  template<typename R>
+  void
+  copyTo(R& recipient) const
+  {
+    this->NetworkLayerCounters::copyTo(recipient);
+    this->LinkLayerCounters::copyTo(recipient);
+  }
+};
+
+} // namespace nfd
+
+#endif // NFD_DAEMON_FACE_FACE_COUNTERS_HPP
diff --git a/daemon/face/face.cpp b/daemon/face/face.cpp
index 2c81a9a..bbf2a08 100644
--- a/daemon/face/face.cpp
+++ b/daemon/face/face.cpp
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "face.hpp"
 #include "face-flags.hpp"
@@ -29,12 +29,6 @@
 
 namespace nfd {
 
-static inline void
-increaseCounter(FaceCounter& counter)
-{
-  ++counter;
-}
-
 Face::Face(const FaceUri& remoteUri, const FaceUri& localUri, bool isLocal)
   : m_id(INVALID_FACEID)
   , m_isLocal(isLocal)
@@ -43,10 +37,10 @@
   , m_isOnDemand(false)
   , m_isFailed(false)
 {
-  onReceiveInterest += bind(&increaseCounter, ref(m_counters.getNInInterests()));
-  onReceiveData     += bind(&increaseCounter, ref(m_counters.getNInDatas()));
-  onSendInterest    += bind(&increaseCounter, ref(m_counters.getNOutInterests()));
-  onSendData        += bind(&increaseCounter, ref(m_counters.getNOutDatas()));
+  onReceiveInterest += bind(&PacketCounter::operator++, &m_counters.getNInInterests());
+  onReceiveData     += bind(&PacketCounter::operator++, &m_counters.getNInDatas());
+  onSendInterest    += bind(&PacketCounter::operator++, &m_counters.getNOutInterests());
+  onSendData        += bind(&PacketCounter::operator++, &m_counters.getNOutDatas());
 }
 
 Face::~Face()
@@ -59,7 +53,7 @@
   return m_id;
 }
 
-// this method is private and should be used only by the Forwarder
+// this method is private and should be used only by the FaceTable
 void
 Face::setId(FaceId faceId)
 {
@@ -134,17 +128,13 @@
 ndn::nfd::FaceStatus
 Face::getFaceStatus() const
 {
-  const FaceCounters& counters = getCounters();
-
   ndn::nfd::FaceStatus status;
   status.setFaceId(getId())
     .setRemoteUri(getRemoteUri().toString())
     .setLocalUri(getLocalUri().toString())
-    .setFlags(getFaceFlags(*this))
-    .setNInInterests(counters.getNInInterests())
-    .setNInDatas(counters.getNInDatas())
-    .setNOutInterests(counters.getNOutInterests())
-    .setNOutDatas(counters.getNOutDatas());
+    .setFlags(getFaceFlags(*this));
+
+  this->getCounters().copyTo(status);
 
   return status;
 }
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index 2660045..52c0894 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_FACE_FACE_HPP
 #define NFD_DAEMON_FACE_FACE_HPP
@@ -29,7 +29,7 @@
 #include "common.hpp"
 #include "core/event-emitter.hpp"
 #include "core/face-uri.hpp"
-#include "face-counter.hpp"
+#include "face-counters.hpp"
 
 #include <ndn-cxx/management/nfd-face-status.hpp>
 
@@ -40,8 +40,20 @@
  */
 typedef int FaceId;
 
+/// indicates an invalid FaceId
 const FaceId INVALID_FACEID = -1;
 
+/// identifies the InternalFace used in management
+const FaceId FACEID_INTERNAL_FACE = 1;
+/// identifies a packet comes from the ContentStore, in LocalControlHeader incomingFaceId
+const FaceId FACEID_CONTENT_STORE = 254;
+/// identifies the NullFace that drops every packet
+const FaceId FACEID_NULL = 255;
+/// upper bound of reserved FaceIds
+const FaceId FACEID_RESERVED_MAX = 255;
+
+
+/// pratical limit of packet size in octets
 const size_t MAX_NDN_PACKET_SIZE = 8800;
 
 
diff --git a/daemon/face/multicast-udp-face.cpp b/daemon/face/multicast-udp-face.cpp
index a69b1c2..34c6cd2 100644
--- a/daemon/face/multicast-udp-face.cpp
+++ b/daemon/face/multicast-udp-face.cpp
@@ -55,7 +55,7 @@
 {
   m_sendSocket->async_send_to(boost::asio::buffer(block.wire(), block.size()),
                               m_multicastGroup,
-                              bind(&MulticastUdpFace::handleSend, this, _1, block));
+                              bind(&MulticastUdpFace::handleSend, this, _1, _2, block));
 }
 
 void
diff --git a/daemon/face/null-face.cpp b/daemon/face/null-face.cpp
new file mode 100644
index 0000000..5d55693
--- /dev/null
+++ b/daemon/face/null-face.cpp
@@ -0,0 +1,54 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "null-face.hpp"
+
+namespace nfd {
+
+// FIB might restrict creating a nexthop record toward non-local face in /localhost namespace.
+// NullFace has isLocal=true to enable creating a "blackhole" FIB entry under /localhost.
+
+NullFace::NullFace(const FaceUri& uri)
+  : Face(uri, uri, true)
+{
+}
+
+void
+NullFace::sendInterest(const Interest& interest)
+{
+}
+
+void
+NullFace::sendData(const Data& data)
+{
+}
+
+void
+NullFace::close()
+{
+  this->fail("close");
+}
+
+} // namespace nfd
diff --git a/daemon/face/null-face.hpp b/daemon/face/null-face.hpp
new file mode 100644
index 0000000..3dae571
--- /dev/null
+++ b/daemon/face/null-face.hpp
@@ -0,0 +1,60 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_FACE_NULL_FACE_HPP
+#define NFD_DAEMON_FACE_NULL_FACE_HPP
+
+#include "face.hpp"
+
+namespace nfd {
+
+/**
+ * \brief a Face that has no underlying transport and drops every packet
+ */
+class NullFace : public Face
+{
+public:
+  explicit
+  NullFace(const FaceUri& uri = FaceUri("null://"));
+
+  virtual void
+  sendInterest(const Interest& interest);
+
+  /// send a Data
+  virtual void
+  sendData(const Data& data);
+
+  /** \brief Close the face
+   *
+   *  This terminates all communication on the face and cause
+   *  onFail() method event to be invoked
+   */
+  virtual void
+  close();
+};
+
+} // namespace nfd
+
+#endif // NFD_DAEMON_FACE_NULL_FACE_HPP
diff --git a/daemon/face/stream-face.hpp b/daemon/face/stream-face.hpp
index f9b7cd9..8eb7af0 100644
--- a/daemon/face/stream-face.hpp
+++ b/daemon/face/stream-face.hpp
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_FACE_STREAM_FACE_HPP
 #define NFD_DAEMON_FACE_STREAM_FACE_HPP
@@ -66,15 +66,15 @@
   processErrorCode(const boost::system::error_code& error);
 
   void
-  handleSend(const boost::system::error_code& error,
-             const Block& header, const Block& payload);
+  sendFromQueue();
+
   void
   handleSend(const boost::system::error_code& error,
-             const Block& wire);
+             size_t nBytesSent);
 
   void
   handleReceive(const boost::system::error_code& error,
-                std::size_t bytes_recvd);
+                size_t nBytesReceived);
 
   void
   keepFaceAliveUntilAllHandlersExecuted(const shared_ptr<Face>& face);
@@ -87,7 +87,8 @@
 
 private:
   uint8_t m_inputBuffer[MAX_NDN_PACKET_SIZE];
-  std::size_t m_inputBufferSize;
+  size_t m_inputBufferSize;
+  std::queue<Block> m_sendQueue;
 
   friend struct StreamFaceSenderImpl<Protocol, FaceBase, Interest>;
   friend struct StreamFaceSenderImpl<Protocol, FaceBase, Data>;
@@ -143,10 +144,11 @@
   static void
   send(StreamFace<Protocol, FaceBase>& face, const Packet& packet)
   {
-    face.m_socket->async_send(boost::asio::buffer(packet.wireEncode().wire(),
-                                                  packet.wireEncode().size()),
-                              bind(&StreamFace<Protocol, FaceBase>::handleSend,
-                                   &face, _1, packet.wireEncode()));
+    bool wasQueueEmpty = face.m_sendQueue.empty();
+    face.m_sendQueue.push(packet.wireEncode());
+
+    if (wasQueueEmpty)
+      face.sendFromQueue();
   }
 };
 
@@ -157,29 +159,16 @@
   static void
   send(StreamFace<Protocol, LocalFace>& face, const Packet& packet)
   {
-    using namespace boost::asio;
+    bool wasQueueEmpty = face.m_sendQueue.empty();
 
-    if (face.isEmptyFilteredLocalControlHeader(packet.getLocalControlHeader()))
+    if (!face.isEmptyFilteredLocalControlHeader(packet.getLocalControlHeader()))
       {
-        const Block& payload = packet.wireEncode();
-        face.m_socket->async_send(buffer(payload.wire(), payload.size()),
-                                  bind(&StreamFace<Protocol, LocalFace>::handleSend,
-                                       &face, _1, packet.wireEncode()));
+        face.m_sendQueue.push(face.filterAndEncodeLocalControlHeader(packet));
       }
-    else
-      {
-        Block header = face.filterAndEncodeLocalControlHeader(packet);
-        const Block& payload = packet.wireEncode();
+    face.m_sendQueue.push(packet.wireEncode());
 
-        std::vector<const_buffer> buffers;
-        buffers.reserve(2);
-        buffers.push_back(buffer(header.wire(),  header.size()));
-        buffers.push_back(buffer(payload.wire(), payload.size()));
-
-        face.m_socket->async_send(buffers,
-                                  bind(&StreamFace<Protocol, LocalFace>::handleSend,
-                                       &face, _1, header, payload));
-      }
+    if (wasQueueEmpty)
+      face.sendFromQueue();
   }
 };
 
@@ -202,6 +191,15 @@
 
 template<class T, class U>
 inline void
+StreamFace<T, U>::sendFromQueue()
+{
+  const Block& block = this->m_sendQueue.front();
+  boost::asio::async_write(*this->m_socket, boost::asio::buffer(block),
+                           bind(&StreamFace<T, U>::handleSend, this, _1, _2));
+}
+
+template<class T, class U>
+inline void
 StreamFace<T, U>::close()
 {
   if (!m_socket->is_open())
@@ -259,49 +257,43 @@
 template<class T, class U>
 inline void
 StreamFace<T, U>::handleSend(const boost::system::error_code& error,
-                             const Block& wire)
+                             size_t nBytesSent)
 {
   if (error)
     return processErrorCode(error);
 
-  NFD_LOG_TRACE("[id:" << this->getId()
-                << ",uri:" << this->getRemoteUri()
-                << "] Successfully sent: " << wire.size() << " bytes");
-}
-
-template<class T, class U>
-inline void
-StreamFace<T, U>::handleSend(const boost::system::error_code& error,
-                             const Block& header, const Block& payload)
-{
-  if (error)
-    return processErrorCode(error);
+  BOOST_ASSERT(!m_sendQueue.empty());
 
   NFD_LOG_TRACE("[id:" << this->getId()
                 << ",uri:" << this->getRemoteUri()
-                << "] Successfully sent: " << (header.size()+payload.size()) << " bytes");
+                << "] Successfully sent: " << nBytesSent << " bytes");
+  this->getMutableCounters().getNOutBytes() += nBytesSent;
+
+  m_sendQueue.pop();
+  if (!m_sendQueue.empty())
+    sendFromQueue();
 }
 
 template<class T, class U>
 inline void
 StreamFace<T, U>::handleReceive(const boost::system::error_code& error,
-                             std::size_t bytes_recvd)
+                                size_t nBytesReceived)
 {
   if (error)
     return processErrorCode(error);
 
   NFD_LOG_TRACE("[id:" << this->getId()
                 << ",uri:" << this->getRemoteUri()
-                << "] Received: " << bytes_recvd << " bytes");
+                << "] Received: " << nBytesReceived << " bytes");
+  this->getMutableCounters().getNInBytes() += nBytesReceived;
 
-  m_inputBufferSize += bytes_recvd;
-  // do magic
+  m_inputBufferSize += nBytesReceived;
 
-  std::size_t offset = 0;
+  size_t offset = 0;
 
   bool isOk = true;
   Block element;
-  while(m_inputBufferSize - offset > 0)
+  while (m_inputBufferSize - offset > 0)
     {
       isOk = Block::fromBuffer(m_inputBuffer + offset, m_inputBufferSize - offset, element);
       if (!isOk)
@@ -374,6 +366,10 @@
   // handlers are dispatched
   io.post(bind(&StreamFace<T, U>::keepFaceAliveUntilAllHandlersExecuted,
                this, this->shared_from_this()));
+
+  // clear send queue
+  std::queue<Block> emptyQueue;
+  std::swap(emptyQueue, m_sendQueue);
 }
 
 } // namespace nfd
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index 8d1e780..151f235 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "udp-channel.hpp"
 #include "core/global-io.hpp"
@@ -200,7 +201,7 @@
 
 void
 UdpChannel::newPeer(const boost::system::error_code& error,
-                    std::size_t nBytesReceived)
+                    size_t nBytesReceived)
 {
   NFD_LOG_DEBUG("UdpChannel::newPeer from " << m_newRemoteEndpoint);
 
diff --git a/daemon/face/udp-channel.hpp b/daemon/face/udp-channel.hpp
index fed232a..da2b14b 100644
--- a/daemon/face/udp-channel.hpp
+++ b/daemon/face/udp-channel.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_FACE_UDP_CHANNEL_HPP
 #define NFD_DAEMON_FACE_UDP_CHANNEL_HPP
@@ -124,7 +125,7 @@
    *        associated with any UdpFace
    */
   void
-  newPeer(const boost::system::error_code& error, std::size_t nBytesReceived);
+  newPeer(const boost::system::error_code& error, size_t nBytesReceived);
 
   void
   handleEndpointResolution(const boost::system::error_code& error,
diff --git a/daemon/fw/face-table.cpp b/daemon/fw/face-table.cpp
index 10dbdfd..a95c562 100644
--- a/daemon/fw/face-table.cpp
+++ b/daemon/fw/face-table.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "face-table.hpp"
 #include "forwarder.hpp"
@@ -32,7 +33,7 @@
 
 FaceTable::FaceTable(Forwarder& forwarder)
   : m_forwarder(forwarder)
-  , m_lastFaceId(0)
+  , m_lastFaceId(FACEID_RESERVED_MAX)
 {
 }
 
@@ -44,18 +45,32 @@
 void
 FaceTable::add(shared_ptr<Face> face)
 {
-  if (face->getId() != INVALID_FACEID &&
-      m_faces.count(face->getId()) > 0)
-    {
-      NFD_LOG_DEBUG("Trying to add existing face id=" << face->getId() << " to the face table");
-      return;
-    }
+  if (face->getId() != INVALID_FACEID && m_faces.count(face->getId()) > 0) {
+    NFD_LOG_WARN("Trying to add existing face id=" << face->getId() << " to the face table");
+    return;
+  }
 
   FaceId faceId = ++m_lastFaceId;
+  BOOST_ASSERT(faceId > FACEID_RESERVED_MAX);
+  this->addImpl(face, faceId);
+}
+
+void
+FaceTable::addReserved(shared_ptr<Face> face, FaceId faceId)
+{
+  BOOST_ASSERT(face->getId() == INVALID_FACEID);
+  BOOST_ASSERT(m_faces.count(face->getId()) == 0);
+  BOOST_ASSERT(faceId <= FACEID_RESERVED_MAX);
+  this->addImpl(face, faceId);
+}
+
+void
+FaceTable::addImpl(shared_ptr<Face> face, FaceId faceId)
+{
   face->setId(faceId);
   m_faces[faceId] = face;
-  NFD_LOG_INFO("Added face id=" << faceId << " remote=" << face->getRemoteUri() <<
-                                              " local=" << face->getLocalUri());
+  NFD_LOG_INFO("Added face id=" << faceId << " remote=" << face->getRemoteUri()
+                                          << " local=" << face->getLocalUri());
 
   face->onReceiveInterest += bind(&Forwarder::onInterest,
                                   &m_forwarder, ref(*face), _1);
diff --git a/daemon/fw/face-table.hpp b/daemon/fw/face-table.hpp
index 8f7dcb2..a255cfe 100644
--- a/daemon/fw/face-table.hpp
+++ b/daemon/fw/face-table.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_FW_FACE_TABLE_HPP
 #define NFD_DAEMON_FW_FACE_TABLE_HPP
@@ -35,7 +36,7 @@
 
 /** \brief container of all Faces
  */
-class FaceTable
+class FaceTable : noncopyable
 {
 public:
   explicit
@@ -47,6 +48,10 @@
   VIRTUAL_WITH_TESTS void
   add(shared_ptr<Face> face);
 
+  /// add a special Face with a reserved FaceId
+  VIRTUAL_WITH_TESTS void
+  addReserved(shared_ptr<Face> face, FaceId faceId);
+
   VIRTUAL_WITH_TESTS shared_ptr<Face>
   get(FaceId id) const;
 
@@ -88,8 +93,11 @@
   EventEmitter<shared_ptr<Face> > onRemove;
 
 private:
+  void
+  addImpl(shared_ptr<Face> face, FaceId faceId);
+
   // remove is private because it's a subscriber of face.onFail event.
-  // face->close() closes a face and would trigger .remove(face)
+  // face->close() closes a face and triggers .remove(face)
   void
   remove(shared_ptr<Face> face);
 
diff --git a/daemon/fw/forwarder-counter.hpp b/daemon/fw/forwarder-counter.hpp
deleted file mode 100644
index be74928..0000000
--- a/daemon/fw/forwarder-counter.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- 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
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-#ifndef NFD_DAEMON_FW_FORWARDER_COUNTER_HPP
-#define NFD_DAEMON_FW_FORWARDER_COUNTER_HPP
-
-#include "face/face-counter.hpp"
-
-namespace nfd {
-
-/** \class ForwarderCounter
- *  \brief represents a counter on forwarder
- *
- *  \todo This class should be noncopyable
- */
-typedef uint64_t ForwarderCounter;
-
-
-/** \brief contains counters on forwarder
- */
-class ForwarderCounters : public FaceCounters
-{
-};
-
-
-} // namespace nfd
-
-#endif // NFD_DAEMON_FW_FORWARDER_COUNTER_HPP
diff --git a/daemon/fw/forwarder-counters.hpp b/daemon/fw/forwarder-counters.hpp
new file mode 100644
index 0000000..ba3b57c
--- /dev/null
+++ b/daemon/fw/forwarder-counters.hpp
@@ -0,0 +1,51 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_FW_FORWARDER_COUNTERS_HPP
+#define NFD_DAEMON_FW_FORWARDER_COUNTERS_HPP
+
+#include "face/face-counters.hpp"
+
+namespace nfd {
+
+/** \brief contains counters on forwarder
+ */
+class ForwarderCounters : public NetworkLayerCounters
+{
+public:
+  /** \brief copy current obseverations to a struct
+   *  \param recipient an object with set methods for counters
+   */
+  template<typename R>
+  void
+  copyTo(R& recipient) const
+  {
+    this->NetworkLayerCounters::copyTo(recipient);
+  }
+};
+
+} // namespace nfd
+
+#endif // NFD_DAEMON_FW_FORWARDER_COUNTERS_HPP
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 0e2f0d2..d3fb541 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -59,7 +59,7 @@
   NFD_LOG_DEBUG("onIncomingInterest face=" << inFace.getId() <<
                 " interest=" << interest.getName());
   const_cast<Interest&>(interest).setIncomingFaceId(inFace.getId());
-  m_counters.getNInInterests() ++;
+  ++m_counters.getNInInterests();
 
   // /localhost scope control
   bool isViolatingLocalhost = !inFace.isLocal() &&
@@ -92,6 +92,7 @@
     // CS lookup
     const Data* csMatch = m_cs.find(interest);
     if (csMatch != 0) {
+      const_cast<Data*>(csMatch)->setIncomingFaceId(FACEID_CONTENT_STORE);
       // XXX should we lookup PIT for other Interests that also match csMatch?
 
       // goto outgoing Data pipeline
@@ -187,7 +188,7 @@
 
   // send Interest
   outFace.sendInterest(*interest);
-  m_counters.getNOutInterests() ++;
+  ++m_counters.getNOutInterests();
 }
 
 void
@@ -227,7 +228,7 @@
   // receive Data
   NFD_LOG_DEBUG("onIncomingData face=" << inFace.getId() << " data=" << data.getName());
   const_cast<Data&>(data).setIncomingFaceId(inFace.getId());
-  m_counters.getNInDatas() ++;
+  ++m_counters.getNInDatas();
 
   // /localhost scope control
   bool isViolatingLocalhost = !inFace.isLocal() &&
@@ -331,7 +332,7 @@
 
   // send Data
   outFace.sendData(data);
-  m_counters.getNOutDatas() ++;
+  ++m_counters.getNOutDatas();
 }
 
 static inline bool
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index acb0451..8c5ed79 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -27,7 +27,7 @@
 
 #include "common.hpp"
 #include "core/scheduler.hpp"
-#include "forwarder-counter.hpp"
+#include "forwarder-counters.hpp"
 #include "face-table.hpp"
 #include "table/fib.hpp"
 #include "table/pit.hpp"
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index 3b17ab1..838dd9a 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -166,7 +166,7 @@
       // going out of this strategy's namespace
       return;
     }
-    this->getMeasurements().extendLifetime(*measurementsEntry, MEASUREMENTS_LIFETIME);
+    this->getMeasurements().extendLifetime(measurementsEntry, MEASUREMENTS_LIFETIME);
 
     shared_ptr<MeasurementsEntryInfo> measurementsEntryInfo =
       this->getMeasurementsEntryInfo(measurementsEntry);
@@ -187,7 +187,7 @@
       // going out of this strategy's namespace
       return;
     }
-    this->getMeasurements().extendLifetime(*measurementsEntry, MEASUREMENTS_LIFETIME);
+    this->getMeasurements().extendLifetime(measurementsEntry, MEASUREMENTS_LIFETIME);
 
     shared_ptr<MeasurementsEntryInfo> measurementsEntryInfo =
       this->getMeasurementsEntryInfo(measurementsEntry);
diff --git a/daemon/main.cpp b/daemon/main.cpp
index 70717c6..e275668 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -31,6 +31,7 @@
 #include "core/global-io.hpp"
 #include "core/privilege-helper.hpp"
 #include "fw/forwarder.hpp"
+#include "face/null-face.hpp"
 #include "mgmt/internal-face.hpp"
 #include "mgmt/fib-manager.hpp"
 #include "mgmt/face-manager.hpp"
@@ -78,6 +79,10 @@
 
     initializeManagement();
 
+    m_forwarder->getFaceTable().addReserved(make_shared<NullFace>(), FACEID_NULL);
+    m_forwarder->getFaceTable().addReserved(
+      make_shared<NullFace>(FaceUri("contentstore://")), FACEID_CONTENT_STORE);
+
     PrivilegeHelper::drop();
   }
 
@@ -124,20 +129,23 @@
 
     m_fibManager = make_shared<FibManager>(ref(m_forwarder->getFib()),
                                            bind(&Forwarder::getFace, m_forwarder.get(), _1),
-                                           m_internalFace);
+                                           m_internalFace,
+                                           ndn::ref(m_keyChain));
 
     m_faceManager = make_shared<FaceManager>(ref(m_forwarder->getFaceTable()),
-                                             m_internalFace);
+                                             m_internalFace,
+                                             ndn::ref(m_keyChain));
 
     m_strategyChoiceManager =
       make_shared<StrategyChoiceManager>(ref(m_forwarder->getStrategyChoice()),
-                                         m_internalFace);
+                                         m_internalFace,
+                                         ndn::ref(m_keyChain));
 
     m_statusServer = make_shared<StatusServer>(m_internalFace,
-                                               ref(*m_forwarder));
+                                               ref(*m_forwarder),
+                                               ndn::ref(m_keyChain));
 
     ConfigFile config((IgnoreRibAndLogSections()));
-
     general::setConfigFile(config);
 
     TablesConfigSection tablesConfig(m_forwarder->getCs(),
@@ -145,12 +153,11 @@
                                      m_forwarder->getFib(),
                                      m_forwarder->getStrategyChoice(),
                                      m_forwarder->getMeasurements());
-
     tablesConfig.setConfigFile(config);
 
     m_internalFace->getValidator().setConfigFile(config);
 
-    m_forwarder->addFace(m_internalFace);
+    m_forwarder->getFaceTable().addReserved(m_internalFace, FACEID_INTERNAL_FACE);
 
     m_faceManager->setConfigFile(config);
 
@@ -315,6 +322,7 @@
 
   shared_ptr<std::ofstream>         m_logFile;
   std::basic_streambuf<char>*       m_originalStreamBuf;
+  ndn::KeyChain                     m_keyChain;
 };
 
 } // namespace nfd
diff --git a/daemon/mgmt/app-face.cpp b/daemon/mgmt/app-face.cpp
deleted file mode 100644
index 2c9c9b5..0000000
--- a/daemon/mgmt/app-face.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- 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
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-#include "app-face.hpp"
-
-namespace nfd {
-
-void
-AppFace::sign(Data& data)
-{
-  m_keyChain.sign(data);
-}
-
-} // namespace nfd
diff --git a/daemon/mgmt/app-face.hpp b/daemon/mgmt/app-face.hpp
index 476fda7..13442a8 100644
--- a/daemon/mgmt/app-face.hpp
+++ b/daemon/mgmt/app-face.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_MGMT_APP_FACE_HPP
 #define NFD_DAEMON_MGMT_APP_FACE_HPP
@@ -41,16 +42,10 @@
                     OnInterest onInterest) = 0;
 
   virtual void
-  sign(Data& data);
-
-  virtual void
   put(const Data& data) = 0;
 
   virtual
   ~AppFace() { }
-
-protected:
-  ndn::KeyChain m_keyChain;
 };
 
 } // namespace nfd
diff --git a/daemon/mgmt/channel-status-publisher.cpp b/daemon/mgmt/channel-status-publisher.cpp
index c212f72..8abe2fb 100644
--- a/daemon/mgmt/channel-status-publisher.cpp
+++ b/daemon/mgmt/channel-status-publisher.cpp
@@ -37,9 +37,10 @@
 
 
 ChannelStatusPublisher::ChannelStatusPublisher(const FactoryMap& factories,
-                                               shared_ptr<AppFace> face,
-                                               const Name& prefix)
-  : SegmentPublisher(face, prefix)
+                                               AppFace& face,
+                                               const Name& prefix,
+                                               ndn::KeyChain& keyChain)
+  : SegmentPublisher(face, prefix, keyChain)
   , m_factories(factories)
 {
 
diff --git a/daemon/mgmt/channel-status-publisher.hpp b/daemon/mgmt/channel-status-publisher.hpp
index b204258..ef660a3 100644
--- a/daemon/mgmt/channel-status-publisher.hpp
+++ b/daemon/mgmt/channel-status-publisher.hpp
@@ -26,20 +26,22 @@
 #ifndef NFD_DAEMON_MGMT_CHANNEL_STATUS_PUBLISHER_HPP
 #define NFD_DAEMON_MGMT_CHANNEL_STATUS_PUBLISHER_HPP
 
-#include "mgmt/segment-publisher.hpp"
+#include "core/segment-publisher.hpp"
+#include "mgmt/app-face.hpp"
 
 namespace nfd {
 
 class ProtocolFactory;
 
-class ChannelStatusPublisher : public SegmentPublisher
+class ChannelStatusPublisher : public SegmentPublisher<AppFace>
 {
 public:
   typedef std::map< std::string/*protocol*/, shared_ptr<ProtocolFactory> > FactoryMap;
 
   ChannelStatusPublisher(const FactoryMap& factories,
-                         shared_ptr<AppFace> face,
-                         const Name& prefix);
+                         AppFace& face,
+                         const Name& prefix,
+                         ndn::KeyChain& keyChain);
 
   virtual
   ~ChannelStatusPublisher();
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index b6cca36..c8bc267 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -113,12 +113,13 @@
 const size_t FaceManager::CHANNELS_LIST_DATASET_NCOMPS = CHANNELS_LIST_DATASET_PREFIX.size();
 
 FaceManager::FaceManager(FaceTable& faceTable,
-                         shared_ptr<InternalFace> face)
-  : ManagerBase(face, FACE_MANAGER_PRIVILEGE)
+                         shared_ptr<InternalFace> face,
+                         ndn::KeyChain& keyChain)
+  : ManagerBase(face, FACE_MANAGER_PRIVILEGE, keyChain)
   , m_faceTable(faceTable)
-  , m_faceStatusPublisher(m_faceTable, m_face, FACES_LIST_DATASET_PREFIX)
-  , m_channelStatusPublisher(m_factories, m_face, CHANNELS_LIST_DATASET_PREFIX)
-  , m_notificationStream(m_face, FACE_EVENTS_PREFIX)
+  , m_faceStatusPublisher(m_faceTable, *m_face, FACES_LIST_DATASET_PREFIX, keyChain)
+  , m_channelStatusPublisher(m_factories, *m_face, CHANNELS_LIST_DATASET_PREFIX, keyChain)
+  , m_notificationStream(m_face, FACE_EVENTS_PREFIX, keyChain)
   , m_signedVerbDispatch(SIGNED_COMMAND_VERBS,
                          SIGNED_COMMAND_VERBS +
                          (sizeof(SIGNED_COMMAND_VERBS) / sizeof(SignedVerbAndProcessor)))
diff --git a/daemon/mgmt/face-manager.hpp b/daemon/mgmt/face-manager.hpp
index 0a5579e..ec5decf 100644
--- a/daemon/mgmt/face-manager.hpp
+++ b/daemon/mgmt/face-manager.hpp
@@ -61,7 +61,8 @@
    */
 
   FaceManager(FaceTable& faceTable,
-              shared_ptr<InternalFace> face);
+              shared_ptr<InternalFace> face,
+              ndn::KeyChain& keyChain);
 
   virtual
   ~FaceManager();
diff --git a/daemon/mgmt/face-status-publisher.cpp b/daemon/mgmt/face-status-publisher.cpp
index 62531d2..04542c8 100644
--- a/daemon/mgmt/face-status-publisher.cpp
+++ b/daemon/mgmt/face-status-publisher.cpp
@@ -34,9 +34,10 @@
 
 
 FaceStatusPublisher::FaceStatusPublisher(const FaceTable& faceTable,
-                                         shared_ptr<AppFace> face,
-                                         const Name& prefix)
-  : SegmentPublisher(face, prefix)
+                                         AppFace& face,
+                                         const Name& prefix,
+                                         ndn::KeyChain& keyChain)
+  : SegmentPublisher(face, prefix, keyChain)
   , m_faceTable(faceTable)
 {
 
diff --git a/daemon/mgmt/face-status-publisher.hpp b/daemon/mgmt/face-status-publisher.hpp
index 935426d..5091165 100644
--- a/daemon/mgmt/face-status-publisher.hpp
+++ b/daemon/mgmt/face-status-publisher.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,23 +21,25 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_MGMT_FACE_STATUS_PUBLISHER_HPP
 #define NFD_DAEMON_MGMT_FACE_STATUS_PUBLISHER_HPP
 
-#include "mgmt/segment-publisher.hpp"
+#include "core/segment-publisher.hpp"
+#include "mgmt/app-face.hpp"
 
 namespace nfd {
 
 class FaceTable;
 
-class FaceStatusPublisher : public SegmentPublisher
+class FaceStatusPublisher : public SegmentPublisher<AppFace>
 {
 public:
   FaceStatusPublisher(const FaceTable& faceTable,
-                      shared_ptr<AppFace> face,
-                      const Name& prefix);
+                      AppFace& face,
+                      const Name& prefix,
+                      ndn::KeyChain& keyChain);
 
   virtual
   ~FaceStatusPublisher();
diff --git a/daemon/mgmt/fib-enumeration-publisher.cpp b/daemon/mgmt/fib-enumeration-publisher.cpp
index 4278c98..b7bad51 100644
--- a/daemon/mgmt/fib-enumeration-publisher.cpp
+++ b/daemon/mgmt/fib-enumeration-publisher.cpp
@@ -33,9 +33,10 @@
 NFD_LOG_INIT("FibEnumerationPublisher");
 
 FibEnumerationPublisher::FibEnumerationPublisher(const Fib& fib,
-                                                 shared_ptr<AppFace> face,
-                                                 const Name& prefix)
-  : SegmentPublisher(face, prefix)
+                                                 AppFace& face,
+                                                 const Name& prefix,
+                                                 ndn::KeyChain& keyChain)
+  : SegmentPublisher(face, prefix, keyChain)
   , m_fib(fib)
 {
 }
diff --git a/daemon/mgmt/fib-enumeration-publisher.hpp b/daemon/mgmt/fib-enumeration-publisher.hpp
index 2aa7539..2ff5c31 100644
--- a/daemon/mgmt/fib-enumeration-publisher.hpp
+++ b/daemon/mgmt/fib-enumeration-publisher.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,23 +21,25 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_MGMT_FIB_ENUMERATION_PUBLISHER_HPP
 #define NFD_DAEMON_MGMT_FIB_ENUMERATION_PUBLISHER_HPP
 
-#include "mgmt/segment-publisher.hpp"
+#include "core/segment-publisher.hpp"
+#include "mgmt/app-face.hpp"
 
 namespace nfd {
 
 class Fib;
 
-class FibEnumerationPublisher : public SegmentPublisher
+class FibEnumerationPublisher : public SegmentPublisher<AppFace>
 {
 public:
   FibEnumerationPublisher(const Fib& fib,
-                          shared_ptr<AppFace> face,
-                          const Name& prefix);
+                          AppFace& face,
+                          const Name& prefix,
+                          ndn::KeyChain& keyChain);
 
   virtual
   ~FibEnumerationPublisher();
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 98c4578..bda1681 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "fib-manager.hpp"
 
@@ -76,11 +77,12 @@
 
 FibManager::FibManager(Fib& fib,
                        function<shared_ptr<Face>(FaceId)> getFace,
-                       shared_ptr<InternalFace> face)
-  : ManagerBase(face, FIB_PRIVILEGE)
+                       shared_ptr<InternalFace> face,
+                       ndn::KeyChain& keyChain)
+  : ManagerBase(face, FIB_PRIVILEGE, keyChain)
   , m_managedFib(fib)
   , m_getFace(getFace)
-  , m_fibEnumerationPublisher(fib, face, LIST_COMMAND_PREFIX)
+  , m_fibEnumerationPublisher(fib, *face, LIST_COMMAND_PREFIX, keyChain)
   , m_signedVerbDispatch(SIGNED_COMMAND_VERBS,
                          SIGNED_COMMAND_VERBS +
                          (sizeof(SIGNED_COMMAND_VERBS) / sizeof(SignedVerbAndProcessor)))
diff --git a/daemon/mgmt/fib-manager.hpp b/daemon/mgmt/fib-manager.hpp
index 4591088..c8c21ea 100644
--- a/daemon/mgmt/fib-manager.hpp
+++ b/daemon/mgmt/fib-manager.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_MGMT_FIB_MANAGER_HPP
 #define NFD_DAEMON_MGMT_FIB_MANAGER_HPP
@@ -43,7 +44,8 @@
 
   FibManager(Fib& fib,
              function<shared_ptr<Face>(FaceId)> getFace,
-             shared_ptr<InternalFace> face);
+             shared_ptr<InternalFace> face,
+             ndn::KeyChain& keyChain);
 
   virtual
   ~FibManager();
diff --git a/daemon/mgmt/manager-base.cpp b/daemon/mgmt/manager-base.cpp
index 60f3bc9..ca1e00d 100644
--- a/daemon/mgmt/manager-base.cpp
+++ b/daemon/mgmt/manager-base.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "manager-base.hpp"
 #include "core/logger.hpp"
@@ -29,8 +30,10 @@
 
 NFD_LOG_INIT("ManagerBase");
 
-ManagerBase::ManagerBase(shared_ptr<InternalFace> face, const std::string& privilege)
+ManagerBase::ManagerBase(shared_ptr<InternalFace> face, const std::string& privilege,
+                         ndn::KeyChain& keyChain)
   : m_face(face)
+  , m_keyChain(keyChain)
 {
   face->getValidator().addSupportedPrivilege(privilege);
 }
@@ -92,7 +95,7 @@
   shared_ptr<Data> responseData(make_shared<Data>(name));
   responseData->setContent(encodedControl);
 
-  m_face->sign(*responseData);
+  m_keyChain.sign(*responseData);
   m_face->put(*responseData);
 }
 
diff --git a/daemon/mgmt/manager-base.hpp b/daemon/mgmt/manager-base.hpp
index 2eac9e3..15c19ee 100644
--- a/daemon/mgmt/manager-base.hpp
+++ b/daemon/mgmt/manager-base.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_MGMT_MANAGER_BASE_HPP
 #define NFD_DAEMON_MGMT_MANAGER_BASE_HPP
@@ -51,7 +52,9 @@
     Error(const std::string& what) : std::runtime_error(what) {}
   };
 
-  ManagerBase(shared_ptr<InternalFace> face, const std::string& privilege);
+  ManagerBase(shared_ptr<InternalFace> face,
+              const std::string& privilege,
+              ndn::KeyChain& keyChain);
 
   virtual
   ~ManagerBase();
@@ -112,6 +115,7 @@
 
 protected:
   shared_ptr<InternalFace> m_face;
+  ndn::KeyChain& m_keyChain;
 };
 
 inline void
diff --git a/daemon/mgmt/notification-stream.hpp b/daemon/mgmt/notification-stream.hpp
index 8d727d7..06c3b5a 100644
--- a/daemon/mgmt/notification-stream.hpp
+++ b/daemon/mgmt/notification-stream.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,8 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
+
 #ifndef NFD_DAEMON_MGMT_NOTIFICATION_STREAM_HPP
 #define NFD_DAEMON_MGMT_NOTIFICATION_STREAM_HPP
 
@@ -31,7 +33,7 @@
 class NotificationStream
 {
 public:
-  NotificationStream(shared_ptr<AppFace> face, const Name& prefix);
+  NotificationStream(shared_ptr<AppFace> face, const Name& prefix, ndn::KeyChain& keyChain);
 
   ~NotificationStream();
 
@@ -42,13 +44,17 @@
   shared_ptr<AppFace> m_face;
   const Name m_prefix;
   uint64_t m_sequenceNo;
+  ndn::KeyChain& m_keyChain;
 };
 
 inline
-NotificationStream::NotificationStream(shared_ptr<AppFace> face, const Name& prefix)
+NotificationStream::NotificationStream(shared_ptr<AppFace> face,
+                                       const Name& prefix,
+                                       ndn::KeyChain& keyChain)
   : m_face(face)
   , m_prefix(prefix)
   , m_sequenceNo(0)
+  , m_keyChain(keyChain)
 {
 }
 
@@ -62,7 +68,7 @@
   data->setContent(notification.wireEncode());
   data->setFreshnessPeriod(time::seconds(1));
 
-  m_face->sign(*data);
+  m_keyChain.sign(*data);
   m_face->put(*data);
 
   ++m_sequenceNo;
diff --git a/daemon/mgmt/segment-publisher.cpp b/daemon/mgmt/segment-publisher.cpp
deleted file mode 100644
index 01f3d12..0000000
--- a/daemon/mgmt/segment-publisher.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- 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
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-#include "segment-publisher.hpp"
-
-#include "core/logger.hpp"
-#include "face/face.hpp"
-
-#include <ndn-cxx/util/time.hpp>
-
-namespace nfd {
-
-NFD_LOG_INIT("SegmentPublisher");
-
-SegmentPublisher::SegmentPublisher(shared_ptr<AppFace> face,
-                                   const Name& prefix)
-  : m_face(face)
-  , m_prefix(prefix)
-{
-
-}
-
-
-SegmentPublisher::~SegmentPublisher()
-{
-
-}
-
-void
-SegmentPublisher::publish()
-{
-  Name segmentPrefix(m_prefix);
-  segmentPrefix.appendVersion();
-
-  static const size_t  MAX_SEGMENT_SIZE = MAX_NDN_PACKET_SIZE >> 1;
-
-  ndn::EncodingBuffer buffer;
-
-  generate(buffer);
-
-  const uint8_t* rawBuffer = buffer.buf();
-  const uint8_t* segmentBegin = rawBuffer;
-  const uint8_t* end = rawBuffer + buffer.size();
-
-  uint64_t segmentNo = 0;
-  while (segmentBegin < end)
-    {
-      const uint8_t* segmentEnd = segmentBegin + MAX_SEGMENT_SIZE;
-      if (segmentEnd > end)
-        {
-          segmentEnd = end;
-        }
-
-      Name segmentName(segmentPrefix);
-      segmentName.appendSegment(segmentNo);
-
-      shared_ptr<Data> data(make_shared<Data>(segmentName));
-      data->setContent(segmentBegin, segmentEnd - segmentBegin);
-
-      segmentBegin = segmentEnd;
-      if (segmentBegin >= end)
-        {
-          NFD_LOG_DEBUG("final block is " << segmentNo);
-          data->setFinalBlockId(segmentName[-1]);
-        }
-
-      NFD_LOG_DEBUG("publishing segment #" << segmentNo);
-      publishSegment(data);
-      segmentNo++;
-    }
-}
-
-void
-SegmentPublisher::publishSegment(shared_ptr<Data>& data)
-{
-  m_face->sign(*data);
-  m_face->put(*data);
-}
-
-} // namespace nfd
diff --git a/daemon/mgmt/segment-publisher.hpp b/daemon/mgmt/segment-publisher.hpp
deleted file mode 100644
index eeefda7..0000000
--- a/daemon/mgmt/segment-publisher.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- 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
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-#ifndef NFD_DAEMON_MGMT_SEGMENT_PUBLISHER_HPP
-#define NFD_DAEMON_MGMT_SEGMENT_PUBLISHER_HPP
-
-#include "common.hpp"
-#include "mgmt/app-face.hpp"
-
-#include <ndn-cxx/encoding/encoding-buffer.hpp>
-
-namespace nfd {
-
-class AppFace;
-
-class SegmentPublisher : noncopyable
-{
-public:
-  SegmentPublisher(shared_ptr<AppFace> face,
-                   const Name& prefix);
-
-  virtual
-  ~SegmentPublisher();
-
-  void
-  publish();
-
-protected:
-
-  virtual size_t
-  generate(ndn::EncodingBuffer& outBuffer) =0;
-
-private:
-  void
-  publishSegment(shared_ptr<Data>& data);
-
-private:
-  shared_ptr<AppFace> m_face;
-  const Name m_prefix;
-};
-
-} // namespace nfd
-
-#endif // NFD_DAEMON_MGMT_SEGMENT_PUBLISHER_HPP
diff --git a/daemon/mgmt/status-server.cpp b/daemon/mgmt/status-server.cpp
index 148061c..8861b9a 100644
--- a/daemon/mgmt/status-server.cpp
+++ b/daemon/mgmt/status-server.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "status-server.hpp"
 #include "fw/forwarder.hpp"
@@ -31,10 +32,11 @@
 const Name StatusServer::DATASET_PREFIX = "ndn:/localhost/nfd/status";
 const time::milliseconds StatusServer::RESPONSE_FRESHNESS = time::milliseconds(5000);
 
-StatusServer::StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder)
+StatusServer::StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder, ndn::KeyChain& keyChain)
   : m_face(face)
   , m_forwarder(forwarder)
   , m_startTimestamp(time::system_clock::now())
+  , m_keyChain(keyChain)
 {
   m_face->setInterestFilter(DATASET_PREFIX, bind(&StatusServer::onInterest, this, _2));
 }
@@ -52,7 +54,7 @@
   shared_ptr<ndn::nfd::ForwarderStatus> status = this->collectStatus();
   data->setContent(status->wireEncode());
 
-  m_face->sign(*data);
+  m_keyChain.sign(*data);
   m_face->put(*data);
 }
 
@@ -71,11 +73,7 @@
   status->setNMeasurementsEntries(m_forwarder.getMeasurements().size());
   status->setNCsEntries(m_forwarder.getCs().size());
 
-  const ForwarderCounters& counters = m_forwarder.getCounters();
-  status->setNInInterests(counters.getNInInterests());
-  status->setNInDatas(counters.getNInDatas());
-  status->setNOutInterests(counters.getNOutInterests());
-  status->setNOutDatas(counters.getNOutDatas());
+  m_forwarder.getCounters().copyTo(*status);
 
   return status;
 }
diff --git a/daemon/mgmt/status-server.hpp b/daemon/mgmt/status-server.hpp
index c046adf..16dbf8e 100644
--- a/daemon/mgmt/status-server.hpp
+++ b/daemon/mgmt/status-server.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_MGMT_STATUS_SERVER_HPP
 #define NFD_DAEMON_MGMT_STATUS_SERVER_HPP
@@ -35,7 +36,7 @@
 class StatusServer : noncopyable
 {
 public:
-  StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder);
+  StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder, ndn::KeyChain& keyChain);
 
 private:
   void
@@ -51,6 +52,7 @@
   shared_ptr<AppFace> m_face;
   Forwarder& m_forwarder;
   time::system_clock::TimePoint m_startTimestamp;
+  ndn::KeyChain& m_keyChain;
 };
 
 } // namespace nfd
diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index b51badc..1193900 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.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,  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.
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "strategy-choice-manager.hpp"
 #include "table/strategy-choice.hpp"
@@ -46,10 +46,11 @@
 const Name StrategyChoiceManager::LIST_DATASET_PREFIX("/localhost/nfd/strategy-choice/list");
 
 StrategyChoiceManager::StrategyChoiceManager(StrategyChoice& strategyChoice,
-                                             shared_ptr<InternalFace> face)
-  : ManagerBase(face, STRATEGY_CHOICE_PRIVILEGE)
+                                             shared_ptr<InternalFace> face,
+                                             ndn::KeyChain& keyChain)
+  : ManagerBase(face, STRATEGY_CHOICE_PRIVILEGE, keyChain)
   , m_strategyChoice(strategyChoice)
-  , m_listPublisher(strategyChoice, m_face, LIST_DATASET_PREFIX)
+  , m_listPublisher(strategyChoice, *m_face, LIST_DATASET_PREFIX, keyChain)
 {
   face->setInterestFilter("/localhost/nfd/strategy-choice",
                           bind(&StrategyChoiceManager::onStrategyChoiceRequest, this, _2));
diff --git a/daemon/mgmt/strategy-choice-manager.hpp b/daemon/mgmt/strategy-choice-manager.hpp
index f3a0ed5..c2ccd53 100644
--- a/daemon/mgmt/strategy-choice-manager.hpp
+++ b/daemon/mgmt/strategy-choice-manager.hpp
@@ -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,  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.
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
 #define NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
@@ -41,7 +41,8 @@
 {
 public:
   StrategyChoiceManager(StrategyChoice& strategyChoice,
-                        shared_ptr<InternalFace> face);
+                        shared_ptr<InternalFace> face,
+                        ndn::KeyChain& keyChain);
 
   virtual
   ~StrategyChoiceManager();
diff --git a/daemon/mgmt/strategy-choice-publisher.cpp b/daemon/mgmt/strategy-choice-publisher.cpp
index add1b73..163ac3a 100644
--- a/daemon/mgmt/strategy-choice-publisher.cpp
+++ b/daemon/mgmt/strategy-choice-publisher.cpp
@@ -35,9 +35,10 @@
 
 
 StrategyChoicePublisher::StrategyChoicePublisher(const StrategyChoice& strategyChoice,
-                                                 shared_ptr<AppFace> face,
-                                                 const Name& prefix)
-  : SegmentPublisher(face, prefix)
+                                                 AppFace& face,
+                                                 const Name& prefix,
+                                                 ndn::KeyChain& keyChain)
+  : SegmentPublisher(face, prefix, keyChain)
   , m_strategyChoice(strategyChoice)
 {
 
diff --git a/daemon/mgmt/strategy-choice-publisher.hpp b/daemon/mgmt/strategy-choice-publisher.hpp
index d19a92e..8322b63 100644
--- a/daemon/mgmt/strategy-choice-publisher.hpp
+++ b/daemon/mgmt/strategy-choice-publisher.hpp
@@ -26,18 +26,20 @@
 #ifndef NFD_DAEMON_MGMT_STRATEGY_CHOICE_PUBLISHER_HPP
 #define NFD_DAEMON_MGMT_STRATEGY_CHOICE_PUBLISHER_HPP
 
-#include "mgmt/segment-publisher.hpp"
+#include "core/segment-publisher.hpp"
+#include "mgmt/app-face.hpp"
 
 namespace nfd {
 
 class StrategyChoice;
 
-class StrategyChoicePublisher : public SegmentPublisher
+class StrategyChoicePublisher : public SegmentPublisher<AppFace>
 {
 public:
   StrategyChoicePublisher(const StrategyChoice& strategyChoice,
-                          shared_ptr<AppFace> face,
-                          const Name& prefix);
+                          AppFace& face,
+                          const Name& prefix,
+                          ndn::KeyChain& keyChain);
 
   virtual
   ~StrategyChoicePublisher();
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index 516de57..3672b66 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "fib.hpp"
 #include "pit-entry.hpp"
@@ -114,24 +115,28 @@
 }
 
 void
+Fib::erase(shared_ptr<name_tree::Entry> nameTreeEntry)
+{
+  nameTreeEntry->setFibEntry(shared_ptr<fib::Entry>());
+  m_nameTree.eraseEntryIfEmpty(nameTreeEntry);
+  --m_nItems;
+}
+
+void
 Fib::erase(const Name& prefix)
 {
   shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.findExactMatch(prefix);
-  if (static_cast<bool>(nameTreeEntry))
-  {
-    nameTreeEntry->setFibEntry(shared_ptr<fib::Entry>());
-    --m_nItems;
+  if (static_cast<bool>(nameTreeEntry)) {
+    this->erase(nameTreeEntry);
   }
 }
 
 void
 Fib::erase(const fib::Entry& entry)
 {
-  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.findExactMatch(entry);
-  if (static_cast<bool>(nameTreeEntry))
-  {
-    nameTreeEntry->setFibEntry(shared_ptr<fib::Entry>());
-    --m_nItems;
+  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.get(entry);
+  if (static_cast<bool>(nameTreeEntry)) {
+    this->erase(nameTreeEntry);
   }
 }
 
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index e5aaf15..615462f 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_TABLE_FIB_HPP
 #define NFD_DAEMON_TABLE_FIB_HPP
@@ -128,6 +129,9 @@
   shared_ptr<fib::Entry>
   findLongestPrefixMatch(shared_ptr<name_tree::Entry> nameTreeEntry) const;
 
+  void
+  erase(shared_ptr<name_tree::Entry> nameTreeEntry);
+
 private:
   NameTree& m_nameTree;
   size_t m_nItems;
diff --git a/daemon/table/measurements-accessor.cpp b/daemon/table/measurements-accessor.cpp
index 8ecb0fd..81b1432 100644
--- a/daemon/table/measurements-accessor.cpp
+++ b/daemon/table/measurements-accessor.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "measurements-accessor.hpp"
 
diff --git a/daemon/table/measurements-accessor.hpp b/daemon/table/measurements-accessor.hpp
index 2db0ccb..2108435 100644
--- a/daemon/table/measurements-accessor.hpp
+++ b/daemon/table/measurements-accessor.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
 #define NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
@@ -68,7 +69,7 @@
    *  The entry will be kept until at least now()+lifetime.
    */
   void
-  extendLifetime(measurements::Entry& entry, const time::nanoseconds& lifetime);
+  extendLifetime(shared_ptr<measurements::Entry> entry, const time::nanoseconds& lifetime);
 
 private:
   /** \brief perform access control to Measurements entry
@@ -109,7 +110,8 @@
 }
 
 inline void
-MeasurementsAccessor::extendLifetime(measurements::Entry& entry, const time::nanoseconds& lifetime)
+MeasurementsAccessor::extendLifetime(shared_ptr<measurements::Entry> entry,
+                                     const time::nanoseconds& lifetime)
 {
   m_measurements.extendLifetime(entry, lifetime);
 }
diff --git a/daemon/table/measurements.cpp b/daemon/table/measurements.cpp
index a63c602..4943bf4 100644
--- a/daemon/table/measurements.cpp
+++ b/daemon/table/measurements.cpp
@@ -100,7 +100,15 @@
     return shared_ptr<measurements::Entry>();
   }
 
-  return this->get(child->getName().getPrefix(-1));
+  shared_ptr<name_tree::Entry> nameTreeChild = m_nameTree.get(*child);
+  shared_ptr<name_tree::Entry> nameTreeEntry = nameTreeChild->getParent();
+  if (static_cast<bool>(nameTreeEntry)) {
+    return this->get(nameTreeEntry);
+  }
+  else {
+    BOOST_ASSERT(nameTreeChild->getPrefix().size() == 0); // root entry has no parent
+    return shared_ptr<measurements::Entry>();
+  }
 }
 
 shared_ptr<measurements::Entry>
@@ -124,33 +132,38 @@
 }
 
 void
-Measurements::extendLifetime(measurements::Entry& entry, const time::nanoseconds& lifetime)
+Measurements::extendLifetime(shared_ptr<measurements::Entry> entry,
+                             const time::nanoseconds& lifetime)
 {
-  shared_ptr<measurements::Entry> ret = this->findExactMatch(entry.getName());
-  if (static_cast<bool>(ret))
-  {
-    time::steady_clock::TimePoint expiry = time::steady_clock::now() + lifetime;
-    if (ret->m_expiry >= expiry) // has longer lifetime, not extending
-      return;
-    scheduler::cancel(entry.m_cleanup);
-    entry.m_expiry = expiry;
-    entry.m_cleanup = scheduler::schedule(lifetime,
-                         bind(&Measurements::cleanup, this, ret));
+  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.get(*entry);
+  if (!static_cast<bool>(nameTreeEntry) ||
+      nameTreeEntry->getMeasurementsEntry().get() != entry.get()) {
+    // entry is already gone; it is a dangling reference
+    return;
   }
+
+  time::steady_clock::TimePoint expiry = time::steady_clock::now() + lifetime;
+  if (entry->m_expiry >= expiry) {
+    // has longer lifetime, not extending
+    return;
+  }
+
+  scheduler::cancel(entry->m_cleanup);
+  entry->m_expiry = expiry;
+  entry->m_cleanup = scheduler::schedule(lifetime, bind(&Measurements::cleanup, this, entry));
 }
 
 void
 Measurements::cleanup(shared_ptr<measurements::Entry> entry)
 {
-  BOOST_ASSERT(entry);
+  BOOST_ASSERT(static_cast<bool>(entry));
 
-  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.findExactMatch(entry->getName());
-  if (static_cast<bool>(nameTreeEntry))
-  {
+  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.get(*entry);
+  if (static_cast<bool>(nameTreeEntry)) {
     nameTreeEntry->setMeasurementsEntry(shared_ptr<measurements::Entry>());
+    m_nameTree.eraseEntryIfEmpty(nameTreeEntry);
     m_nItems--;
   }
-
 }
 
 } // namespace nfd
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 1ace0b9..7478c58 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -86,7 +86,7 @@
    *  The entry will be kept until at least now()+lifetime.
    */
   void
-  extendLifetime(measurements::Entry& entry, const time::nanoseconds& lifetime);
+  extendLifetime(shared_ptr<measurements::Entry> entry, const time::nanoseconds& lifetime);
 
   size_t
   size() const;
diff --git a/daemon/table/name-tree-entry.cpp b/daemon/table/name-tree-entry.cpp
index 0e4d821..017dbfe 100644
--- a/daemon/table/name-tree-entry.cpp
+++ b/daemon/table/name-tree-entry.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,9 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-// Name Tree Entry (i.e., Name Prefix Entry)
+ */
 
 #include "name-tree-entry.hpp"
 
@@ -41,7 +40,7 @@
   // resolve hash collisions
   // So before erasing a single node, make sure its m_next == 0
   // See eraseEntryIfEmpty in name-tree.cpp
-  if (m_next)
+  if (m_next != 0)
     delete m_next;
 }
 
@@ -55,6 +54,42 @@
 {
 }
 
+bool
+Entry::isEmpty() const
+{
+  return m_children.empty() &&
+         !static_cast<bool>(m_fibEntry) &&
+         m_pitEntries.empty() &&
+         !static_cast<bool>(m_measurementsEntry) &&
+         !static_cast<bool>(m_strategyChoiceEntry);
+}
+
+void
+Entry::setFibEntry(shared_ptr<fib::Entry> fibEntry)
+{
+  if (static_cast<bool>(fibEntry)) {
+    BOOST_ASSERT(!static_cast<bool>(fibEntry->m_nameTreeEntry));
+  }
+
+  if (static_cast<bool>(m_fibEntry)) {
+    m_fibEntry->m_nameTreeEntry.reset();
+  }
+  m_fibEntry = fibEntry;
+  if (static_cast<bool>(m_fibEntry)) {
+    m_fibEntry->m_nameTreeEntry = this->shared_from_this();
+  }
+}
+
+void
+Entry::insertPitEntry(shared_ptr<pit::Entry> pitEntry)
+{
+  BOOST_ASSERT(static_cast<bool>(pitEntry));
+  BOOST_ASSERT(!static_cast<bool>(pitEntry->m_nameTreeEntry));
+
+  m_pitEntries.push_back(pitEntry);
+  pitEntry->m_nameTreeEntry = this->shared_from_this();
+}
+
 void
 Entry::erasePitEntry(shared_ptr<pit::Entry> pitEntry)
 {
@@ -70,5 +105,37 @@
   pitEntry->m_nameTreeEntry.reset();
 }
 
+void
+Entry::setMeasurementsEntry(shared_ptr<measurements::Entry> measurementsEntry)
+{
+  if (static_cast<bool>(measurementsEntry)) {
+    BOOST_ASSERT(!static_cast<bool>(measurementsEntry->m_nameTreeEntry));
+  }
+
+  if (static_cast<bool>(m_measurementsEntry)) {
+    m_measurementsEntry->m_nameTreeEntry.reset();
+  }
+  m_measurementsEntry = measurementsEntry;
+  if (static_cast<bool>(m_measurementsEntry)) {
+    m_measurementsEntry->m_nameTreeEntry = this->shared_from_this();
+  }
+}
+
+void
+Entry::setStrategyChoiceEntry(shared_ptr<strategy_choice::Entry> strategyChoiceEntry)
+{
+  if (static_cast<bool>(strategyChoiceEntry)) {
+    BOOST_ASSERT(!static_cast<bool>(strategyChoiceEntry->m_nameTreeEntry));
+  }
+
+  if (static_cast<bool>(m_strategyChoiceEntry)) {
+    m_strategyChoiceEntry->m_nameTreeEntry.reset();
+  }
+  m_strategyChoiceEntry = strategyChoiceEntry;
+  if (static_cast<bool>(m_strategyChoiceEntry)) {
+    m_strategyChoiceEntry->m_nameTreeEntry = this->shared_from_this();
+  }
+}
+
 } // namespace name_tree
 } // namespace nfd
diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp
index 48c9af7..d0e3587 100644
--- a/daemon/table/name-tree-entry.hpp
+++ b/daemon/table/name-tree-entry.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,9 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-// Name Tree Entry (i.e., Name Prefix Entry)
+ */
 
 #ifndef NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP
 #define NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP
@@ -95,6 +94,7 @@
   bool
   isEmpty() const;
 
+public: // attached table entries
   void
   setFibEntry(shared_ptr<fib::Entry> fibEntry);
 
@@ -187,37 +187,12 @@
   return !m_children.empty();
 }
 
-inline bool
-Entry::isEmpty() const
-{
-  return m_children.empty() &&
-         !static_cast<bool>(m_fibEntry) &&
-         m_pitEntries.empty() &&
-         !static_cast<bool>(m_measurementsEntry);
-}
-
 inline shared_ptr<fib::Entry>
 Entry::getFibEntry() const
 {
   return m_fibEntry;
 }
 
-inline void
-Entry::setFibEntry(shared_ptr<fib::Entry> fibEntry)
-{
-  if (static_cast<bool>(fibEntry)) {
-    BOOST_ASSERT(!static_cast<bool>(fibEntry->m_nameTreeEntry));
-  }
-
-  if (static_cast<bool>(m_fibEntry)) {
-    m_fibEntry->m_nameTreeEntry.reset();
-  }
-  m_fibEntry = fibEntry;
-  if (static_cast<bool>(m_fibEntry)) {
-    m_fibEntry->m_nameTreeEntry = this->shared_from_this();
-  }
-}
-
 inline bool
 Entry::hasPitEntries() const
 {
@@ -230,60 +205,18 @@
   return m_pitEntries;
 }
 
-inline void
-Entry::insertPitEntry(shared_ptr<pit::Entry> pitEntry)
-{
-  BOOST_ASSERT(static_cast<bool>(pitEntry));
-  BOOST_ASSERT(!static_cast<bool>(pitEntry->m_nameTreeEntry));
-
-  m_pitEntries.push_back(pitEntry);
-  pitEntry->m_nameTreeEntry = this->shared_from_this();
-}
-
 inline shared_ptr<measurements::Entry>
 Entry::getMeasurementsEntry() const
 {
   return m_measurementsEntry;
 }
 
-inline void
-Entry::setMeasurementsEntry(shared_ptr<measurements::Entry> measurementsEntry)
-{
-  if (static_cast<bool>(measurementsEntry)) {
-    BOOST_ASSERT(!static_cast<bool>(measurementsEntry->m_nameTreeEntry));
-  }
-
-  if (static_cast<bool>(m_measurementsEntry)) {
-    m_measurementsEntry->m_nameTreeEntry.reset();
-  }
-  m_measurementsEntry = measurementsEntry;
-  if (static_cast<bool>(m_measurementsEntry)) {
-    m_measurementsEntry->m_nameTreeEntry = this->shared_from_this();
-  }
-}
-
 inline shared_ptr<strategy_choice::Entry>
 Entry::getStrategyChoiceEntry() const
 {
   return m_strategyChoiceEntry;
 }
 
-inline void
-Entry::setStrategyChoiceEntry(shared_ptr<strategy_choice::Entry> strategyChoiceEntry)
-{
-  if (static_cast<bool>(strategyChoiceEntry)) {
-    BOOST_ASSERT(!static_cast<bool>(strategyChoiceEntry->m_nameTreeEntry));
-  }
-
-  if (static_cast<bool>(m_strategyChoiceEntry)) {
-    m_strategyChoiceEntry->m_nameTreeEntry.reset();
-  }
-  m_strategyChoiceEntry = strategyChoiceEntry;
-  if (static_cast<bool>(m_strategyChoiceEntry)) {
-    m_strategyChoiceEntry->m_nameTreeEntry = this->shared_from_this();
-  }
-}
-
 } // namespace name_tree
 } // namespace nfd
 
diff --git a/daemon/table/name-tree.hpp b/daemon/table/name-tree.hpp
index 2f404bf..027f852 100644
--- a/daemon/table/name-tree.hpp
+++ b/daemon/table/name-tree.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,9 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-// Name Tree (Name Prefix Hash Table)
+ */
 
 #ifndef NFD_DAEMON_TABLE_NAME_TREE_HPP
 #define NFD_DAEMON_TABLE_NAME_TREE_HPP
@@ -121,17 +120,12 @@
   shared_ptr<name_tree::Entry>
   findExactMatch(const Name& prefix) const;
 
-  shared_ptr<name_tree::Entry>
-  findExactMatch(const fib::Entry& fibEntry) const;
-
   /**
-   * \brief Erase a Name Tree Entry if this entry is empty.
-   * \details If a Name Tree Entry contains no Children, no FIB, no PIT, and
-   * no Measurements entries, then it can be erased. In addition, its parent entry
-   * will also be examined by following the parent pointer until all empty entries
-   * are erased.
-   * \param entry The pointer to the entry to be erased. The entry pointer should
-   * returned by the findExactMatch(), lookup(), or findLongestPrefixMatch() functions.
+   * \brief Delete a Name Tree Entry if this entry is empty.
+   * \param entry The entry to be deleted if empty.
+   * \note This function must be called after a table entry is detached from Name Tree
+   *       entry. The function deletes a Name Tree entry if nothing is attached to it and
+   *       it has no children, then repeats the same process on its ancestors.
    */
   bool
   eraseEntryIfEmpty(shared_ptr<name_tree::Entry> entry);
@@ -297,12 +291,6 @@
 }
 
 inline shared_ptr<name_tree::Entry>
-NameTree::findExactMatch(const fib::Entry& fibEntry) const
-{
-  return fibEntry.m_nameTreeEntry;
-}
-
-inline shared_ptr<name_tree::Entry>
 NameTree::get(const fib::Entry& fibEntry) const
 {
   return fibEntry.m_nameTreeEntry;
diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index 5839771..e089a09 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -129,10 +129,7 @@
 bool
 Entry::addNonce(uint32_t nonce)
 {
-  std::pair<std::set<uint32_t>::iterator, bool> insertResult =
-    m_nonces.insert(nonce);
-
-  return insertResult.second;
+  return m_nonceList.add(nonce);
 }
 
 InRecordCollection::iterator
@@ -173,7 +170,7 @@
   }
 
   it->update(interest);
-  m_nonces.insert(interest.getNonce());
+  m_nonceList.add(interest.getNonce());
   return it;
 }
 
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index fb89e27..420bb29 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -26,6 +26,7 @@
 #ifndef NFD_DAEMON_TABLE_PIT_ENTRY_HPP
 #define NFD_DAEMON_TABLE_PIT_ENTRY_HPP
 
+#include "pit-nonce-list.hpp"
 #include "pit-in-record.hpp"
 #include "pit-out-record.hpp"
 #include "core/scheduler.hpp"
@@ -155,7 +156,7 @@
   EventId m_stragglerTimer;
 
 private:
-  std::set<uint32_t> m_nonces;
+  pit::NonceList m_nonceList;
   shared_ptr<const Interest> m_interest;
   InRecordCollection m_inRecords;
   OutRecordCollection m_outRecords;
diff --git a/daemon/table/pit-nonce-list.cpp b/daemon/table/pit-nonce-list.cpp
new file mode 100644
index 0000000..02502ab
--- /dev/null
+++ b/daemon/table/pit-nonce-list.cpp
@@ -0,0 +1,66 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "pit-nonce-list.hpp"
+
+namespace nfd {
+namespace pit {
+
+// The NonceList has limited capacity to avoid memory explosion
+// if PIT entry is constantly refreshed (NFD Bug #1770).
+// Current implementation keeps nonces in a set to detect duplicates,
+// and a queue to evict the oldest nonce when capacity limit is reached.
+// A limitation is that a nonce first appeared at time 0 and duplicated at time 10
+// could be evicted before a nonce appeared only once at time 5;
+// this limitation should not affect normal operation.
+
+const size_t NonceList::CAPACITY = 256;
+
+NonceList::NonceList()
+{
+}
+
+bool
+NonceList::add(uint32_t nonce)
+{
+  bool isNew = m_nonceSet.insert(nonce).second;
+  if (!isNew)
+    return false;
+
+  m_nonceQueue.push(nonce);
+  BOOST_ASSERT(m_nonceSet.size() == m_nonceQueue.size());
+
+  if (m_nonceSet.size() > CAPACITY) {
+    size_t nErased = m_nonceSet.erase(m_nonceQueue.front());
+    BOOST_ASSERT(nErased == 1);
+    m_nonceQueue.pop();
+    BOOST_ASSERT(m_nonceSet.size() == m_nonceQueue.size());
+    BOOST_ASSERT(m_nonceSet.size() <= CAPACITY);
+  }
+  return true;
+}
+
+} // namespace pit
+} // namespace nfd
diff --git a/daemon/table/pit-nonce-list.hpp b/daemon/table/pit-nonce-list.hpp
new file mode 100644
index 0000000..393ae34
--- /dev/null
+++ b/daemon/table/pit-nonce-list.hpp
@@ -0,0 +1,64 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_TABLE_PIT_NONCE_LIST_HPP
+#define NFD_DAEMON_TABLE_PIT_NONCE_LIST_HPP
+
+#include "common.hpp"
+
+namespace nfd {
+namespace pit {
+
+/** \brief represents a Nonce list
+ */
+class NonceList : noncopyable
+{
+public:
+  NonceList();
+
+  /** \brief records a nonce
+   *  \return true if nonce is new; false if nonce is seen before
+   */
+  bool
+  add(uint32_t nonce);
+
+  size_t
+  size() const
+  {
+    return m_nonceSet.size();
+  }
+
+public:
+  static const size_t CAPACITY;
+
+private:
+  std::set<uint32_t> m_nonceSet;
+  std::queue<uint32_t> m_nonceQueue;
+};
+
+} // namespace pit
+} // namespace nfd
+
+#endif // NFD_DAEMON_TABLE_PIT_NONCE_LIST_HPP
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index 34c583e..aa5db1b 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "strategy-choice.hpp"
 #include "core/logger.hpp"
@@ -120,6 +120,7 @@
   this->changeStrategy(entry, oldStrategy.shared_from_this(), parentStrategy.shared_from_this());
 
   nameTreeEntry->setStrategyChoiceEntry(shared_ptr<Entry>());
+  m_nameTree.eraseEntryIfEmpty(nameTreeEntry);
   --m_nItems;
 }
 
diff --git a/docs/_static/nfd-status.xsd b/docs/_static/nfd-status.xsd
index 829ba7c..6a080a7 100644
--- a/docs/_static/nfd-status.xsd
+++ b/docs/_static/nfd-status.xsd
@@ -18,6 +18,13 @@
   </xs:sequence>
 </xs:complexType>
 
+<xs:complexType name="bidirectionalByteCountersType">
+  <xs:sequence>
+    <xs:element type="xs:nonNegativeInteger" name="incomingBytes"/>
+    <xs:element type="xs:nonNegativeInteger" name="outgoingBytes"/>
+  </xs:sequence>
+</xs:complexType>
+
 <xs:complexType name="generalStatusType">
   <xs:sequence>
     <xs:element type="xs:string" name="version"/>
@@ -47,8 +54,8 @@
 
 <xs:complexType name="faceFlagsType">
   <xs:sequence>
-    <xs:element type="xs:string" name="local" maxOccurs="1" minOccurs="0"/>
-    <xs:element type="xs:string" name="on-demand" maxOccurs="1" minOccurs="0"/>
+    <xs:element type="xs:string" name="local" minOccurs="0"/>
+    <xs:element type="xs:string" name="on-demand" minOccurs="0"/>
   </xs:sequence>
 </xs:complexType>
 
@@ -57,9 +64,10 @@
     <xs:element type="xs:nonNegativeInteger" name="faceId"/>
     <xs:element type="xs:anyURI" name="remoteUri"/>
     <xs:element type="xs:anyURI" name="localUri"/>
-    <xs:element type="xs:duration" name="expirationPeriod" maxOccurs="1" minOccurs="0"/>
+    <xs:element type="xs:duration" name="expirationPeriod" minOccurs="0"/>
     <xs:element type="nfd:bidirectionalPacketCountersType" name="packetCounters"/>
-    <xs:element type="nfd:faceFlagsType" name="flags" maxOccurs="1" minOccurs="0"/>
+    <xs:element type="nfd:bidirectionalByteCountersType" name="byteCounters"/>
+    <xs:element type="nfd:faceFlagsType" name="flags" minOccurs="0"/>
   </xs:sequence>
 </xs:complexType>
 
@@ -95,6 +103,35 @@
   </xs:sequence>
 </xs:complexType>
 
+<xs:complexType name="routeType">
+  <xs:sequence>
+    <xs:element type="xs:nonNegativeInteger" name="faceId"/>
+    <xs:element type="xs:nonNegativeInteger" name="origin"/>
+    <xs:element type="xs:nonNegativeInteger" name="cost"/>
+    <xs:element type="xs:nonNegativeInteger" name="flags"/>
+    <xs:element type="xs:duration" name="expirationPeriod" minOccurs="0"/>
+  </xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="ribEntryType">
+  <xs:sequence>
+    <xs:element type="xs:anyURI" name="prefix"/>
+    <xs:element name="routes">
+      <xs:complexType>
+        <xs:sequence>
+          <xs:element type="nfd:routeType" name="route" maxOccurs="unbounded"/>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+  </xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="ribType">
+  <xs:sequence>
+    <xs:element type="nfd:ribEntryType" name="ribEntry" maxOccurs="unbounded" minOccurs="0"/>
+  </xs:sequence>
+</xs:complexType>
+
 <xs:complexType name="strategyType">
   <xs:sequence>
     <xs:element type="xs:anyURI" name="name"/>
@@ -122,6 +159,7 @@
       <xs:element type="nfd:channelsType" name="channels"/>
       <xs:element type="nfd:facesType" name="faces"/>
       <xs:element type="nfd:fibType" name="fib"/>
+      <xs:element type="nfd:ribType" name="rib"/>
       <xs:element type="nfd:strategyChoicesType" name="strategyChoices"/>
     </xs:sequence>
   </xs:complexType>
diff --git a/docs/manpages/nfd-status.rst b/docs/manpages/nfd-status.rst
index 5a52ae2..a4d7c04 100644
--- a/docs/manpages/nfd-status.rst
+++ b/docs/manpages/nfd-status.rst
@@ -31,6 +31,9 @@
 ``-b``
   Retrieve FIB information.
 
+``-r``
+  Retrieve RIB information.
+
 ``-s``
   Retrieve configured strategy choice for NDN namespaces.
 
@@ -50,37 +53,46 @@
 Get all status information from NFD::
 
     $ nfd-status
+
     General NFD status:
-                   version=1000
-                 startTime=20140621T165241.938000
-               currentTime=20140621T170712.007000
-                    uptime=870 seconds
-          nNameTreeEntries=8
-               nFibEntries=2
+                   version=2000
+                 startTime=20140725T232341.374000
+               currentTime=20140725T233240
+                    uptime=538 seconds
+          nNameTreeEntries=10
+               nFibEntries=3
                nPitEntries=2
       nMeasurementsEntries=0
-                nCsEntries=24
-              nInInterests=33
-             nOutInterests=31
-                  nInDatas=24
-                 nOutDatas=18
+                nCsEntries=56
+              nInInterests=55
+             nOutInterests=54
+                  nInDatas=56
+                 nOutDatas=47
     Channels:
+      ws://[::]:9696
       unix:///private/var/run/nfd.sock
       udp6://[::]:6363
       udp4://0.0.0.0:6363
       tcp6://[::]:6363
       tcp4://0.0.0.0:6363
     Faces:
-      faceid=1 remote=internal:// local=internal:// counters={in={0i 26d} out={34i 0d}}
-      faceid=2 remote=udp4://224.0.23.170:56363 local=udp4://192.168.1.103:56363 counters={in={0i 0d} out={0i 0d}}
-      faceid=3 remote=udp4://224.0.23.170:56363 local=udp4://127.0.0.1:56363 counters={in={0i 0d} out={0i 0d}}
-      faceid=4 remote=ether://[01:00:5e:00:17:aa] local=dev://bridge0 counters={in={0i 0d} out={0i 0d}}
-      faceid=5 remote=ether://[01:00:5e:00:17:aa] local=dev://en0 counters={in={0i 0d} out={0i 0d}}
-      faceid=6 remote=ether://[01:00:5e:00:17:aa] local=dev://en1 counters={in={0i 0d} out={0i 0d}}
-      faceid=7 remote=fd://27 local=unix:///private/var/run/nfd.sock counters={in={23i 0d} out={0i 8d}}
-      faceid=10 remote=fd://28 local=unix:///private/var/run/nfd.sock counters={in={3i 0d} out={0i 2d}}
+      faceid=1 remote=internal:// local=internal:// counters={in={0i 52d 0B} out={51i 0d 0B}} local
+      faceid=254 remote=contentstore:// local=contentstore:// counters={in={0i 0d 0B} out={0i 0d 0B}} local
+      faceid=255 remote=null:// local=null:// counters={in={0i 0d 0B} out={0i 0d 0B}} local
+      faceid=256 remote=udp4://224.0.23.170:56363 local=udp4://129.82.138.211:56363 counters={in={0i 0d 0B} out={0i 0d 0B}}
+      faceid=257 remote=udp4://224.0.23.170:56363 local=udp4://127.0.0.1:56363 counters={in={0i 0d 0B} out={0i 0d 0B}}
+      faceid=258 remote=ether://[01:00:5e:00:17:aa] local=dev://bridge0 counters={in={0i 0d 0B} out={0i 0d 0B}}
+      faceid=259 remote=ether://[01:00:5e:00:17:aa] local=dev://en0 counters={in={0i 0d 0B} out={0i 0d 0B}}
+      faceid=260 remote=ether://[01:00:5e:00:17:aa] local=dev://en1 counters={in={0i 0d 0B} out={0i 0d 0B}}
+      faceid=261 remote=ether://[01:00:5e:00:17:aa] local=dev://en2 counters={in={0i 0d 0B} out={0i 0d 0B}}
+      faceid=262 remote=fd://30 local=unix:///private/var/run/nfd.sock counters={in={24i 6d 4880B} out={6i 16d 8417B}} local on-demand
+      faceid=268 remote=fd://31 local=unix:///private/var/run/nfd.sock counters={in={1i 0d 410B} out={0i 1d 764B}} local on-demand
+      faceid=269 remote=fd://32 local=unix:///private/var/run/nfd.sock counters={in={3i 0d 137B} out={0i 2d 925B}} local on-demand
     FIB:
       /localhost/nfd nexthops={faceid=1 (cost=0)}
-      /localhost/nfd/rib nexthops={faceid=7 (cost=0)}
+      /example/testApp nexthops={faceid=268 (cost=0)}
+      /localhost/nfd/rib nexthops={faceid=262 (cost=0)}
+    Rib:
+     /example/testApp route={faceid=268 (origin=0 cost=0 flags=1)}
     Strategy choices:
       / strategy=/localhost/nfd/strategy/best-route
diff --git a/rib/main.cpp b/rib/main.cpp
index b123b04..bfea4f7 100644
--- a/rib/main.cpp
+++ b/rib/main.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,  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.
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include <getopt.h>
 
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index 28a1e3e..993d84b 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -45,19 +45,30 @@
   RibManager::COMMAND_UNSIGNED_NCOMPS +
   4; // (timestamp, nonce, signed info tlv, signature tlv)
 
-const RibManager::VerbAndProcessor RibManager::COMMAND_VERBS[] =
+const RibManager::SignedVerbAndProcessor RibManager::SIGNED_COMMAND_VERBS[] =
   {
-    VerbAndProcessor(
-                     Name::Component("register"),
-                     &RibManager::registerEntry
-                     ),
+    SignedVerbAndProcessor(
+                           Name::Component("register"),
+                           &RibManager::registerEntry
+                           ),
 
-    VerbAndProcessor(
-                     Name::Component("unregister"),
-                     &RibManager::unregisterEntry
-                     ),
+    SignedVerbAndProcessor(
+                           Name::Component("unregister"),
+                           &RibManager::unregisterEntry
+                           ),
   };
 
+const RibManager::UnsignedVerbAndProcessor RibManager::UNSIGNED_COMMAND_VERBS[] =
+  {
+    UnsignedVerbAndProcessor(
+                             Name::Component("list"),
+                             &RibManager::listEntries
+                             ),
+  };
+
+const Name RibManager::LIST_COMMAND_PREFIX("/localhost/nfd/rib/list");
+const size_t RibManager::LIST_COMMAND_NCOMPS = LIST_COMMAND_PREFIX.size();
+
 RibManager::RibManager(ndn::Face& face)
   : m_face(face)
   , m_nfdController(m_face)
@@ -65,9 +76,14 @@
   , m_localhopValidator(m_face)
   , m_faceMonitor(m_face)
   , m_isLocalhopEnabled(false)
+  , m_ribStatusPublisher(m_managedRib, face, LIST_COMMAND_PREFIX, m_keyChain)
   , m_lastTransactionId(0)
-  , m_verbDispatch(COMMAND_VERBS,
-                   COMMAND_VERBS + (sizeof(COMMAND_VERBS) / sizeof(VerbAndProcessor)))
+  , m_signedVerbDispatch(SIGNED_COMMAND_VERBS,
+                         SIGNED_COMMAND_VERBS +
+                         (sizeof(SIGNED_COMMAND_VERBS) / sizeof(SignedVerbAndProcessor)))
+  , m_unsignedVerbDispatch(UNSIGNED_COMMAND_VERBS,
+                           UNSIGNED_COMMAND_VERBS +
+                           (sizeof(UNSIGNED_COMMAND_VERBS) / sizeof(UnsignedVerbAndProcessor)))
 {
 }
 
@@ -137,11 +153,11 @@
 {
   const Block& encodedControl = response.wireEncode();
 
-  Data responseData(name);
-  responseData.setContent(encodedControl);
+  shared_ptr<Data> responseData = make_shared<Data>(name);
+  responseData->setContent(encodedControl);
 
-  m_keyChain.sign(responseData);
-  m_face.put(responseData);
+  m_keyChain.sign(*responseData);
+  m_face.put(*responseData);
 }
 
 void
@@ -156,9 +172,22 @@
 void
 RibManager::onLocalhostRequest(const Interest& request)
 {
-  m_localhostValidator.validate(request,
-                                bind(&RibManager::onCommandValidated, this, _1),
-                                bind(&RibManager::onCommandValidationFailed, this, _1, _2));
+  const Name& command = request.getName();
+  const Name::Component& verb = command.get(COMMAND_PREFIX.size());
+
+  UnsignedVerbDispatchTable::const_iterator unsignedVerbProcessor = m_unsignedVerbDispatch.find(verb);
+
+  if (unsignedVerbProcessor != m_unsignedVerbDispatch.end())
+    {
+      NFD_LOG_DEBUG("command result: processing unsigned verb: " << verb);
+      (unsignedVerbProcessor->second)(this, request);
+    }
+  else
+    {
+      m_localhostValidator.validate(request,
+                                    bind(&RibManager::onCommandValidated, this, _1),
+                                    bind(&RibManager::onCommandValidationFailed, this, _1, _2));
+    }
 }
 
 void
@@ -179,8 +208,8 @@
   const Name::Component& verb = command[COMMAND_PREFIX.size()];
   const Name::Component& parameterComponent = command[COMMAND_PREFIX.size() + 1];
 
-  VerbDispatchTable::const_iterator verbProcessor = m_verbDispatch.find(verb);
-  if (verbProcessor != m_verbDispatch.end())
+  SignedVerbDispatchTable::const_iterator verbProcessor = m_signedVerbDispatch.find(verb);
+  if (verbProcessor != m_signedVerbDispatch.end())
     {
       ControlParameters parameters;
       if (!extractParameters(parameterComponent, parameters))
@@ -227,7 +256,8 @@
   faceEntry.cost = parameters.getCost();
   faceEntry.flags = parameters.getFlags();
 
-  if (parameters.getExpirationPeriod() != time::milliseconds::max())
+  if (parameters.hasExpirationPeriod() &&
+      parameters.getExpirationPeriod() != time::milliseconds::max())
     {
       faceEntry.expires = time::steady_clock::now() + parameters.getExpirationPeriod();
 
@@ -675,5 +705,22 @@
   sendUpdatesToFib(shared_ptr<const Interest>(), parameters);
 }
 
+void
+RibManager::listEntries(const Interest& request)
+{
+  const Name& command = request.getName();
+  const size_t commandNComps = command.size();
+
+  if (commandNComps < LIST_COMMAND_NCOMPS ||
+      !LIST_COMMAND_PREFIX.isPrefixOf(command))
+    {
+      NFD_LOG_DEBUG("command result: malformed");
+      sendResponse(command, 400, "Malformed command");
+      return;
+    }
+
+  m_ribStatusPublisher.publish();
+}
+
 } // namespace rib
 } // namespace nfd
diff --git a/rib/rib-manager.hpp b/rib/rib-manager.hpp
index 6566d1f..a19d211 100644
--- a/rib/rib-manager.hpp
+++ b/rib/rib-manager.hpp
@@ -29,6 +29,7 @@
 #include "rib.hpp"
 #include "face-monitor.hpp"
 #include "core/config-file.hpp"
+#include "rib-status-publisher.hpp"
 
 #include <ndn-cxx/security/validator-config.hpp>
 #include <ndn-cxx/management/nfd-controller.hpp>
@@ -198,6 +199,9 @@
   void
   invalidateTransaction(const TransactionId transactionId);
 
+  void
+  listEntries(const Interest& request);
+
 private:
   Rib m_managedRib;
   ndn::Face& m_face;
@@ -208,6 +212,8 @@
   FaceMonitor m_faceMonitor;
   bool m_isLocalhopEnabled;
 
+  RibStatusPublisher m_ribStatusPublisher;
+
   /** \brief The last transaction ID for FIB update response messages.
    *         Each group of FIB updates applied to the FIB is assigned an incrementing
    *         ID that is used to track the number of successfully applied updates.
@@ -226,14 +232,14 @@
 
   typedef function<void(RibManager*,
                         const shared_ptr<const Interest>& request,
-                        ControlParameters& parameters)> VerbProcessor;
+                        ControlParameters& parameters)> SignedVerbProcessor;
 
-  typedef std::map<name::Component, VerbProcessor> VerbDispatchTable;
+  typedef std::map<name::Component, SignedVerbProcessor> SignedVerbDispatchTable;
 
-  typedef std::pair<name::Component, VerbProcessor> VerbAndProcessor;
+  typedef std::pair<name::Component, SignedVerbProcessor> SignedVerbAndProcessor;
 
 
-  const VerbDispatchTable m_verbDispatch;
+  const SignedVerbDispatchTable m_signedVerbDispatch;
 
   static const Name COMMAND_PREFIX; // /localhost/nrd
   static const Name REMOTE_COMMAND_PREFIX; // /localhop/nrd
@@ -246,7 +252,17 @@
   // 8 with signed Interest support.
   static const size_t COMMAND_SIGNED_NCOMPS;
 
-  static const VerbAndProcessor COMMAND_VERBS[];
+  static const SignedVerbAndProcessor SIGNED_COMMAND_VERBS[];
+
+  typedef function<void(RibManager*, const Interest&)> UnsignedVerbProcessor;
+  typedef std::map<Name::Component, UnsignedVerbProcessor> UnsignedVerbDispatchTable;
+  typedef std::pair<Name::Component, UnsignedVerbProcessor> UnsignedVerbAndProcessor;
+
+  const UnsignedVerbDispatchTable m_unsignedVerbDispatch;
+  static const UnsignedVerbAndProcessor UNSIGNED_COMMAND_VERBS[];
+
+  static const Name LIST_COMMAND_PREFIX;
+  static const size_t LIST_COMMAND_NCOMPS;
 };
 
 } // namespace rib
diff --git a/rib/rib-status-publisher.cpp b/rib/rib-status-publisher.cpp
new file mode 100644
index 0000000..76a164c
--- /dev/null
+++ b/rib/rib-status-publisher.cpp
@@ -0,0 +1,97 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "rib/rib-status-publisher.hpp"
+#include "rib/rib.hpp"
+#include "core/logger.hpp"
+
+#include <ndn-cxx/management/nfd-rib-entry.hpp>
+#include <ndn-cxx/face.hpp>
+
+namespace nfd {
+namespace rib {
+
+NFD_LOG_INIT("RibStatusPublisher");
+
+RibStatusPublisher::RibStatusPublisher(const Rib& rib,
+                                       ndn::Face& face,
+                                       const Name& prefix,
+                                       ndn::KeyChain& keyChain)
+  : SegmentPublisher<ndn::Face>(face, prefix, keyChain)
+  , m_rib(rib)
+{
+}
+
+RibStatusPublisher::~RibStatusPublisher()
+{
+}
+
+size_t
+RibStatusPublisher::generate(ndn::EncodingBuffer& outBuffer)
+{
+  size_t totalLength = 0;
+
+  for (Rib::const_iterator ribIt = m_rib.begin(); ribIt != m_rib.end(); ++ribIt)
+    {
+      RibEntry& entry = *ribIt->second;
+
+      const Name& prefix = entry.getName();
+      size_t ribEntryLength = 0;
+
+      ndn::nfd::RibEntry tlvEntry;
+      const RibEntry::FaceList& faces = entry.getFaces();
+
+      for (RibEntry::FaceList::const_iterator faceIt = faces.begin();
+           faceIt != faces.end(); ++faceIt)
+        {
+          const FaceEntry& face = *faceIt;
+
+          ndn::nfd::Route route;
+          route
+            .setFaceId(face.faceId)
+            .setOrigin(face.origin)
+            .setCost(face.cost)
+            .setFlags(face.flags);
+          if (face.expires < time::steady_clock::TimePoint::max()) {
+            route.setExpirationPeriod(time::duration_cast<time::milliseconds>
+                                      (face.expires - time::steady_clock::now()));
+          }
+          tlvEntry.addRoute(route);
+        }
+
+      tlvEntry.setName(prefix);
+      ribEntryLength += tlvEntry.wireEncode(outBuffer);
+
+      NFD_LOG_DEBUG("generate: rib entry length = " << ribEntryLength);
+
+      totalLength += ribEntryLength;
+    }
+  NFD_LOG_DEBUG("generate: Total length = " << totalLength);
+  return totalLength;
+}
+
+
+} // namespace rib
+} // namespace nfd
diff --git a/rib/rib-status-publisher.hpp b/rib/rib-status-publisher.hpp
new file mode 100644
index 0000000..8673983
--- /dev/null
+++ b/rib/rib-status-publisher.hpp
@@ -0,0 +1,60 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_RIB_RIB_STATUS_PUBLISHER_HPP
+#define NFD_RIB_RIB_STATUS_PUBLISHER_HPP
+
+#include "core/segment-publisher.hpp"
+#include <ndn-cxx/face.hpp>
+
+namespace nfd {
+namespace rib {
+
+class Rib;
+
+class RibStatusPublisher : public SegmentPublisher<ndn::Face>
+{
+public:
+  RibStatusPublisher(const Rib& rib,
+                     ndn::Face& face,
+                     const Name& prefix,
+                     ndn::KeyChain& keyChain);
+
+  virtual
+  ~RibStatusPublisher();
+
+protected:
+  virtual size_t
+  generate(ndn::EncodingBuffer& outBuffer);
+
+private:
+  const Rib& m_rib;
+};
+
+
+} // namespace rib
+} // namespace nfd
+
+#endif
diff --git a/tests/core/segment-publisher.cpp b/tests/core/segment-publisher.cpp
new file mode 100644
index 0000000..da35376
--- /dev/null
+++ b/tests/core/segment-publisher.cpp
@@ -0,0 +1,168 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "core/segment-publisher.hpp"
+
+#include "tests/test-common.hpp"
+#include "tests/dummy-face.hpp"
+
+#include <ndn-cxx/encoding/tlv.hpp>
+
+#include <boost/foreach.hpp>
+
+namespace nfd {
+namespace tests {
+
+NFD_LOG_INIT("SegmentPublisherTest");
+
+template<size_t N=10000>
+class TestSegmentPublisher : public SegmentPublisher<DummyFace>
+{
+public:
+  TestSegmentPublisher(DummyFace& face,
+                       const Name& prefix,
+                       ndn::KeyChain& keyChain)
+    : SegmentPublisher(face, prefix, keyChain)
+    , m_totalPayloadLength(0)
+  {
+
+  }
+
+  virtual
+  ~TestSegmentPublisher()
+  {
+  }
+
+  uint16_t
+  getLimit() const
+  {
+    return N;
+  }
+
+  size_t
+  getTotalPayloadLength() const
+  {
+    return m_totalPayloadLength;
+  }
+
+protected:
+
+  virtual size_t
+  generate(ndn::EncodingBuffer& outBuffer)
+  {
+    size_t totalLength = 0;
+    for (uint64_t i = 0; i < N; i++)
+      {
+        totalLength += prependNonNegativeIntegerBlock(outBuffer, ndn::Tlv::Content, i);
+      }
+    m_totalPayloadLength += totalLength;
+    return totalLength;
+  }
+
+protected:
+  size_t m_totalPayloadLength;
+};
+
+template<size_t N>
+class SegmentPublisherFixture : public BaseFixture
+{
+public:
+  SegmentPublisherFixture()
+    : m_face(makeDummyFace())
+    , m_publisher(*m_face, "/localhost/nfd/SegmentPublisherFixture", m_keyChain)
+  {
+  }
+
+  void
+  validate(const Data& data)
+  {
+    Block payload = data.getContent();
+    NFD_LOG_DEBUG("payload size (w/o Content TLV): " << payload.value_size());
+
+    m_buffer.appendByteArray(payload.value(), payload.value_size());
+
+    uint64_t segmentNo = data.getName()[-1].toSegment();
+    if (data.getFinalBlockId() != data.getName()[-1])
+      {
+        return;
+      }
+
+    NFD_LOG_DEBUG("got final block: #" << segmentNo);
+
+    // wrap data in a single Content TLV for easy parsing
+    m_buffer.prependVarNumber(m_buffer.size());
+    m_buffer.prependVarNumber(ndn::Tlv::Content);
+
+    BOOST_TEST_CHECKPOINT("creating parser");
+    ndn::Block parser(m_buffer.buf(), m_buffer.size());
+    BOOST_TEST_CHECKPOINT("parsing aggregated response");
+    parser.parse();
+
+    BOOST_REQUIRE_EQUAL(parser.elements_size(), m_publisher.getLimit());
+
+    uint64_t expectedNo = m_publisher.getLimit() - 1;
+    for (Block::element_const_iterator i = parser.elements_begin();
+         i != parser.elements_end();
+         ++i)
+      {
+        uint64_t number = readNonNegativeInteger(*i);
+        BOOST_REQUIRE_EQUAL(number, expectedNo);
+        --expectedNo;
+      }
+  }
+
+protected:
+  shared_ptr<DummyFace> m_face;
+  TestSegmentPublisher<N> m_publisher;
+  ndn::EncodingBuffer m_buffer;
+  ndn::KeyChain m_keyChain;
+};
+
+using boost::mpl::int_;
+typedef boost::mpl::vector<int_<10000>, int_<100>, int_<10>, int_<0> > DatasetSizes;
+
+BOOST_AUTO_TEST_SUITE(SegmentPublisher)
+
+BOOST_FIXTURE_TEST_CASE_TEMPLATE(Generate, T, DatasetSizes, SegmentPublisherFixture<T::value>)
+{
+  this->m_publisher.publish();
+  this->m_face->processEvents();
+
+  size_t nSegments = this->m_publisher.getTotalPayloadLength() /
+                       this->m_publisher.getMaxSegmentSize();
+  if (this->m_publisher.getTotalPayloadLength() % this->m_publisher.getMaxSegmentSize() != 0 ||
+      nSegments == 0)
+    ++nSegments;
+
+  BOOST_CHECK_EQUAL(this->m_face->m_sentDatas.size(), nSegments);
+  BOOST_FOREACH(const Data& data, this->m_face->m_sentDatas) {
+    this->validate(data);
+  }
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/daemon/face/face-counters.cpp b/tests/daemon/face/face-counters.cpp
new file mode 100644
index 0000000..3be0d88
--- /dev/null
+++ b/tests/daemon/face/face-counters.cpp
@@ -0,0 +1,79 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+#include "face/face-counters.hpp"
+#include "dummy-face.hpp"
+
+#include "tests/test-common.hpp"
+
+namespace nfd {
+namespace tests {
+
+BOOST_FIXTURE_TEST_SUITE(FaceFaceCounters, BaseFixture)
+
+BOOST_AUTO_TEST_CASE(PacketCnt)
+{
+  PacketCounter counter;
+
+  uint64_t observation = counter;//implicit convertible
+  BOOST_CHECK_EQUAL(observation, 0);
+
+  ++counter;
+  BOOST_CHECK_EQUAL(static_cast<int>(counter), 1);
+  ++counter;
+  ++counter;
+  BOOST_CHECK_EQUAL(static_cast<int>(counter), 3);
+}
+
+BOOST_AUTO_TEST_CASE(ByteCnt)
+{
+  ByteCounter counter;
+
+  uint64_t observation = counter;//implicit convertible
+  BOOST_CHECK_EQUAL(observation, 0);
+
+  counter += 20;
+  BOOST_CHECK_EQUAL(static_cast<int>(counter), 20);
+  counter += 80;
+  counter += 90;
+  BOOST_CHECK_EQUAL(static_cast<int>(counter), 190);
+}
+
+BOOST_AUTO_TEST_CASE(Counters)
+{
+  DummyFace face;
+  const FaceCounters& counters = face.getCounters();
+  BOOST_CHECK_EQUAL(counters.getNInInterests() , 0);
+  BOOST_CHECK_EQUAL(counters.getNInDatas()     , 0);
+  BOOST_CHECK_EQUAL(counters.getNOutInterests(), 0);
+  BOOST_CHECK_EQUAL(counters.getNOutDatas()    , 0);
+  BOOST_CHECK_EQUAL(counters.getNInBytes()     , 0);
+  BOOST_CHECK_EQUAL(counters.getNOutBytes()    , 0);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/daemon/face/face.cpp b/tests/daemon/face/face.cpp
index b82e0fa..143dfe6 100644
--- a/tests/daemon/face/face.cpp
+++ b/tests/daemon/face/face.cpp
@@ -59,16 +59,6 @@
                          LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID), false);
 }
 
-BOOST_AUTO_TEST_CASE(Counters)
-{
-  DummyFace face;
-  const FaceCounters& counters = face.getCounters();
-  BOOST_CHECK_EQUAL(counters.getNInInterests() , 0);
-  BOOST_CHECK_EQUAL(counters.getNInDatas()     , 0);
-  BOOST_CHECK_EQUAL(counters.getNOutInterests(), 0);
-  BOOST_CHECK_EQUAL(counters.getNOutDatas()    , 0);
-}
-
 class FaceFailTestFace : public DummyFace
 {
 public:
diff --git a/tests/daemon/face/null.cpp b/tests/daemon/face/null.cpp
new file mode 100644
index 0000000..db90410
--- /dev/null
+++ b/tests/daemon/face/null.cpp
@@ -0,0 +1,51 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "face/null-face.hpp"
+
+#include "tests/test-common.hpp"
+
+namespace nfd {
+namespace tests {
+
+BOOST_FIXTURE_TEST_SUITE(FaceNull, BaseFixture)
+
+BOOST_AUTO_TEST_CASE(Send)
+{
+  shared_ptr<NullFace> face = make_shared<NullFace>();
+
+  shared_ptr<Interest> interest = makeInterest("/A");
+  BOOST_CHECK_NO_THROW(face->sendInterest(*interest));
+
+  shared_ptr<Data> data = makeData("/B");
+  BOOST_CHECK_NO_THROW(face->sendData(*data));
+
+  BOOST_CHECK_NO_THROW(face->close());
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/daemon/face/tcp.cpp b/tests/daemon/face/tcp.cpp
index 2861be3..fa527e9 100644
--- a/tests/daemon/face/tcp.cpp
+++ b/tests/daemon/face/tcp.cpp
@@ -261,6 +261,7 @@
   face1->sendInterest(*interest1);
   face1->sendInterest(*interest1);
   face1->sendData    (*data1    );
+  size_t nBytesSent1 = interest1->wireEncode().size() * 3 + data1->wireEncode().size();
   face2->sendInterest(*interest2);
   face2->sendData    (*data2    );
   face2->sendData    (*data2    );
@@ -269,7 +270,6 @@
   BOOST_CHECK_MESSAGE(limitedIo.run(8, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "TcpChannel error: cannot send or receive Interest/Data packets");
 
-
   BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
   BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 3);
   BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 3);
@@ -280,17 +280,22 @@
   BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1->getName());
   BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1->getName());
 
+  // needed to ensure NOutBytes counters are accurate
+  limitedIo.run(LimitedIo::UNLIMITED_OPS, time::seconds(1));
+
   const FaceCounters& counters1 = face1->getCounters();
   BOOST_CHECK_EQUAL(counters1.getNInInterests() , 1);
   BOOST_CHECK_EQUAL(counters1.getNInDatas()     , 3);
   BOOST_CHECK_EQUAL(counters1.getNOutInterests(), 3);
   BOOST_CHECK_EQUAL(counters1.getNOutDatas()    , 1);
+  BOOST_CHECK_EQUAL(counters1.getNOutBytes(), nBytesSent1);
 
   const FaceCounters& counters2 = face2->getCounters();
   BOOST_CHECK_EQUAL(counters2.getNInInterests() , 3);
   BOOST_CHECK_EQUAL(counters2.getNInDatas()     , 1);
   BOOST_CHECK_EQUAL(counters2.getNOutInterests(), 1);
   BOOST_CHECK_EQUAL(counters2.getNOutDatas()    , 3);
+  BOOST_CHECK_EQUAL(counters2.getNInBytes(), nBytesSent1);
 }
 
 BOOST_FIXTURE_TEST_CASE(EndToEnd6, EndToEndFixture)
diff --git a/tests/daemon/face/udp.cpp b/tests/daemon/face/udp.cpp
index f2d3417..40485ca 100644
--- a/tests/daemon/face/udp.cpp
+++ b/tests/daemon/face/udp.cpp
@@ -379,6 +379,8 @@
   BOOST_CHECK_EQUAL(face2->getRemoteUri().toString(), "udp4://127.0.0.1:20070");
   BOOST_CHECK_EQUAL(face2->getLocalUri().toString(), "udp4://127.0.0.1:20071");
   BOOST_CHECK_EQUAL(face2->isLocal(), false);
+  BOOST_CHECK_EQUAL(face2->getCounters().getNOutBytes(), 0);
+  BOOST_CHECK_EQUAL(face2->getCounters().getNInBytes(), 0);
   // face1 is not created yet
 
   shared_ptr<UdpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
@@ -410,6 +412,7 @@
   face2->sendData    (data2    );
   face2->sendData    (data2    );
   face2->sendData    (data2    );
+  size_t nBytesSent2 = interest2.wireEncode().size() + data2.wireEncode().size() * 3;
 
   BOOST_CHECK_MESSAGE(limitedIo.run(5,//4 send + 1 listen return
                       time::seconds(4)) == LimitedIo::EXCEED_OPS,
@@ -428,7 +431,6 @@
   BOOST_CHECK_MESSAGE(limitedIo.run(4, time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
-
   BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
   BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 3);
   BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 3);
@@ -445,6 +447,7 @@
 
   face2->sendData    (data3    );
   face2->sendInterest(interest3);
+  nBytesSent2 += data3.wireEncode().size() + interest3.wireEncode().size();
 
   BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
@@ -460,12 +463,14 @@
   BOOST_CHECK_EQUAL(counters1.getNInDatas()     , 4);
   BOOST_CHECK_EQUAL(counters1.getNOutInterests(), 3);
   BOOST_CHECK_EQUAL(counters1.getNOutDatas()    , 1);
+  BOOST_CHECK_EQUAL(counters1.getNInBytes(), nBytesSent2);
 
   const FaceCounters& counters2 = face2->getCounters();
   BOOST_CHECK_EQUAL(counters2.getNInInterests() , 3);
   BOOST_CHECK_EQUAL(counters2.getNInDatas()     , 1);
   BOOST_CHECK_EQUAL(counters2.getNOutInterests(), 2);
   BOOST_CHECK_EQUAL(counters2.getNOutDatas()    , 4);
+  BOOST_CHECK_EQUAL(counters2.getNOutBytes(), nBytesSent2);
 }
 
 BOOST_FIXTURE_TEST_CASE(EndToEnd6, EndToEndFixture)
diff --git a/tests/daemon/face/unix-stream.cpp b/tests/daemon/face/unix-stream.cpp
index cb48db4..24154ec 100644
--- a/tests/daemon/face/unix-stream.cpp
+++ b/tests/daemon/face/unix-stream.cpp
@@ -213,10 +213,12 @@
   face1->sendInterest(*interest1);
   face1->sendInterest(*interest1);
   face1->sendData    (*data1    );
+  size_t nBytesSent1 = interest1->wireEncode().size() * 3 + data1->wireEncode().size();
   face2->sendInterest(*interest2);
   face2->sendData    (*data2    );
   face2->sendData    (*data2    );
   face2->sendData    (*data2    );
+  size_t nBytesSent2 = interest2->wireEncode().size() + data2->wireEncode().size() * 3;
 
   BOOST_CHECK_MESSAGE(limitedIo.run(8, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot send or receive Interest/Data packets");
@@ -231,11 +233,16 @@
   BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1->getName());
   BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1->getName());
 
+  // needed to ensure NOutBytes counters are accurate
+  limitedIo.run(LimitedIo::UNLIMITED_OPS, time::seconds(1));
+
   const FaceCounters& counters1 = face1->getCounters();
   BOOST_CHECK_EQUAL(counters1.getNInInterests() , 1);
   BOOST_CHECK_EQUAL(counters1.getNInDatas()     , 3);
   BOOST_CHECK_EQUAL(counters1.getNOutInterests(), 3);
   BOOST_CHECK_EQUAL(counters1.getNOutDatas()    , 1);
+  BOOST_CHECK_EQUAL(counters1.getNInBytes(), nBytesSent2);
+  BOOST_CHECK_EQUAL(counters1.getNOutBytes(), nBytesSent1);
 
   const FaceCounters& counters2 = face2->getCounters();
   BOOST_CHECK_EQUAL(counters2.getNInInterests() , 3);
diff --git a/tests/daemon/fw/face-table.cpp b/tests/daemon/fw/face-table.cpp
index 3f49525..0dd8432 100644
--- a/tests/daemon/fw/face-table.cpp
+++ b/tests/daemon/fw/face-table.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "fw/face-table.hpp"
 #include "fw/forwarder.hpp"
@@ -61,6 +62,8 @@
   BOOST_CHECK_NE(face1->getId(), INVALID_FACEID);
   BOOST_CHECK_NE(face2->getId(), INVALID_FACEID);
   BOOST_CHECK_NE(face1->getId(), face2->getId());
+  BOOST_CHECK_GT(face1->getId(), FACEID_RESERVED_MAX);
+  BOOST_CHECK_GT(face2->getId(), FACEID_RESERVED_MAX);
 
   FaceId oldId1 = face1->getId();
   faceTable.add(face1);
@@ -79,6 +82,18 @@
   BOOST_CHECK_EQUAL(onRemoveHistory[0], onAddHistory[0]);
 }
 
+BOOST_AUTO_TEST_CASE(AddReserved)
+{
+  Forwarder forwarder;
+  FaceTable& faceTable = forwarder.getFaceTable();
+
+  shared_ptr<Face> face1 = make_shared<DummyFace>();
+  BOOST_CHECK_EQUAL(face1->getId(), INVALID_FACEID);
+
+  faceTable.addReserved(face1, 5);
+  BOOST_CHECK_EQUAL(face1->getId(), 5);
+}
+
 BOOST_AUTO_TEST_CASE(Enumerate)
 {
   Forwarder forwarder;
diff --git a/tests/daemon/mgmt/channel-status-publisher.cpp b/tests/daemon/mgmt/channel-status-publisher.cpp
index 04625af..6d33f4d 100644
--- a/tests/daemon/mgmt/channel-status-publisher.cpp
+++ b/tests/daemon/mgmt/channel-status-publisher.cpp
@@ -39,7 +39,7 @@
 public:
   ChannelStatusPublisherFixture()
     : m_face(make_shared<InternalFace>())
-    , m_publisher(m_factories, m_face, "/localhost/nfd/faces/channels")
+    , m_publisher(m_factories, *m_face, "/localhost/nfd/faces/channels", m_keyChain)
     , m_finished(false)
   {
   }
@@ -120,6 +120,8 @@
   std::set<std::string> m_matchedEntries;
 
   bool m_finished;
+
+  ndn::KeyChain m_keyChain;
 };
 
 BOOST_FIXTURE_TEST_SUITE(MgmtChannelStatusPublisher, ChannelStatusPublisherFixture)
diff --git a/tests/daemon/mgmt/face-manager.cpp b/tests/daemon/mgmt/face-manager.cpp
index 92ec987..601724a 100644
--- a/tests/daemon/mgmt/face-manager.cpp
+++ b/tests/daemon/mgmt/face-manager.cpp
@@ -257,13 +257,14 @@
 protected:
   shared_ptr<InternalFace> m_face;
   bool m_callbackFired;
+  ndn::KeyChain m_testKeyChain;
 };
 
 class FaceManagerFixture : public TestFaceTableFixture, public TestFaceManagerCommon
 {
 public:
   FaceManagerFixture()
-    : m_manager(m_faceTable, m_face)
+    : m_manager(m_faceTable, m_face, m_testKeyChain)
   {
     m_manager.setConfigFile(m_config);
   }
@@ -923,7 +924,7 @@
 public:
 
   ValidatedFaceRequestFixture()
-    : FaceManager(TestFaceTableFixture::m_faceTable, TestFaceManagerCommon::m_face),
+    : FaceManager(TestFaceTableFixture::m_faceTable, TestFaceManagerCommon::m_face, m_testKeyChain),
       m_createFaceFired(false),
       m_destroyFaceFired(false)
   {
@@ -1048,7 +1049,7 @@
 {
 public:
   LocalControlFixture()
-    : FaceManager(FaceTableFixture::m_faceTable, TestFaceManagerCommon::m_face)
+    : FaceManager(FaceTableFixture::m_faceTable, TestFaceManagerCommon::m_face, m_testKeyChain)
   {
   }
 };
@@ -1417,7 +1418,8 @@
 public:
   FaceFixture()
     : FaceManager(FaceTableFixture::m_faceTable,
-                  TestFaceManagerCommon::m_face)
+                  TestFaceManagerCommon::m_face,
+                  m_testKeyChain)
     , m_receivedNotification(false)
   {
 
@@ -1587,13 +1589,13 @@
 
   ControlParameters resultParameters;
   resultParameters.setUri("dummy://");
-  resultParameters.setFaceId(1);
+  resultParameters.setFaceId(FACEID_RESERVED_MAX + 1);
 
   shared_ptr<DummyFace> dummy(make_shared<DummyFace>());
 
   ndn::nfd::FaceEventNotification expectedFaceEvent;
   expectedFaceEvent.setKind(ndn::nfd::FACE_EVENT_CREATED)
-                   .setFaceId(1)
+                   .setFaceId(FACEID_RESERVED_MAX + 1)
                    .setRemoteUri(dummy->getRemoteUri().toString())
                    .setLocalUri(dummy->getLocalUri().toString())
                    .setFlags(0);
@@ -1674,7 +1676,7 @@
 {
 public:
   FaceListFixture()
-    : m_manager(m_table, m_face)
+    : m_manager(m_table, m_face, m_testKeyChain)
   {
 
   }
@@ -1687,6 +1689,7 @@
 
 protected:
   FaceManager m_manager;
+  ndn::KeyChain m_testKeyChain;
 };
 
 BOOST_FIXTURE_TEST_CASE(TestFaceList, FaceListFixture)
@@ -1694,26 +1697,14 @@
   Name commandName("/localhost/nfd/faces/list");
   shared_ptr<Interest> command(make_shared<Interest>(commandName));
 
-  // MAX_SEGMENT_SIZE == 4400, FaceStatus size with filler counters is 55
-  // 55 divides 4400 (== 80), so only use 79 FaceStatuses and then two smaller ones
-  // to force a FaceStatus to span Data packets
-  for (int i = 0; i < 79; i++)
+  // MAX_SEGMENT_SIZE == 4400, FaceStatus size with filler counters is 75
+  // use 59 FaceStatuses to force a FaceStatus to span Data packets
+  for (int i = 0; i < 59; i++)
     {
       shared_ptr<TestCountersFace> dummy(make_shared<TestCountersFace>());
 
       uint64_t filler = std::numeric_limits<uint64_t>::max() - 1;
-      dummy->setCounters(filler, filler, filler, filler);
-
-      m_referenceFaces.push_back(dummy);
-
-      add(dummy);
-    }
-
-  for (int i = 0; i < 2; i++)
-    {
-      shared_ptr<TestCountersFace> dummy(make_shared<TestCountersFace>());
-      uint64_t filler = std::numeric_limits<uint32_t>::max() - 1;
-      dummy->setCounters(filler, filler, filler, filler);
+      dummy->setCounters(filler, filler, filler, filler, filler, filler);
 
       m_referenceFaces.push_back(dummy);
 
diff --git a/tests/daemon/mgmt/face-status-publisher-common.hpp b/tests/daemon/mgmt/face-status-publisher-common.hpp
index 0cfe6a2..b2a485e 100644
--- a/tests/daemon/mgmt/face-status-publisher-common.hpp
+++ b/tests/daemon/mgmt/face-status-publisher-common.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_TESTS_NFD_MGMT_FACE_STATUS_PUBLISHER_COMMON_HPP
 #define NFD_TESTS_NFD_MGMT_FACE_STATUS_PUBLISHER_COMMON_HPP
@@ -53,16 +54,20 @@
   }
 
   void
-  setCounters(FaceCounter nInInterests,
-              FaceCounter nInDatas,
-              FaceCounter nOutInterests,
-              FaceCounter nOutDatas)
+  setCounters(PacketCounter::rep nInInterests,
+              PacketCounter::rep nInDatas,
+              PacketCounter::rep nOutInterests,
+              PacketCounter::rep nOutDatas,
+              ByteCounter::rep nInBytes,
+              ByteCounter::rep nOutBytes)
   {
     FaceCounters& counters = getMutableCounters();
-    counters.getNInInterests()  = nInInterests;
-    counters.getNInDatas()      = nInDatas;
-    counters.getNOutInterests() = nOutInterests;
-    counters.getNOutDatas()     = nOutDatas;
+    counters.getNInInterests().set(nInInterests);
+    counters.getNInDatas().set(nInDatas);
+    counters.getNOutInterests().set(nOutInterests);
+    counters.getNOutDatas().set(nOutDatas);
+    counters.getNInBytes().set(nInBytes);
+    counters.getNOutBytes().set(nOutBytes);
   }
 
 
@@ -102,7 +107,7 @@
   FaceStatusPublisherFixture()
     : m_table(m_forwarder)
     , m_face(make_shared<InternalFace>())
-    , m_publisher(m_table, m_face, "/localhost/nfd/FaceStatusPublisherFixture")
+    , m_publisher(m_table, *m_face, "/localhost/nfd/FaceStatusPublisherFixture", m_keyChain)
     , m_finished(false)
   {
 
@@ -135,6 +140,8 @@
     BOOST_CHECK_EQUAL(status.getNInDatas(), counters.getNInDatas());
     BOOST_CHECK_EQUAL(status.getNOutInterests(), counters.getNOutInterests());
     BOOST_CHECK_EQUAL(status.getNOutDatas(), counters.getNOutDatas());
+    BOOST_CHECK_EQUAL(status.getNInBytes(), counters.getNInBytes());
+    BOOST_CHECK_EQUAL(status.getNOutBytes(), counters.getNOutBytes());
   }
 
   void
@@ -181,6 +188,7 @@
   FaceStatusPublisher m_publisher;
   ndn::EncodingBuffer m_buffer;
   std::list<shared_ptr<Face> > m_referenceFaces;
+  ndn::KeyChain m_keyChain;
 
 protected:
   bool m_finished;
diff --git a/tests/daemon/mgmt/face-status-publisher.cpp b/tests/daemon/mgmt/face-status-publisher.cpp
index 836ea2d..145fe0e 100644
--- a/tests/daemon/mgmt/face-status-publisher.cpp
+++ b/tests/daemon/mgmt/face-status-publisher.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "face-status-publisher-common.hpp"
 
@@ -36,26 +37,14 @@
   Name commandName("/localhost/nfd/faces/list");
   shared_ptr<Interest> command(make_shared<Interest>(commandName));
 
-  // MAX_SEGMENT_SIZE == 4400, FaceStatus size with filler counters is 55
-  // 55 divides 4400 (== 80), so only use 79 FaceStatuses and then two smaller ones
-  // to force a FaceStatus to span Data packets
-  for (int i = 0; i < 79; i++)
+  // MAX_SEGMENT_SIZE == 4400, FaceStatus size with filler counters is 75
+  // use 59 FaceStatuses to force a FaceStatus to span Data packets
+  for (int i = 0; i < 59; i++)
     {
       shared_ptr<TestCountersFace> dummy(make_shared<TestCountersFace>());
 
       uint64_t filler = std::numeric_limits<uint64_t>::max() - 1;
-      dummy->setCounters(filler, filler, filler, filler);
-
-      m_referenceFaces.push_back(dummy);
-
-      add(dummy);
-    }
-
-  for (int i = 0; i < 2; i++)
-    {
-      shared_ptr<TestCountersFace> dummy(make_shared<TestCountersFace>());
-      uint64_t filler = std::numeric_limits<uint32_t>::max() - 1;
-      dummy->setCounters(filler, filler, filler, filler);
+      dummy->setCounters(filler, filler, filler, filler, filler, filler);
 
       m_referenceFaces.push_back(dummy);
 
diff --git a/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp b/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
index 301d396..bfb19d9 100644
--- a/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
+++ b/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_TESTS_NFD_MGMT_FIB_ENUMERATION_PUBLISHER_COMMON_HPP
 #define NFD_TESTS_NFD_MGMT_FIB_ENUMERATION_PUBLISHER_COMMON_HPP
@@ -77,7 +78,7 @@
   FibEnumerationPublisherFixture()
     : m_fib(m_nameTree)
     , m_face(make_shared<InternalFace>())
-    , m_publisher(m_fib, m_face, "/localhost/nfd/FibEnumerationPublisherFixture")
+    , m_publisher(m_fib, *m_face, "/localhost/nfd/FibEnumerationPublisherFixture", m_keyChain)
     , m_finished(false)
   {
   }
@@ -208,6 +209,7 @@
   FibEnumerationPublisher m_publisher;
   ndn::EncodingBuffer m_buffer;
   std::set<shared_ptr<fib::Entry> > m_referenceEntries;
+  ndn::KeyChain m_keyChain;
 
 protected:
   bool m_finished;
diff --git a/tests/daemon/mgmt/fib-enumeration-publisher.cpp b/tests/daemon/mgmt/fib-enumeration-publisher.cpp
index 3cb5849..ed330aa 100644
--- a/tests/daemon/mgmt/fib-enumeration-publisher.cpp
+++ b/tests/daemon/mgmt/fib-enumeration-publisher.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "mgmt/fib-enumeration-publisher.hpp"
 
diff --git a/tests/daemon/mgmt/fib-manager.cpp b/tests/daemon/mgmt/fib-manager.cpp
index 2305c2c..8101cd4 100644
--- a/tests/daemon/mgmt/fib-manager.cpp
+++ b/tests/daemon/mgmt/fib-manager.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "mgmt/fib-manager.hpp"
 #include "table/fib.hpp"
@@ -161,7 +162,7 @@
 
 protected:
   FibManagerFixture()
-    : m_manager(ref(m_fib), bind(&FibManagerFixture::getFace, this, _1), m_face)
+    : m_manager(ref(m_fib), bind(&FibManagerFixture::getFace, this, _1), m_face, m_keyChain)
     , m_callbackFired(false)
   {
   }
@@ -171,6 +172,7 @@
 
   std::vector<shared_ptr<Face> > m_faces;
   bool m_callbackFired;
+  ndn::KeyChain m_keyChain;
 };
 
 template <typename T> class AuthorizedCommandFixture:
diff --git a/tests/daemon/mgmt/internal-face.cpp b/tests/daemon/mgmt/internal-face.cpp
index e76d80f..2215c0e 100644
--- a/tests/daemon/mgmt/internal-face.cpp
+++ b/tests/daemon/mgmt/internal-face.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "mgmt/internal-face.hpp"
 #include "tests/daemon/face/dummy-face.hpp"
@@ -85,6 +86,9 @@
     m_noOnInterestFired = false;
   }
 
+protected:
+  ndn::KeyChain m_keyChain;
+
 private:
   std::vector<shared_ptr<Face> > m_faces;
   bool m_onInterestFired;
@@ -111,7 +115,7 @@
   face->onReceiveData += bind(&validatePutData, ref(didPutData), dataName, _1);
 
   Data testData(dataName);
-  face->sign(testData);
+  m_keyChain.sign(testData);
   face->put(testData);
 
   BOOST_REQUIRE(didPutData);
diff --git a/tests/daemon/mgmt/manager-base.cpp b/tests/daemon/mgmt/manager-base.cpp
index 74fcb6e..58a6fd4 100644
--- a/tests/daemon/mgmt/manager-base.cpp
+++ b/tests/daemon/mgmt/manager-base.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "mgmt/manager-base.hpp"
 #include "mgmt/internal-face.hpp"
@@ -38,7 +39,7 @@
 public:
 
   ManagerBaseTest()
-    : ManagerBase(make_shared<InternalFace>(), "TEST-PRIVILEGE"),
+    : ManagerBase(make_shared<InternalFace>(), "TEST-PRIVILEGE", m_keyChain),
       m_callbackFired(false)
   {
 
@@ -141,6 +142,7 @@
 private:
 
   bool m_callbackFired;
+  ndn::KeyChain m_keyChain;
 
 };
 
diff --git a/tests/daemon/mgmt/notification-stream.cpp b/tests/daemon/mgmt/notification-stream.cpp
index 32f5a20..f64e50b 100644
--- a/tests/daemon/mgmt/notification-stream.cpp
+++ b/tests/daemon/mgmt/notification-stream.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "mgmt/notification-stream.hpp"
 #include "mgmt/internal-face.hpp"
@@ -80,6 +81,7 @@
   const std::string m_prefix;
   const std::string m_message;
   uint64_t m_sequenceNo;
+  ndn::KeyChain m_keyChain;
 };
 
 BOOST_FIXTURE_TEST_SUITE(MgmtNotificationStream, NotificationStreamFixture)
@@ -115,7 +117,7 @@
 BOOST_AUTO_TEST_CASE(TestPostEvent)
 {
   shared_ptr<InternalFace> face(make_shared<InternalFace>());
-  NotificationStream notificationStream(face, "/localhost/nfd/NotificationStreamTest");
+  NotificationStream notificationStream(face, "/localhost/nfd/NotificationStreamTest", m_keyChain);
 
   face->onReceiveData += bind(&NotificationStreamFixture::validateCallback, this, _1);
 
diff --git a/tests/daemon/mgmt/segment-publisher.cpp b/tests/daemon/mgmt/segment-publisher.cpp
deleted file mode 100644
index 43e4523..0000000
--- a/tests/daemon/mgmt/segment-publisher.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- 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
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-#include "mgmt/segment-publisher.hpp"
-#include "mgmt/internal-face.hpp"
-#include "mgmt/app-face.hpp"
-
-#include "tests/test-common.hpp"
-#include <ndn-cxx/encoding/tlv.hpp>
-
-namespace nfd {
-namespace tests {
-
-NFD_LOG_INIT("SegmentPublisherTest");
-
-class TestSegmentPublisher : public SegmentPublisher
-{
-public:
-  TestSegmentPublisher(shared_ptr<AppFace> face,
-                       const Name& prefix,
-                       const uint64_t limit=10000)
-    : SegmentPublisher(face, prefix)
-    , m_limit((limit == 0)?(1):(limit))
-  {
-
-  }
-
-  virtual
-  ~TestSegmentPublisher()
-  {
-
-  }
-
-  uint16_t
-  getLimit() const
-  {
-    return m_limit;
-  }
-
-protected:
-
-  virtual size_t
-  generate(ndn::EncodingBuffer& outBuffer)
-  {
-    size_t totalLength = 0;
-    for (uint64_t i = 0; i < m_limit; i++)
-      {
-        totalLength += prependNonNegativeIntegerBlock(outBuffer, ndn::Tlv::Content, i);
-      }
-    return totalLength;
-  }
-
-protected:
-  const uint64_t m_limit;
-};
-
-class SegmentPublisherFixture : public BaseFixture
-{
-public:
-  SegmentPublisherFixture()
-    : m_face(make_shared<InternalFace>())
-    , m_publisher(m_face, "/localhost/nfd/SegmentPublisherFixture")
-    , m_finished(false)
-  {
-
-  }
-
-  void
-  validate(const Data& data)
-  {
-    Block payload = data.getContent();
-    NFD_LOG_DEBUG("payload size (w/o Content TLV): " << payload.value_size());
-
-    m_buffer.appendByteArray(payload.value(), payload.value_size());
-
-    uint64_t segmentNo = data.getName()[-1].toSegment();
-    if (data.getFinalBlockId() != data.getName()[-1])
-      {
-        return;
-      }
-
-    NFD_LOG_DEBUG("got final block: #" << segmentNo);
-
-    // wrap data in a single Content TLV for easy parsing
-    m_buffer.prependVarNumber(m_buffer.size());
-    m_buffer.prependVarNumber(ndn::Tlv::Content);
-
-    BOOST_TEST_CHECKPOINT("creating parser");
-    ndn::Block parser(m_buffer.buf(), m_buffer.size());
-    BOOST_TEST_CHECKPOINT("parsing aggregated response");
-    parser.parse();
-
-    BOOST_REQUIRE_EQUAL(parser.elements_size(), m_publisher.getLimit());
-
-    uint64_t expectedNo = m_publisher.getLimit() - 1;
-    for (Block::element_const_iterator i = parser.elements_begin();
-         i != parser.elements_end();
-         ++i)
-      {
-        uint64_t number = readNonNegativeInteger(*i);
-        BOOST_REQUIRE_EQUAL(number, expectedNo);
-        --expectedNo;
-      }
-    m_finished = true;
-  }
-
-protected:
-  shared_ptr<InternalFace> m_face;
-  TestSegmentPublisher m_publisher;
-  ndn::EncodingBuffer m_buffer;
-
-protected:
-  bool m_finished;
-};
-
-BOOST_FIXTURE_TEST_SUITE(MgmtSegmentPublisher, SegmentPublisherFixture)
-
-BOOST_AUTO_TEST_CASE(Generate)
-{
-  m_face->onReceiveData +=
-    bind(&SegmentPublisherFixture::validate, this, _1);
-
-  m_publisher.publish();
-  BOOST_REQUIRE(m_finished);
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace tests
-} // namespace nfd
diff --git a/tests/daemon/mgmt/status-server.cpp b/tests/daemon/mgmt/status-server.cpp
index d9f3129..5757f46 100644
--- a/tests/daemon/mgmt/status-server.cpp
+++ b/tests/daemon/mgmt/status-server.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "mgmt/status-server.hpp"
 #include "fw/forwarder.hpp"
@@ -50,7 +51,8 @@
   Forwarder forwarder;
   shared_ptr<InternalFace> internalFace = make_shared<InternalFace>();
   internalFace->onReceiveData += &interceptResponse;
-  StatusServer statusServer(internalFace, ref(forwarder));
+  ndn::KeyChain keyChain;
+  StatusServer statusServer(internalFace, ref(forwarder), keyChain);
   time::system_clock::TimePoint t2 = time::system_clock::now();
 
   // populate tables
diff --git a/tests/daemon/mgmt/strategy-choice-manager.cpp b/tests/daemon/mgmt/strategy-choice-manager.cpp
index 9f6818e..587c576 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "mgmt/strategy-choice-manager.hpp"
 #include "face/face.hpp"
@@ -49,7 +50,7 @@
   StrategyChoiceManagerFixture()
     : m_strategyChoice(m_forwarder.getStrategyChoice())
     , m_face(make_shared<InternalFace>())
-    , m_manager(m_strategyChoice, m_face)
+    , m_manager(m_strategyChoice, m_face, m_keyChain)
     , m_callbackFired(false)
   {
     m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder),
@@ -171,6 +172,7 @@
   StrategyChoice& m_strategyChoice;
   shared_ptr<InternalFace> m_face;
   StrategyChoiceManager m_manager;
+  ndn::KeyChain m_keyChain;
 
 private:
   bool m_callbackFired;
diff --git a/tests/daemon/mgmt/strategy-choice-publisher.cpp b/tests/daemon/mgmt/strategy-choice-publisher.cpp
index b3190d4..fda3e1e 100644
--- a/tests/daemon/mgmt/strategy-choice-publisher.cpp
+++ b/tests/daemon/mgmt/strategy-choice-publisher.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,  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.
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_TESTS_NFD_MGMT_STRATEGY_CHOICE_PUBLISHER_HPP
 #define NFD_TESTS_NFD_MGMT_STRATEGY_CHOICE_PUBLISHER_HPP
@@ -46,7 +46,7 @@
   StrategyChoicePublisherFixture()
     : m_strategyChoice(m_forwarder.getStrategyChoice())
     , m_face(make_shared<InternalFace>())
-    , m_publisher(m_strategyChoice, m_face, "/localhost/nfd/strategy-choice/list")
+    , m_publisher(m_strategyChoice, *m_face, "/localhost/nfd/strategy-choice/list", m_keyChain)
     , STRATEGY_A(make_shared<DummyStrategy>(boost::ref(m_forwarder),
                                             "/localhost/nfd/strategy/dummy-strategy-a"))
     , STRATEGY_B(make_shared<DummyStrategy>(boost::ref(m_forwarder),
@@ -129,6 +129,8 @@
   std::set<std::string> m_matchedEntries;
 
   bool m_finished;
+
+  ndn::KeyChain m_keyChain;
 };
 
 
diff --git a/tests/daemon/table/fib.cpp b/tests/daemon/table/fib.cpp
index bdf2fca..d40f15d 100644
--- a/tests/daemon/table/fib.cpp
+++ b/tests/daemon/table/fib.cpp
@@ -1,11 +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
+ * 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
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "table/fib.hpp"
 #include "tests/daemon/face/dummy-face.hpp"
@@ -288,7 +289,7 @@
 }
 
 void
-validateRemove(Fib& fib, const Name& target)
+validateErase(Fib& fib, const Name& target)
 {
   fib.erase(target);
 
@@ -299,14 +300,14 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(Remove)
+BOOST_AUTO_TEST_CASE(Erase)
 {
   NameTree emptyNameTree;
   Fib emptyFib(emptyNameTree);
 
   emptyFib.erase("/does/not/exist"); // crash test
 
-  validateRemove(emptyFib, "/");
+  validateErase(emptyFib, "/");
 
   emptyFib.erase("/still/does/not/exist"); // crash test
 
@@ -320,19 +321,19 @@
   // check if we remove the right thing and leave
   // everything else alone
 
-  validateRemove(fib, "/A/B");
+  validateErase(fib, "/A/B");
   validateFindExactMatch(fib, "/A");
   validateFindExactMatch(fib, "/A/B/C");
   validateFindExactMatch(fib, "/");
 
-  validateRemove(fib, "/A/B/C");
+  validateErase(fib, "/A/B/C");
   validateFindExactMatch(fib, "/A");
   validateFindExactMatch(fib, "/");
 
-  validateRemove(fib, "/A");
+  validateErase(fib, "/A");
   validateFindExactMatch(fib, "/");
 
-  validateRemove(fib, "/");
+  validateErase(fib, "/");
   validateNoExactMatch(fib, "/");
 
   NameTree gapNameTree;
@@ -345,6 +346,17 @@
   validateFindExactMatch(gapFib, "/X/Y/Z");
 }
 
+BOOST_AUTO_TEST_CASE(EraseNameTreeEntry)
+{
+  NameTree nameTree;
+  Fib fib(nameTree);
+  size_t nNameTreeEntriesBefore = nameTree.size();
+
+  fib.insert("ndn:/A/B/C");
+  fib.erase("ndn:/A/B/C");
+  BOOST_CHECK_EQUAL(nameTree.size(), nNameTreeEntriesBefore);
+}
+
 BOOST_AUTO_TEST_CASE(Iterator)
 {
   NameTree nameTree;
diff --git a/tests/daemon/table/measurements.cpp b/tests/daemon/table/measurements.cpp
index c2afb96..30b71c4 100644
--- a/tests/daemon/table/measurements.cpp
+++ b/tests/daemon/table/measurements.cpp
@@ -84,8 +84,8 @@
                CHECK2 < EXTEND_C &&
                EXTEND_C < CHECK3);
 
-  measurements.extendLifetime(*entryA, EXTEND_A);
-  measurements.extendLifetime(*entryC, EXTEND_C);
+  measurements.extendLifetime(entryA, EXTEND_A);
+  measurements.extendLifetime(entryC, EXTEND_C);
   // remaining lifetime:
   //   A = initial lifetime, because it's extended by less duration
   //   B = initial lifetime
@@ -115,6 +115,22 @@
   BOOST_CHECK_EQUAL(measurements.size(), 0);
 }
 
+BOOST_AUTO_TEST_CASE(EraseNameTreeEntry)
+{
+  LimitedIo limitedIo;
+  NameTree nameTree;
+  Measurements measurements(nameTree);
+  size_t nNameTreeEntriesBefore = nameTree.size();
+
+  shared_ptr<measurements::Entry> entry = measurements.get("/A");
+  BOOST_CHECK_EQUAL(
+    limitedIo.run(LimitedIo::UNLIMITED_OPS,
+                  Measurements::getInitialLifetime() + time::milliseconds(10)),
+    LimitedIo::EXCEED_TIME);
+  BOOST_CHECK_EQUAL(measurements.size(), 0);
+  BOOST_CHECK_EQUAL(nameTree.size(), nNameTreeEntriesBefore);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace tests
diff --git a/tests/daemon/table/pit.cpp b/tests/daemon/table/pit.cpp
index 9e623c1..566421f 100644
--- a/tests/daemon/table/pit.cpp
+++ b/tests/daemon/table/pit.cpp
@@ -33,6 +33,27 @@
 
 BOOST_FIXTURE_TEST_SUITE(TablePit, BaseFixture)
 
+BOOST_AUTO_TEST_CASE(NonceList)
+{
+  BOOST_REQUIRE_GE(pit::NonceList::CAPACITY, 32);
+  BOOST_REQUIRE_LE(pit::NonceList::CAPACITY, 4096);
+
+  pit::NonceList nl;
+  for (uint32_t nonce = 0; nonce < static_cast<uint32_t>(pit::NonceList::CAPACITY); ++nonce) {
+    BOOST_CHECK_EQUAL(nl.add(nonce), true);
+  }
+  BOOST_CHECK_EQUAL(nl.size(), pit::NonceList::CAPACITY);
+
+  BOOST_CHECK_EQUAL(nl.add(32), false);
+  BOOST_CHECK_EQUAL(nl.size(), pit::NonceList::CAPACITY);
+
+  BOOST_CHECK_EQUAL(nl.add(4096), true);
+  BOOST_CHECK_EQUAL(nl.size(), pit::NonceList::CAPACITY);
+
+  BOOST_CHECK_EQUAL(nl.add(0), true);// 0 is evicted
+  BOOST_CHECK_EQUAL(nl.size(), pit::NonceList::CAPACITY);
+}
+
 BOOST_AUTO_TEST_CASE(EntryInOutRecords)
 {
   shared_ptr<Face> face1 = make_shared<DummyFace>();
@@ -331,6 +352,18 @@
 
 }
 
+BOOST_AUTO_TEST_CASE(EraseNameTreeEntry)
+{
+  NameTree nameTree;
+  Pit pit(nameTree);
+  size_t nNameTreeEntriesBefore = nameTree.size();
+
+  shared_ptr<Interest> interest = makeInterest("/37xWVvQ2K");
+  shared_ptr<pit::Entry> entry = pit.insert(*interest).first;
+  pit.erase(entry);
+  BOOST_CHECK_EQUAL(nameTree.size(), nNameTreeEntriesBefore);
+}
+
 BOOST_AUTO_TEST_CASE(FindAllDataMatches)
 {
   Name nameA   ("ndn:/A");
diff --git a/tests/daemon/table/strategy-choice.cpp b/tests/daemon/table/strategy-choice.cpp
index e8f4ca3..0f48538 100644
--- a/tests/daemon/table/strategy-choice.cpp
+++ b/tests/daemon/table/strategy-choice.cpp
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "table/strategy-choice.hpp"
 #include "tests/daemon/fw/dummy-strategy.hpp"
@@ -188,6 +188,28 @@
   BOOST_CHECK(!static_cast<bool>(measurements.get("ndn:/A/C")->getStrategyInfo<PStrategyInfo>()));
 }
 
+BOOST_AUTO_TEST_CASE(EraseNameTreeEntry)
+{
+  Forwarder forwarder;
+  NameTree& nameTree = forwarder.getNameTree();
+  StrategyChoice& table = forwarder.getStrategyChoice();
+
+  Name nameP("ndn:/strategy/P");
+  Name nameQ("ndn:/strategy/Q");
+  shared_ptr<Strategy> strategyP = make_shared<DummyStrategy>(ref(forwarder), nameP);
+  shared_ptr<Strategy> strategyQ = make_shared<DummyStrategy>(ref(forwarder), nameQ);
+  table.install(strategyP);
+  table.install(strategyQ);
+
+  table.insert("ndn:/", nameP);
+
+  size_t nNameTreeEntriesBefore = nameTree.size();
+
+  table.insert("ndn:/A/B", nameQ);
+  table.erase("ndn:/A/B");
+  BOOST_CHECK_EQUAL(nameTree.size(), nNameTreeEntriesBefore);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace tests
diff --git a/tests/rib/dummy-face.hpp b/tests/dummy-face.hpp
similarity index 87%
rename from tests/rib/dummy-face.hpp
rename to tests/dummy-face.hpp
index 4fde76f..84da29f 100644
--- a/tests/rib/dummy-face.hpp
+++ b/tests/dummy-face.hpp
@@ -23,15 +23,16 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef RIB_TESTS_UNIT_TESTS_TRANSPORT_DUMMY_FACE_HPP
-#define RIB_TESTS_UNIT_TESTS_TRANSPORT_DUMMY_FACE_HPP
+#ifndef NFD_TESTS_DUMMY_FACE_HPP
+#define NFD_TESTS_DUMMY_FACE_HPP
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/transport/transport.hpp>
 
-namespace ndn {
+namespace nfd {
+namespace tests {
 
-class DummyTransport : public Transport
+class DummyTransport : public ndn::Transport
 {
 public:
   void
@@ -58,10 +59,10 @@
   virtual void
   send(const Block& wire)
   {
-    if (wire.type() == Tlv::Interest) {
+    if (wire.type() == tlv::Interest) {
       m_sentInterests->push_back(Interest(wire));
     }
-    else if (wire.type() == Tlv::Data) {
+    else if (wire.type() == tlv::Data) {
       m_sentDatas->push_back(Data(wire));
     }
   }
@@ -80,7 +81,7 @@
 
 /** \brief a Face for unit testing
  */
-class DummyFace : public Face
+class DummyFace : public ndn::Face
 {
 public:
   explicit
@@ -115,6 +116,7 @@
   return make_shared<DummyFace>(make_shared<DummyTransport>());
 }
 
-} // namespace ndn
+} // namespace tests
+} // namespace nfd
 
-#endif // RIB_TESTS_UNIT_TESTS_TRANSPORT_DUMMY_FACE_HPP
+#endif // NFD_TESTS_DUMMY_FACE_HPP
diff --git a/tests/rib/rib-manager.cpp b/tests/rib/rib-manager.cpp
index b878e30..797f01e 100644
--- a/tests/rib/rib-manager.cpp
+++ b/tests/rib/rib-manager.cpp
@@ -26,7 +26,8 @@
 #include "rib/rib-manager.hpp"
 
 #include "tests/test-common.hpp"
-#include "rib/dummy-face.hpp"
+#include "tests/dummy-face.hpp"
+#include "rib/rib-status-publisher-common.hpp"
 
 namespace nfd {
 namespace rib {
@@ -40,7 +41,7 @@
     , ADD_NEXTHOP_VERB("add-nexthop")
     , REMOVE_NEXTHOP_VERB("remove-nexthop")
   {
-    face = ndn::makeDummyFace();
+    face = nfd::tests::makeDummyFace();
 
     manager = make_shared<RibManager>(ndn::ref(*face));
     manager->registerWithNfd();
@@ -78,7 +79,7 @@
 
 public:
   shared_ptr<RibManager> manager;
-  shared_ptr<ndn::DummyFace> face;
+  shared_ptr<nfd::tests::DummyFace> face;
 
   const Name COMMAND_PREFIX;
   const Name::Component ADD_NEXTHOP_VERB;
@@ -111,7 +112,7 @@
 
 typedef RibManagerFixture UnauthorizedRibManager;
 
-BOOST_FIXTURE_TEST_SUITE(RibRibManager, RibManagerFixture)
+BOOST_FIXTURE_TEST_SUITE(RibManager, RibManagerFixture)
 
 BOOST_FIXTURE_TEST_CASE(Basic, AuthorizedRibManager)
 {
@@ -219,6 +220,39 @@
   BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 0);
 }
 
+BOOST_FIXTURE_TEST_CASE(RibStatusRequest, AuthorizedRibManager)
+{
+  FaceEntry entry;
+  Name name("/");
+  entry.faceId = 1;
+  entry.origin = 128;
+  entry.cost = 32;
+  entry.flags = ndn::nfd::ROUTE_FLAG_CAPTURE;
+
+  ControlParameters parameters;
+  parameters
+    .setName(name)
+    .setFaceId(entry.faceId)
+    .setOrigin(entry.origin)
+    .setCost(entry.cost)
+    .setFlags(entry.flags)
+    .setExpirationPeriod(ndn::time::milliseconds::max());
+
+  Name commandName("/localhost/nfd/rib/register");
+
+  BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 0);
+
+  receiveCommandInterest(commandName, parameters);
+  face->m_sentInterests.clear();
+  face->m_sentDatas.clear();
+
+  face->receive(Interest("/localhost/nfd/rib/list"));
+  face->processEvents(time::milliseconds(1));
+
+  BOOST_REQUIRE_EQUAL(face->m_sentDatas.size(), 1);
+  RibStatusPublisherFixture::decodeRibEntryBlock(face->m_sentDatas[0], name, entry);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace tests
diff --git a/tests/rib/rib-status-publisher-common.hpp b/tests/rib/rib-status-publisher-common.hpp
new file mode 100644
index 0000000..11728a0
--- /dev/null
+++ b/tests/rib/rib-status-publisher-common.hpp
@@ -0,0 +1,93 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef RIB_TESTS_UNIT_TESTS_RIB_STATUS_PUBLISHER_COMMON_HPP
+#define RIB_TESTS_UNIT_TESTS_RIB_STATUS_PUBLISHER_COMMON_HPP
+
+#include "rib/rib-status-publisher.hpp"
+
+#include "tests/test-common.hpp"
+#include "rib/rib.hpp"
+
+#include <ndn-cxx/management/nfd-control-parameters.hpp>
+#include <ndn-cxx/management/nfd-rib-entry.hpp>
+#include <ndn-cxx/encoding/tlv.hpp>
+
+namespace nfd {
+namespace rib {
+namespace tests {
+
+using ndn::nfd::ControlParameters;
+
+class RibStatusPublisherFixture : public nfd::tests::BaseFixture
+{
+public:
+  static void
+  validateRibEntry(const Block& block, const Name& referenceName, const FaceEntry& referenceFace)
+  {
+    ndn::nfd::RibEntry entry;
+    BOOST_REQUIRE_NO_THROW(entry.wireDecode(block));
+
+    BOOST_CHECK_EQUAL(entry.getName(), referenceName);
+
+    std::list<ndn::nfd::Route> routes = entry.getRoutes();
+
+    std::list<ndn::nfd::Route>::iterator it = routes.begin();
+    BOOST_CHECK_EQUAL(it->getFaceId(), referenceFace.faceId);
+    BOOST_CHECK_EQUAL(it->getOrigin(), referenceFace.origin);
+    BOOST_CHECK_EQUAL(it->getCost(), referenceFace.cost);
+    BOOST_CHECK_EQUAL(it->getFlags(), referenceFace.flags);
+  }
+
+  static void
+  decodeRibEntryBlock(const Data& data, const Name& referenceName, const FaceEntry& referenceFace)
+  {
+    ndn::EncodingBuffer buffer;
+
+    Block payload = data.getContent();
+
+    buffer.appendByteArray(payload.value(), payload.value_size());
+    buffer.prependVarNumber(buffer.size());
+    buffer.prependVarNumber(ndn::Tlv::Content);
+
+    ndn::Block parser(buffer.buf(), buffer.size());
+    parser.parse();
+
+    Block::element_const_iterator i = parser.elements_begin();
+
+    if (i->type() != ndn::tlv::nfd::RibEntry) {
+      BOOST_FAIL("expected RibEntry, got type #" << i->type());
+    }
+    else {
+      validateRibEntry(*i, referenceName, referenceFace);
+    }
+  }
+};
+
+#endif // RIB_TESTS_UNIT_TESTS_RIB_STATUS_PUBLISHER_COMMON_HPP
+
+} // namespace tests
+} // namespace rib
+} // namespace nfd
diff --git a/tests/rib/rib-status-publisher.cpp b/tests/rib/rib-status-publisher.cpp
new file mode 100644
index 0000000..ac68c63
--- /dev/null
+++ b/tests/rib/rib-status-publisher.cpp
@@ -0,0 +1,65 @@
+/* -*- 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
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "rib/rib-status-publisher.hpp"
+
+#include "rib-status-publisher-common.hpp"
+#include "tests/dummy-face.hpp"
+
+namespace nfd {
+namespace rib {
+namespace tests {
+
+BOOST_FIXTURE_TEST_SUITE(RibStatusPublisherSuite, RibStatusPublisherFixture)
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  Rib rib;
+
+  FaceEntry entry;
+  Name name("/");
+  entry.faceId = 1;
+  entry.origin = 128;
+  entry.cost = 32;
+  entry.flags = ndn::nfd::ROUTE_FLAG_CAPTURE;
+  rib.insert(name, entry);
+
+  ndn::KeyChain keyChain;
+  shared_ptr<nfd::tests::DummyFace> face = nfd::tests::makeDummyFace();
+  RibStatusPublisher publisher(rib, *face, "/localhost/nfd/rib/list", keyChain);
+
+  publisher.publish();
+  face->processEvents(time::milliseconds(1));
+
+  BOOST_REQUIRE_EQUAL(face->m_sentDatas.size(), 1);
+  decodeRibEntryBlock(face->m_sentDatas[0], name, entry);
+}
+
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace rib
+} // namespace nfd
diff --git a/tools/nfd-status-http-server-files/nfd-status.xsl b/tools/nfd-status-http-server-files/nfd-status.xsl
new file mode 100644
index 0000000..e7cc55a
--- /dev/null
+++ b/tools/nfd-status-http-server-files/nfd-status.xsl
@@ -0,0 +1,311 @@
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:nfd="ndn:/localhost/nfd/status/1">
+<xsl:output method="html" encoding="utf-8" indent="yes" />
+
+<xsl:template match="/">
+  <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text>
+  <html>
+  <head>
+  <title>NFD Status</title>
+  <link rel="stylesheet" type="text/css" href="style.css" />
+  </head>
+  <body>
+  <header>
+    <h1>NFD Status</h1>
+  </header>
+  <article>
+    <div id="content">
+      <xsl:apply-templates/>
+    </div>
+  </article>
+  <footer>
+    <xsl:variable name="version">
+      <xsl:apply-templates select="nfd:nfdStatus/nfd:generalStatus/nfd:version"/>
+    </xsl:variable>
+    <span class="grey">Powered by </span><a target="_blank" href="http://named-data.net/doc/NFD/{$version}/"><span class="green">NFD version <xsl:value-of select="$version"/></span></a><span class="grey">.</span>
+  </footer>
+  </body>
+  </html>
+</xsl:template>
+
+<xsl:template match="nfd:version">
+  <xsl:variable name="major"><xsl:value-of select="floor(. div 1000000) mod 1000"/></xsl:variable>
+  <xsl:variable name="minor"><xsl:value-of select="floor(. div 1000) mod 1000"/></xsl:variable>
+  <xsl:variable name="patch"><xsl:value-of select=". mod 1000"/></xsl:variable>
+
+  <xsl:value-of select="$major"/>.<xsl:value-of select="$minor"/>.<xsl:value-of select="$patch"/>
+</xsl:template>
+
+<xsl:template name="formatDate">
+  <xsl:param name="date" />
+  <xsl:value-of select="substring($date, 0, 11)"/>&#160;<xsl:value-of select="substring($date, 12, 8)"/>
+</xsl:template>
+
+<xsl:template name="formatDuration">
+  <xsl:param name="duration" />
+  <xsl:variable name="seconds"><xsl:value-of select="substring($duration, 3, string-length($duration)-3)" /></xsl:variable>
+  <xsl:variable name="days"><xsl:value-of select="round($seconds div 86400)" /></xsl:variable>
+  <xsl:variable name="hours"><xsl:value-of select="round($seconds div 3600)" /></xsl:variable>
+  <xsl:variable name="minutes"><xsl:value-of select="round($seconds div 60)" /></xsl:variable>
+  <xsl:variable name="uptime">
+  <xsl:choose>
+    <xsl:when test="$days > 0">
+      <xsl:value-of select="$days"/> days
+    </xsl:when>
+    <xsl:when test="$hours > 0">
+      <xsl:value-of select="$hours"/> hours
+    </xsl:when>
+    <xsl:when test="$minutes > 0">
+      <xsl:value-of select="$minutes"/> minutes
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$seconds"/> seconds
+    </xsl:otherwise>
+  </xsl:choose>
+  </xsl:variable>
+  <xsl:value-of select="$uptime"/>
+</xsl:template>
+
+<xsl:template match="nfd:generalStatus">
+  <h2>General NFD status</h2>
+  <table class="item-list">
+    <thead>
+      <tr>
+        <th>Version</th>
+        <th>Start time</th>
+        <th>Current time</th>
+        <th>Uptime</th>
+        <th>NameTree Entries</th>
+        <th>FIB entries</th>
+        <th>PIT entries</th>
+        <th>Measurements entries</th>
+        <th>CS entries</th>
+        <th>In Interests</th>
+        <th>Out Interests</th>
+        <th>In Data</th>
+        <th>Out Data</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr class="center">
+        <td><xsl:apply-templates select="nfd:version"/></td>
+        <td><xsl:call-template name="formatDate"><xsl:with-param name="date" select="nfd:startTime" /></xsl:call-template></td>
+        <td><xsl:call-template name="formatDate"><xsl:with-param name="date" select="nfd:currentTime" /></xsl:call-template></td>
+        <td><xsl:call-template name="formatDuration"><xsl:with-param name="duration" select="nfd:uptime" /></xsl:call-template></td>
+        <td><xsl:value-of select="nfd:nNameTreeEntries"/></td>
+        <td><xsl:value-of select="nfd:nFibEntries"/></td>
+        <td><xsl:value-of select="nfd:nPitEntries"/></td>
+        <td><xsl:value-of select="nfd:nMeasurementsEntries"/></td>
+        <td><xsl:value-of select="nfd:nCsEntries"/></td>
+        <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nInterests"/></td>
+        <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nInterests"/></td>
+        <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nDatas"/></td>
+        <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nDatas"/></td>
+      </tr>
+    </tbody>
+  </table>
+</xsl:template>
+
+<xsl:template match="nfd:channels">
+  <h2>Channels</h2>
+  <table class="item-list">
+    <thead>
+      <tr>
+        <th>Channel URI</th>
+      </tr>
+    </thead>
+    <tbody>
+      <xsl:for-each select="nfd:channel">
+        <xsl:variable name="style">
+          <xsl:choose>
+            <xsl:when test="position() mod 2 = 1">
+              <xsl:text>odd</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>even</xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+        <tr class="{$style}">
+          <td><xsl:value-of select="nfd:localUri"/></td>
+        </tr>
+      </xsl:for-each>
+    </tbody>
+  </table>
+</xsl:template>
+
+<xsl:template match="nfd:faces">
+  <h2>Faces</h2>
+  <table class="item-list">
+    <thead>
+      <tr>
+        <th>Face ID</th>
+        <th>Remote URI</th>
+        <th>Local URI</th>
+        <th>In Interests</th>
+        <th>In Data</th>
+        <th>In Bytes</th>
+        <th>Out Interests</th>
+        <th>Out Data</th>
+        <th>Out Bytes</th>
+      </tr>
+    </thead>
+    <tbody>
+      <xsl:for-each select="nfd:face">
+      <xsl:variable name="style">
+        <xsl:choose>
+          <xsl:when test="position() mod 2 = 1">
+            <xsl:text>odd</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>even</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <tr class="{$style}">
+        <td><xsl:value-of select="nfd:faceId"/></td>
+        <td><xsl:value-of select="nfd:remoteUri"/></td>
+        <td><xsl:value-of select="nfd:localUri"/></td>
+        <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nInterests"/></td>
+        <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nDatas"/></td>
+        <td><xsl:value-of select="nfd:byteCounters/nfd:incomingBytes"/></td>
+        <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nInterests"/></td>
+        <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nDatas"/></td>
+        <td><xsl:value-of select="nfd:byteCounters/nfd:outgoingBytes"/></td>
+      </tr>
+      </xsl:for-each>
+    </tbody>
+  </table>
+</xsl:template>
+
+<xsl:template match="nfd:fib">
+  <h2>FIB</h2>
+  <table class="item-list">
+    <thead>
+      <tr>
+        <th width="20%">Prefix</th>
+        <th>NextHops</th>
+      </tr>
+    </thead>
+    <tbody>
+      <xsl:for-each select="nfd:fibEntry">
+        <xsl:variable name="style">
+          <xsl:choose>
+            <xsl:when test="position() mod 2 = 1">
+              <xsl:text>odd</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>even</xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+        <tr class="{$style}">
+        <td style="text-align:left;vertical-align:top;padding:0"><xsl:value-of select="nfd:prefix"/></td>
+        <td>
+          <table class="item-sublist">
+            <tr>
+              <th>FaceId</th>
+              <xsl:for-each select="nfd:nextHops/nfd:nextHop">
+                <td><xsl:value-of select="nfd:faceId"/></td>
+              </xsl:for-each>
+            </tr>
+            <tr>
+              <th>Cost</th>
+              <xsl:for-each select="nfd:nextHops/nfd:nextHop">
+                <td><xsl:value-of select="nfd:cost"/></td>
+              </xsl:for-each>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      </xsl:for-each>
+    </tbody>
+  </table>
+</xsl:template>
+
+<xsl:template match="nfd:rib">
+  <h2>RIB</h2>
+  <table class="item-list">
+    <thead>
+      <tr>
+        <th width="20%">Prefix</th>
+        <th>Routes</th>
+      </tr>
+    </thead>
+    <tbody>
+      <xsl:for-each select="nfd:ribEntry">
+        <xsl:variable name="style">
+          <xsl:choose>
+            <xsl:when test="position() mod 2 = 1">
+              <xsl:text>odd</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>even</xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+        <tr class="{$style}">
+        <td style="text-align:left;vertical-align:top;padding:0"><xsl:value-of select="nfd:prefix"/></td>
+        <td>
+          <table class="item-sublist">
+            <tr>
+              <th>FaceId</th>
+              <xsl:for-each select="nfd:routes/nfd:route">
+                <td><xsl:value-of select="nfd:faceId"/></td>
+              </xsl:for-each>
+            </tr>
+            <tr>
+              <th>Origin</th>
+              <xsl:for-each select="nfd:routes/nfd:route">
+                <td><xsl:value-of select="nfd:origin"/></td>
+              </xsl:for-each>
+            </tr>
+            <tr>
+              <th>Cost</th>
+              <xsl:for-each select="nfd:routes/nfd:route">
+                <td><xsl:value-of select="nfd:cost"/></td>
+              </xsl:for-each>
+            </tr>
+            <tr>
+              <th>Flags</th>
+              <xsl:for-each select="nfd:routes/nfd:route">
+                <td><xsl:value-of select="nfd:flags"/></td>
+              </xsl:for-each>
+            </tr>
+            <tr>
+              <th>Expires in</th>
+              <xsl:for-each select="nfd:routes/nfd:route">
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="nfd:expirationPeriod">
+                      <xsl:call-template name="formatDuration"><xsl:with-param name="duration" select="nfd:expirationPeriod" /></xsl:call-template>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      Never
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </xsl:for-each>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      </xsl:for-each>
+    </tbody>
+  </table>
+</xsl:template>
+
+<xsl:template match="nfd:strategyChoices">
+  <h2>Strategy Choices</h2>
+  <table class="item-list">
+    <thead>
+      <tr>
+        <th width="20%">Namespace</th>
+        <th>Strategy Name</th>
+      </tr>
+    </thead>
+    <tbody>
+      <xsl:for-each select="nfd:strategyChoice">
+      <tr>
+        <td><xsl:value-of select="nfd:namespace"/></td>
+        <td><xsl:value-of select="nfd:strategy/nfd:name"/></td>
+      </tr>
+      </xsl:for-each>
+    </tbody>
+  </table>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tools/nfd-status-http-server-files/reset.css b/tools/nfd-status-http-server-files/reset.css
new file mode 100644
index 0000000..0af7c26
--- /dev/null
+++ b/tools/nfd-status-http-server-files/reset.css
@@ -0,0 +1,207 @@
+/* `XHTML, HTML4, HTML5 Reset
+----------------------------------------------------------------------------------------------------*/
+
+a,
+abbr,
+acronym,
+address,
+applet,
+article,
+aside,
+audio,
+b,
+big,
+blockquote,
+body,
+canvas,
+caption,
+center,
+cite,
+code,
+dd,
+del,
+details,
+dfn,
+dialog,
+div,
+dl,
+dt,
+em,
+embed,
+fieldset,
+figcaption,
+figure,
+font,
+footer,
+form,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+header,
+hgroup,
+hr,
+html,
+i,
+iframe,
+img,
+ins,
+kbd,
+label,
+legend,
+li,
+mark,
+menu,
+meter,
+nav,
+object,
+ol,
+output,
+p,
+pre,
+progress,
+q,
+rp,
+rt,
+ruby,
+s,
+samp,
+section,
+small,
+span,
+strike,
+strong,
+sub,
+summary,
+sup,
+table,
+tbody,
+td,
+tfoot,
+th,
+thead,
+time,
+tr,
+tt,
+u,
+ul,
+var,
+video,
+xmp {
+  border: 0;
+  margin: 0;
+  padding: 0;
+  font-size: 100%;
+}
+
+html,
+body {
+  height: 100%;
+}
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section {
+/*
+  Override the default (display: inline) for
+  browsers that do not recognize HTML5 tags.
+
+  IE8 (and lower) requires a shiv:
+  http://ejohn.org/blog/html5-shiv
+*/
+  display: block;
+}
+
+b,
+strong {
+/*
+  Makes browsers agree.
+  IE + Opera = font-weight: bold.
+  Gecko + WebKit = font-weight: bolder.
+*/
+  font-weight: bold;
+}
+
+img {
+  color: transparent;
+  font-size: 0;
+  vertical-align: middle;
+/*
+  For IE.
+  http://css-tricks.com/ie-fix-bicubic-scaling-for-images
+*/
+  -ms-interpolation-mode: bicubic;
+}
+
+li {
+/*
+  For IE6 + IE7:
+
+  "display: list-item" keeps bullets from
+  disappearing if hasLayout is triggered.
+*/
+  display: list-item;
+  list-style: none;
+}
+
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+th,
+td,
+caption {
+  font-weight: normal;
+  vertical-align: top;
+  text-align: left;
+}
+
+q {
+  quotes: none;
+}
+
+q:before,
+q:after {
+  content: '';
+  content: none;
+}
+
+sub,
+sup,
+small {
+  font-size: 75%;
+}
+
+sub,
+sup {
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+svg {
+/*
+  For IE9. Without, occasionally draws shapes
+  outside the boundaries of <svg> rectangle.
+*/
+  overflow: hidden;
+}
\ No newline at end of file
diff --git a/tools/nfd-status-http-server-files/robots.txt b/tools/nfd-status-http-server-files/robots.txt
new file mode 100644
index 0000000..1f53798
--- /dev/null
+++ b/tools/nfd-status-http-server-files/robots.txt
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /
diff --git a/tools/nfd-status-http-server-files/style.css b/tools/nfd-status-http-server-files/style.css
new file mode 100644
index 0000000..176da83
--- /dev/null
+++ b/tools/nfd-status-http-server-files/style.css
@@ -0,0 +1,183 @@
+@import 'reset.css';
+@import 'text.css';
+
+@charset "utf-8";
+
+body {
+    background-color: #ffffff;
+    color: #000000;
+    font-family: sans-serif;
+}
+
+li {
+    margin: 0;
+}
+
+header, nav, article, footer, address {
+    display: block;
+}
+
+header {
+    margin: 20px;
+    width: 90%;
+}
+
+header h1 {
+    height: 50px;
+    padding-left: 55px;
+    padding-top: 6px;
+}
+
+article {
+    margin: 20px auto 20px;
+    width: 90%;
+    padding-bottom: 20px;
+}
+
+footer {
+    margin: 20px auto 0;
+    width: 90%;
+
+    padding-bottom: 2px;
+    text-align: right;
+
+    position: fixed;
+    font-height: 10px;
+    bottom: 0;
+    left: 5%;
+}
+
+h1 {
+    font-family: sans-serif;
+}
+
+h3 {
+    font-family: sans-serif;
+}
+
+h5 {
+    font-family: sans-serif;
+    color: #727272;
+}
+
+/* MISC */
+.grey {
+    color: #727272;
+    font-weight: 200;
+}
+
+.green {
+    color: #2D9A65;
+    font-weight: 200;
+}
+
+.red {
+    color: red;
+    font-weight: 200;
+    font-size: 2.4em;
+}
+
+.hidden {
+    display: none;
+}
+
+/* */
+.item-list
+{
+    border-radius: 6px;
+
+    margin-top: 10px;
+    margin-bottom: 10px;
+    font-family: sans-serif;
+    width: 100%;
+    text-align: left;
+}
+
+.item-list th
+{
+    font-weight: normal;
+    padding: 8px;
+    background: #EAF4EF;
+    border-top: 1px solid #99CCB2;
+    color: #727272;
+    text-align: left;
+}
+
+.item-list th.border-left {
+}
+
+.item-list td
+{
+    padding: 2px;
+    border-bottom: 1px solid #fff;
+    color: #000;
+    border-top: 1px solid transparent;
+}
+
+.item-sublist
+{
+    border-collapse:collapse;
+    border:1px solid gray;
+
+    padding: 4px;
+    font-family: sans-serif;
+    text-align: center;
+    margin-bottom: 0;
+}
+
+.item-sublist th
+{
+    background-color: transparent;
+    font-weight: bold;
+    padding: 4px;
+    text-align: center;
+
+    border-collapse:collapse;
+    border:1px solid gray;
+}
+
+.item-sublist th.border-left {
+}
+
+.item-sublist td
+{
+    border-collapse:collapse;
+    border:1px solid gray;
+
+    padding: 2px;
+    color: #000;
+    text-align: center;
+    min-width: 20px;
+}
+
+
+tr.center td
+{
+    text-align: center;
+}
+
+.border-left {
+    border-left: 1px solid #99CCB2;
+}
+
+.border-right {
+    border-right: 1px solid #99CCB2;
+}
+
+tfoot {
+    border-bottom: 2px solid #99CCB2;
+    background: #EAF4EF;
+}
+
+.item-list tfoot td {
+    padding: 0;
+}
+
+.odd {
+    background-color: #eeeeee;
+}
+
+.highlighted {
+    background-color: #cccccc;
+    cursor: pointer;
+}
diff --git a/tools/nfd-status-http-server-files/text.css b/tools/nfd-status-http-server-files/text.css
new file mode 100644
index 0000000..b115a70
--- /dev/null
+++ b/tools/nfd-status-http-server-files/text.css
@@ -0,0 +1,106 @@
+/*
+  960 Grid System ~ Text CSS.
+  Learn more ~ http://960.gs/
+
+  Licensed under GPL and MIT.
+*/
+
+/* `Basic HTML
+----------------------------------------------------------------------------------------------------*/
+
+body {
+    font: 13px Arial, Helvetica, sans-serif;
+}
+
+hr {
+  border: 0 #ccc solid;
+  border-top-width: 1px;
+  clear: both;
+  height: 0;
+}
+
+/* `Headings
+----------------------------------------------------------------------------------------------------*/
+
+h1 {
+	font-size: 2.4em;
+}
+
+h2 {
+	font-size: 1.8em;
+}
+
+h3 {
+	font-size: 1.4em;
+}
+
+/* h1 { */
+/*   font-size: 25px; */
+/* } */
+
+/* h2 { */
+/*   font-size: 23px; */
+/* } */
+
+/* h3 { */
+/*   font-size: 21px; */
+/* } */
+
+h4 {
+  font-size: 19px;
+}
+
+h5 {
+  font-size: 17px;
+}
+
+h6 {
+  font-size: 15px;
+}
+
+/* `Spacing
+----------------------------------------------------------------------------------------------------*/
+
+/* ol { */
+/*   list-style: decimal; */
+/* } */
+
+/* ul { */
+/*   list-style: disc; */
+/* } */
+
+/* li { */
+/*   margin-left: 30px; */
+/* } */
+
+p,
+dl,
+hr,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+ol,
+ul,
+pre,
+table,
+address,
+fieldset,
+figure {
+  margin-bottom: 10px;
+}
+
+pre {
+    /* padding: 0px 24px; */
+    white-space: pre-wrap;
+    background-color: #F9F9F9;
+    border: 1px dashed #2F6FAB;
+    color: black;
+    padding: 1em;
+    font-size: 13px;
+}
+code {
+    font-family: Consolas, Monaco, Andale Mono, monospace;
+}
\ No newline at end of file
diff --git a/tools/nfd-status-http-server.py b/tools/nfd-status-http-server.py
index 6e0f167..f127d40 100755
--- a/tools/nfd-status-http-server.py
+++ b/tools/nfd-status-http-server.py
@@ -24,94 +24,76 @@
 NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
 """
 
-from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
+from BaseHTTPServer import HTTPServer
+from SimpleHTTPServer import SimpleHTTPRequestHandler
 from SocketServer import ThreadingMixIn
 import sys
-import commands
+import subprocess
 import StringIO
 import urlparse
 import logging
 import cgi
 import argparse
 import socket
+import os
 
 
-class StatusHandler(BaseHTTPRequestHandler):
+class StatusHandler(SimpleHTTPRequestHandler):
     """ The handler class to handle requests."""
     def do_GET(self):
         # get the url info to decide how to respond
         parsedPath = urlparse.urlparse(self.path)
-        resultMessage = ""
-        if parsedPath.path == "/robots.txt":
-            if self.server.robots == False:
-                # return User-agent: * Disallow: / to disallow robots
-                resultMessage = "User-agent: * \nDisallow: /\n"
+        if parsedPath.path == "/":
+            # get current nfd status, and use it as result message
+            (res, resultMessage) = self.getNfdStatus()
+            self.send_response(200)
+            if res == 0:
+                self.send_header("Content-type", "text/xml; charset=UTF-8")
+            else:
+                self.send_header("Content-type", "text/html; charset=UTF-8")
+
+            self.end_headers()
+            self.wfile.write(resultMessage)
+        elif parsedPath.path == "/robots.txt" and self.server.robots == True:
+            resultMessage = ""
             self.send_response(200)
             self.send_header("Content-type", "text/plain")
-        elif parsedPath.path == "/":
-            # get current nfd status, and use it as result message
-            resultMessage = self.getNfdStatus()
-            self.send_response(200)
-            self.send_header("Content-type", "text/html; charset=UTF-8")
+            self.end_headers()
+            self.wfile.write(resultMessage)
         else:
-            # non-existing content
-            resultMessage = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 '\
-                   + 'Transitional//EN" '\
-                   + '"http://www.w3.org/TR/html4/loose.dtd">\n'\
-                   + '<html><head><title>Object not '\
-                   + 'found!</title><meta http-equiv="Content-type" ' \
-                   + 'content="text/html;charset=UTF-8"></head>\n'\
-                   + '<body><h1>Object not found!</h1>'\
-                   + '<p>The requested URL was not found on this server.</p>'\
-                   + '<h2>Error 404</h2>'\
-                   + '</body></html>'
-            self.send_response(404)
-            self.send_header("Content-type", "text/html; charset=UTF-8")
-
-        self.end_headers()
-        self.wfile.write(resultMessage)
+            SimpleHTTPRequestHandler.do_GET(self)
 
     def log_message(self, format, *args):
         if self.server.verbose:
             logging.info("%s - %s\n" % (self.address_string(),
-                         format % args))
+                        format % args))
 
     def getNfdStatus(self):
         """
-        This function tries to call nfd-status command
-        to get nfd's current status, after convert it
-        to html format, return it to the caller
+        This function is to call nfd-status command
+        to get xml format output
         """
-        (res, output) = commands.getstatusoutput('nfd-status')
-
-        htmlStr = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional'\
-                + '//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'\
-                + '<html><head><title>NFD status</title>'\
-                + '<meta http-equiv="Content-type" content="text/html;'\
-                + 'charset=UTF-8"></head>\n<body>'
+        sp = subprocess.Popen(['nfd-status', '-x'], stdout=subprocess.PIPE)
+        res = sp.wait()
         if res == 0:
-            # parse the output
-            buf = StringIO.StringIO(output)
-            firstLine = 0
-            for line in buf:
-                if line.endswith(":\n"):
-                    if firstLine != 0:
-                        htmlStr += "</ul>\n"
-                    firstLine += 1
-                    htmlStr += "<b>" + cgi.escape(line.strip()) + "</b><br>\n"\
-                             + "<ul>\n"
-                    continue
-                line = line.strip()
-                htmlStr += "<li>" + cgi.escape(line) + "</li>\n"
-            buf.close()
-            htmlStr += "</ul>\n"
+            # add the xml-stylesheet processing instruction after the 1st '>' symbol
+            output = sp.stdout.read()
+            newLineIndex = output.index('>') + 1
+            resultStr = output[:newLineIndex]\
+                      + "<?xml-stylesheet type=\"text/xsl\" href=\"nfd-status.xsl\"?>"\
+                      + output[newLineIndex:]
+            return (res, resultStr)
         else:
+            htmlStr = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional'\
+                    + '//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'\
+                    + '<html><head><title>NFD status</title>'\
+                    + '<meta http-equiv="Content-type" content="text/html;'\
+                    + 'charset=UTF-8"></head>\n<body>'
             # return connection error code
             htmlStr = htmlStr + "<p>Cannot connect to NFD,"\
                     + " Code = " + str(res) + "</p>\n"
-        htmlStr = htmlStr + "</body></html>"
-        return htmlStr
-
+            htmlStr = htmlStr + "</body></html>"
+            return (res, htmlStr)
 
 class ThreadHttpServer(ThreadingMixIn, HTTPServer):
     """ Handle requests using threads """
@@ -162,6 +144,8 @@
                         help="Specify the HTTP server IP address.")
     parser.add_argument("-r", default=False, dest="robots", action="store_true",
                         help="Enable HTTP robots to crawl; disabled by default.")
+    parser.add_argument("-f", default="@DATAROOTDIR@/ndn", metavar="Server Directory", dest="serverDir",
+                        help="Specify the working directory of nfd-status-http-server, default is @DATAROOTDIR@/ndn.")
     parser.add_argument("-v", default=False, dest="verbose", action="store_true",
                         help="Verbose mode.")
     parser.add_argument("--version", default=False, dest="version", action="store_true",
@@ -177,6 +161,9 @@
     localAddr = args["addr"]
     verbose = args["verbose"]
     robots = args["robots"]
+    serverDirectory = args["serverDir"]
+
+    os.chdir(serverDirectory)
 
     # setting log message format
     logging.basicConfig(format='%(asctime)s [%(levelname)s] %(message)s',
diff --git a/tools/nfd-status.cpp b/tools/nfd-status.cpp
index d06e8fb..3262a28 100644
--- a/tools/nfd-status.cpp
+++ b/tools/nfd-status.cpp
@@ -36,6 +36,7 @@
 #include <ndn-cxx/management/nfd-channel-status.hpp>
 #include <ndn-cxx/management/nfd-face-status.hpp>
 #include <ndn-cxx/management/nfd-fib-entry.hpp>
+#include <ndn-cxx/management/nfd-rib-entry.hpp>
 #include <ndn-cxx/management/nfd-strategy-choice.hpp>
 
 #include <boost/algorithm/string/replace.hpp>
@@ -53,6 +54,7 @@
     , m_needChannelStatusRetrieval(false)
     , m_needFaceStatusRetrieval(false)
     , m_needFibEnumerationRetrieval(false)
+    , m_needRibStatusRetrieval(false)
     , m_needStrategyChoiceRetrieval(false)
     , m_isOutputXml(false)
   {
@@ -69,6 +71,7 @@
       "  [-c] - retrieve channel status information\n"
       "  [-f] - retrieve face status information\n"
       "  [-b] - retrieve FIB information\n"
+      "  [-r] - retrieve RIB information\n"
       "  [-s] - retrieve configured strategy choice for NDN namespaces\n"
       "  [-x] - output NFD status information in XML format\n"
       "\n"
@@ -110,6 +113,12 @@
   }
 
   void
+  enableRibStatusRetrieval()
+  {
+    m_needRibStatusRetrieval = true;
+  }
+
+  void
   enableXmlOutput()
   {
     m_isOutputXml = true;
@@ -381,17 +390,24 @@
             std::cout << "<incomingPackets>";
             std::cout << "<nInterests>"       << faceStatus.getNInInterests()
                       << "</nInterests>";
-            std::cout << "<nDatas>"           << faceStatus.getNInInterests()
+            std::cout << "<nDatas>"           << faceStatus.getNInDatas()
                       << "</nDatas>";
             std::cout << "</incomingPackets>";
             std::cout << "<outgoingPackets>";
             std::cout << "<nInterests>"       << faceStatus.getNOutInterests()
                       << "</nInterests>";
-            std::cout << "<nDatas>"           << faceStatus.getNOutInterests()
+            std::cout << "<nDatas>"           << faceStatus.getNOutDatas()
                       << "</nDatas>";
             std::cout << "</outgoingPackets>";
             std::cout << "</packetCounters>";
 
+            std::cout << "<byteCounters>";
+            std::cout << "<incomingBytes>"    << faceStatus.getNInBytes()
+                      << "</incomingBytes>";
+            std::cout << "<outgoingBytes>"    << faceStatus.getNOutBytes()
+                      << "</outgoingBytes>";
+            std::cout << "</byteCounters>";
+
             if (faceStatus.getFlags() != 0) {
               std::cout << "<flags>";
               if (faceStatus.isLocal()) {
@@ -435,9 +451,11 @@
             }
             std::cout << " counters={"
                       << "in={" << faceStatus.getNInInterests() << "i "
-                      << faceStatus.getNInDatas() << "d}"
+                      << faceStatus.getNInDatas() << "d "
+                      << faceStatus.getNInBytes() << "B}"
                       << " out={" << faceStatus.getNOutInterests() << "i "
-                      << faceStatus.getNOutDatas() << "d}"
+                      << faceStatus.getNOutDatas() << "d "
+                      << faceStatus.getNOutBytes() << "B}"
                       << "}";
             if (faceStatus.isLocal())
               std::cout << " local";
@@ -629,6 +647,118 @@
   }
 
   void
+  fetchRibStatusInformation()
+  {
+    m_buffer = make_shared<OBufferStream>();
+
+    Interest interest("/localhost/nfd/rib/list");
+    interest.setChildSelector(1);
+    interest.setMustBeFresh(true);
+
+    m_face.expressInterest(interest,
+                           bind(&NfdStatus::fetchSegments, this, _2,
+                                &NfdStatus::afterFetchedRibStatusInformation),
+                           bind(&NfdStatus::onTimeout, this));
+  }
+
+  void
+  afterFetchedRibStatusInformation()
+  {
+    ConstBufferPtr buf = m_buffer->buf();
+    if (m_isOutputXml)
+      {
+        std::cout << "<rib>";
+
+        Block block;
+        size_t offset = 0;
+        while (offset < buf->size())
+          {
+            bool ok = Block::fromBuffer(buf, offset, block);
+            if (!ok)
+              {
+                std::cerr << "ERROR: cannot decode RibEntry TLV";
+                break;
+              }
+            offset += block.size();
+
+            nfd::RibEntry ribEntry(block);
+
+            std::cout << "<ribEntry>";
+            std::string prefix(ribEntry.getName().toUri());
+            escapeSpecialCharacters(&prefix);
+            std::cout << "<prefix>" << prefix << "</prefix>";
+            std::cout << "<routes>";
+            for (std::list<nfd::Route>::const_iterator
+                   nextRoute = ribEntry.begin();
+                 nextRoute != ribEntry.end();
+                 ++nextRoute)
+              {
+                std::cout << "<route>" ;
+                std::cout << "<faceId>"  << nextRoute->getFaceId() << "</faceId>";
+                std::cout << "<origin>"  << nextRoute->getOrigin() << "</origin>";
+                std::cout << "<cost>"    << nextRoute->getCost()   << "</cost>";
+                std::cout << "<flags>"   << nextRoute->getFlags()  << "</flags>";
+                if (!nextRoute->hasInfiniteExpirationPeriod()) {
+                  std::cout << "<expirationPeriod>PT"
+                            << time::duration_cast<time::seconds>(nextRoute->getExpirationPeriod())
+                                 .count() << "S"
+                            << "</expirationPeriod>";
+                }
+                std::cout << "</route>";
+              }
+            std::cout << "</routes>";
+            std::cout << "</ribEntry>";
+          }
+
+        std::cout << "</rib>";
+      }
+    else
+      {
+        std::cout << "Rib:" << std::endl;
+
+        Block block;
+        size_t offset = 0;
+        while (offset < buf->size())
+          {
+            bool ok = Block::fromBuffer(buf, offset, block);
+            if (!ok)
+              {
+                std::cerr << "ERROR: cannot decode RibEntry TLV" << std::endl;
+                break;
+              }
+
+            offset += block.size();
+
+            nfd::RibEntry ribEntry(block);
+
+            std::cout << " " << ribEntry.getName().toUri() << " route={";
+            for (std::list<nfd::Route>::const_iterator
+                   nextRoute = ribEntry.begin();
+                 nextRoute != ribEntry.end();
+                 ++nextRoute)
+              {
+                if (nextRoute != ribEntry.begin())
+                  std::cout << ", ";
+                std::cout << "faceid="   << nextRoute->getFaceId()
+                          << " (origin="  << nextRoute->getOrigin()
+                          << " cost="    << nextRoute->getCost()
+                          << " flags="   << nextRoute->getFlags();
+                if (!nextRoute->hasInfiniteExpirationPeriod()) {
+                  std::cout << " expires="
+                            << time::duration_cast<time::seconds>(nextRoute->getExpirationPeriod())
+                               .count() << "s";
+                }
+                std::cout << ")";
+              }
+            std::cout << "}" << std::endl;
+          }
+       }
+
+    runNextStep();
+  }
+
+
+  void
   fetchInformation()
   {
     if (m_isOutputXml ||
@@ -636,12 +766,14 @@
          !m_needChannelStatusRetrieval &&
          !m_needFaceStatusRetrieval &&
          !m_needFibEnumerationRetrieval &&
+         !m_needRibStatusRetrieval &&
          !m_needStrategyChoiceRetrieval))
       {
         enableVersionRetrieval();
         enableChannelStatusRetrieval();
         enableFaceStatusRetrieval();
         enableFibEnumerationRetrieval();
+        enableRibStatusRetrieval();
         enableStrategyChoiceRetrieval();
       }
 
@@ -660,6 +792,9 @@
     if (m_needFibEnumerationRetrieval)
       m_fetchSteps.push_back(bind(&NfdStatus::fetchFibEnumerationInformation, this));
 
+    if (m_needRibStatusRetrieval)
+      m_fetchSteps.push_back(bind(&NfdStatus::fetchRibStatusInformation, this));
+
     if (m_needStrategyChoiceRetrieval)
       m_fetchSteps.push_back(bind(&NfdStatus::fetchStrategyChoiceInformation, this));
 
@@ -705,6 +840,7 @@
   bool m_needChannelStatusRetrieval;
   bool m_needFaceStatusRetrieval;
   bool m_needFibEnumerationRetrieval;
+  bool m_needRibStatusRetrieval;
   bool m_needStrategyChoiceRetrieval;
   bool m_isOutputXml;
   Face m_face;
@@ -721,7 +857,7 @@
   int option;
   ndn::NfdStatus nfdStatus(argv[0]);
 
-  while ((option = getopt(argc, argv, "hvcfbsxV")) != -1) {
+  while ((option = getopt(argc, argv, "hvcfbrsxV")) != -1) {
     switch (option) {
     case 'h':
       nfdStatus.usage();
@@ -738,6 +874,9 @@
     case 'b':
       nfdStatus.enableFibEnumerationRetrieval();
       break;
+    case 'r':
+      nfdStatus.enableRibStatusRetrieval();
+      break;
     case 's':
       nfdStatus.enableStrategyChoiceRetrieval();
       break;
diff --git a/tools/nfdc.cpp b/tools/nfdc.cpp
index a0e1c56..8578e43 100644
--- a/tools/nfdc.cpp
+++ b/tools/nfdc.cpp
@@ -228,8 +228,10 @@
     .setName(m_name)
     .setCost(m_cost)
     .setFlags(m_flags)
-    .setOrigin(m_origin)
-    .setExpirationPeriod(m_expires);
+    .setOrigin(m_origin);
+
+  if (m_expires != DEFAULT_EXPIRATION_PERIOD)
+    parameters.setExpirationPeriod(m_expires);
 
   if (!isValidUri(m_commandLineArguments[1])) {
     try { //So the uri is not valid, may be a faceId is provided.
@@ -261,10 +263,12 @@
     .setName(m_name)
     .setCost(m_cost)
     .setFlags(m_flags)
-    .setExpirationPeriod(m_expires)
     .setOrigin(m_origin)
     .setFaceId(faceCreateResult.getFaceId());
 
+  if (m_expires != DEFAULT_EXPIRATION_PERIOD)
+    ribParameters.setExpirationPeriod(m_expires);
+
   m_controller.start<RibRegisterCommand>(ribParameters,
                                          bind(&Nfdc::onSuccess, this, _1,
                                                 "Successful in name registration"),
diff --git a/wscript b/wscript
index 93c6a2d..7a03afd 100644
--- a/wscript
+++ b/wscript
@@ -190,13 +190,6 @@
         IF_HAVE_LIBPCAP="" if bld.env['HAVE_LIBPCAP'] else "; ",
         IF_HAVE_WEBSOCKET="" if bld.env['HAVE_WEBSOCKET'] else "; ")
 
-    bld(features='subst',
-        source='tools/nfd-status-http-server.py',
-        target='bin/nfd-status-http-server',
-        install_path="${BINDIR}",
-        chmod=Utils.O755,
-        VERSION=VERSION)
-
     if bld.env['SPHINX_BUILD']:
         bld(features="sphinx",
             builder="man",
@@ -206,7 +199,7 @@
             install_path="${MANDIR}/",
             VERSION=VERSION)
 
-    for script in bld.path.ant_glob('tools/*.sh'):
+    for script in bld.path.ant_glob(['tools/*.sh', 'tools/*.py']):
         bld(features='subst',
             source='tools/%s' % (str(script)),
             target='bin/%s' % (str(script.change_ext(''))),
@@ -214,6 +207,9 @@
             chmod=Utils.O755,
             VERSION=VERSION)
 
+    bld.install_files("${DATAROOTDIR}/ndn",
+                      bld.path.ant_glob('tools/nfd-status-http-server-files/*'))
+
 def docs(bld):
     from waflib import Options
     Options.commands = ['doxygen', 'sphinx'] + Options.commands
