diff --git a/src/encoding/tlv-nfd.hpp b/src/encoding/tlv-nfd.hpp
index 2799223..f7af459 100644
--- a/src/encoding/tlv-nfd.hpp
+++ b/src/encoding/tlv-nfd.hpp
@@ -80,6 +80,11 @@
   NInBytes      = 148,
   NOutBytes     = 149,
 
+  // Content Store Management
+  CsInfo  = 128,
+  NHits   = 129,
+  NMisses = 130,
+
   // FIB Management
   FibEntry      = 128,
   NextHopRecord = 129,
diff --git a/src/mgmt/nfd/cs-info.cpp b/src/mgmt/nfd/cs-info.cpp
new file mode 100644
index 0000000..b776c53
--- /dev/null
+++ b/src/mgmt/nfd/cs-info.cpp
@@ -0,0 +1,137 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "cs-info.hpp"
+#include "encoding/block-helpers.hpp"
+#include "encoding/encoding-buffer.hpp"
+#include "encoding/tlv-nfd.hpp"
+#include "util/concepts.hpp"
+
+namespace ndn {
+namespace nfd {
+
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<CsInfo>));
+
+CsInfo::CsInfo()
+  : m_nHits(0)
+  , m_nMisses(0)
+{
+}
+
+CsInfo::CsInfo(const Block& block)
+{
+  this->wireDecode(block);
+}
+
+template<encoding::Tag TAG>
+size_t
+CsInfo::wireEncode(EncodingImpl<TAG>& encoder) const
+{
+  size_t totalLength = 0;
+
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NMisses, m_nMisses);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NHits, m_nHits);
+
+  totalLength += encoder.prependVarNumber(totalLength);
+  totalLength += encoder.prependVarNumber(tlv::nfd::CsInfo);
+  return totalLength;
+}
+
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(CsInfo);
+
+const Block&
+CsInfo::wireEncode() const
+{
+  if (m_wire.hasWire())
+    return m_wire;
+
+  EncodingEstimator estimator;
+  size_t estimatedSize = wireEncode(estimator);
+
+  EncodingBuffer buffer(estimatedSize, 0);
+  wireEncode(buffer);
+
+  m_wire = buffer.block();
+  return m_wire;
+}
+
+void
+CsInfo::wireDecode(const Block& block)
+{
+  if (block.type() != tlv::nfd::CsInfo) {
+    BOOST_THROW_EXCEPTION(Error("expecting CsInfo block, got " + to_string(block.type())));
+  }
+  m_wire = block;
+  m_wire.parse();
+  auto val = m_wire.elements_begin();
+
+  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NHits) {
+    m_nHits = readNonNegativeInteger(*val);
+    ++val;
+  }
+  else {
+    BOOST_THROW_EXCEPTION(Error("missing required NHits field"));
+  }
+
+  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NMisses) {
+    m_nMisses = readNonNegativeInteger(*val);
+    ++val;
+  }
+  else {
+    BOOST_THROW_EXCEPTION(Error("missing required NMisses field"));
+  }
+}
+
+CsInfo&
+CsInfo::setNHits(uint64_t nHits)
+{
+  m_wire.reset();
+  m_nHits = nHits;
+  return *this;
+}
+
+CsInfo&
+CsInfo::setNMisses(uint64_t nMisses)
+{
+  m_wire.reset();
+  m_nMisses = nMisses;
+  return *this;
+}
+
+bool
+operator==(const CsInfo& a, const CsInfo& b)
+{
+  return a.getNHits() == b.getNHits() &&
+         a.getNMisses() == b.getNMisses();
+}
+
+std::ostream&
+operator<<(std::ostream& os, const CsInfo& status)
+{
+  os << "CS: "
+     << status.getNHits() << (status.getNHits() == 1 ? " hit" : " hits")
+     << ", "
+     << status.getNMisses() << (status.getNMisses() == 1 ? " miss" : " misses");
+  return os;
+}
+
+} // namespace nfd
+} // namespace ndn
diff --git a/src/mgmt/nfd/cs-info.hpp b/src/mgmt/nfd/cs-info.hpp
new file mode 100644
index 0000000..0b9ad0a
--- /dev/null
+++ b/src/mgmt/nfd/cs-info.hpp
@@ -0,0 +1,104 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#ifndef NDN_MGMT_NFD_CS_INFO_HPP
+#define NDN_MGMT_NFD_CS_INFO_HPP
+
+#include "../../encoding/block.hpp"
+
+namespace ndn {
+namespace nfd {
+
+/**
+ * \ingroup management
+ * \brief represents the CS Information dataset
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#CS-Information-Dataset
+ */
+class CsInfo
+{
+public:
+  class Error : public tlv::Error
+  {
+  public:
+    explicit
+    Error(const std::string& what)
+      : tlv::Error(what)
+    {
+    }
+  };
+
+  CsInfo();
+
+  explicit
+  CsInfo(const Block& block);
+
+  template<encoding::Tag TAG>
+  size_t
+  wireEncode(EncodingImpl<TAG>& encoder) const;
+
+  const Block&
+  wireEncode() const;
+
+  void
+  wireDecode(const Block& wire);
+
+  uint64_t
+  getNHits() const
+  {
+    return m_nHits;
+  }
+
+  CsInfo&
+  setNHits(uint64_t nHits);
+
+  uint64_t
+  getNMisses() const
+  {
+    return m_nMisses;
+  }
+
+  CsInfo&
+  setNMisses(uint64_t nMisses);
+
+private:
+  uint64_t m_nHits;
+  uint64_t m_nMisses;
+  mutable Block m_wire;
+};
+
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(CsInfo);
+
+bool
+operator==(const CsInfo& a, const CsInfo& b);
+
+inline bool
+operator!=(const CsInfo& a, const CsInfo& b)
+{
+  return !(a == b);
+}
+
+std::ostream&
+operator<<(std::ostream& os, const CsInfo& status);
+
+} // namespace nfd
+} // namespace ndn
+
+#endif // NDN_MGMT_NFD_CS_INFO_HPP
diff --git a/src/mgmt/nfd/status-dataset.cpp b/src/mgmt/nfd/status-dataset.cpp
index cc0d6ea..5b6d66d 100644
--- a/src/mgmt/nfd/status-dataset.cpp
+++ b/src/mgmt/nfd/status-dataset.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -138,6 +138,17 @@
   return parseDatasetVector<FibEntry>(payload);
 }
 
+CsInfoDataset::CsInfoDataset()
+  : StatusDataset("cs/info")
+{
+}
+
+CsInfoDataset::ResultType
+CsInfoDataset::parseResult(ConstBufferPtr payload) const
+{
+  return CsInfo(Block(payload));
+}
+
 StrategyChoiceDataset::StrategyChoiceDataset()
   : StatusDataset("strategy-choice/list")
 {
diff --git a/src/mgmt/nfd/status-dataset.hpp b/src/mgmt/nfd/status-dataset.hpp
index f3d2c5e..f7f7917 100644
--- a/src/mgmt/nfd/status-dataset.hpp
+++ b/src/mgmt/nfd/status-dataset.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -28,6 +28,7 @@
 #include "face-query-filter.hpp"
 #include "channel-status.hpp"
 #include "fib-entry.hpp"
+#include "cs-info.hpp"
 #include "strategy-choice.hpp"
 #include "rib-entry.hpp"
 
@@ -50,7 +51,7 @@
    * \brief if defined, specifies constructor argument type;
    *        otherwise, constructor has no argument
    */
-  typedef int ParamType;
+  using ParamType = int;
 #endif
 
   /**
@@ -65,7 +66,7 @@
   /**
    * \brief provides the result type, usually a vector
    */
-  typedef std::vector<int> ResultType;
+  using ResultType = std::vector<int>;
 #endif
 
   /**
@@ -111,7 +112,6 @@
   PartialName m_datasetName;
 };
 
-
 /**
  * \ingroup management
  * \brief represents a status/general dataset
@@ -122,13 +122,12 @@
 public:
   ForwarderGeneralStatusDataset();
 
-  typedef ForwarderStatus ResultType;
+  using ResultType = ForwarderStatus;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
-
 /**
  * \ingroup management
  * \brief provides common functionality among FaceDataset and FaceQueryDataset
@@ -136,7 +135,7 @@
 class FaceDatasetBase : public StatusDataset
 {
 public:
-  typedef std::vector<FaceStatus> ResultType;
+  using ResultType = std::vector<FaceStatus>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
@@ -146,7 +145,6 @@
   FaceDatasetBase(const PartialName& datasetName);
 };
 
-
 /**
  * \ingroup management
  * \brief represents a faces/list dataset
@@ -158,7 +156,6 @@
   FaceDataset();
 };
 
-
 /**
  * \ingroup management
  * \brief represents a faces/query dataset
@@ -167,7 +164,7 @@
 class FaceQueryDataset : public FaceDatasetBase
 {
 public:
-  typedef FaceQueryFilter ParamType;
+  using ParamType = FaceQueryFilter;
 
   explicit
   FaceQueryDataset(const FaceQueryFilter& filter);
@@ -180,7 +177,6 @@
   FaceQueryFilter m_filter;
 };
 
-
 /**
  * \ingroup management
  * \brief represents a faces/channels dataset
@@ -191,13 +187,12 @@
 public:
   ChannelDataset();
 
-  typedef std::vector<ChannelStatus> ResultType;
+  using ResultType = std::vector<ChannelStatus>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
-
 /**
  * \ingroup management
  * \brief represents a fib/list dataset
@@ -208,12 +203,27 @@
 public:
   FibDataset();
 
-  typedef std::vector<FibEntry> ResultType;
+  using ResultType = std::vector<FibEntry>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
+/**
+ * \ingroup management
+ * \brief represents a cs/info dataset
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#CS-Information-Dataset
+ */
+class CsInfoDataset : public StatusDataset
+{
+public:
+  CsInfoDataset();
+
+  using ResultType = CsInfo;
+
+  ResultType
+  parseResult(ConstBufferPtr payload) const;
+};
 
 /**
  * \ingroup management
@@ -225,13 +235,12 @@
 public:
   StrategyChoiceDataset();
 
-  typedef std::vector<StrategyChoice> ResultType;
+  using ResultType = std::vector<StrategyChoice>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
-
 /**
  * \ingroup management
  * \brief represents a rib/list dataset
@@ -242,13 +251,12 @@
 public:
   RibDataset();
 
-  typedef std::vector<RibEntry> ResultType;
+  using ResultType = std::vector<RibEntry>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
-
 } // namespace nfd
 } // namespace ndn
 
diff --git a/tests/unit-tests/mgmt/nfd/cs-info.t.cpp b/tests/unit-tests/mgmt/nfd/cs-info.t.cpp
new file mode 100644
index 0000000..6e55b85
--- /dev/null
+++ b/tests/unit-tests/mgmt/nfd/cs-info.t.cpp
@@ -0,0 +1,91 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "mgmt/nfd/cs-info.hpp"
+
+#include "boost-test.hpp"
+#include <boost/lexical_cast.hpp>
+
+namespace ndn {
+namespace nfd {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_AUTO_TEST_SUITE(Nfd)
+BOOST_AUTO_TEST_SUITE(TestCsInfo)
+
+static CsInfo
+makeCsInfo()
+{
+  return CsInfo()
+    .setNHits(12951)
+    .setNMisses(28179);
+}
+
+BOOST_AUTO_TEST_CASE(Encode)
+{
+  CsInfo csi1 = makeCsInfo();
+  Block wire = csi1.wireEncode();
+
+  static const uint8_t EXPECTED[] = {
+    0x80, 0x08, // CsInfo
+          0x81, 0x02, 0x32, 0x97, // NHits
+          0x82, 0x02, 0x6E, 0x13, // NMisses
+  };
+  BOOST_CHECK_EQUAL_COLLECTIONS(wire.begin(), wire.end(), EXPECTED, EXPECTED + sizeof(EXPECTED));
+
+  CsInfo csi2(wire);
+  BOOST_CHECK_EQUAL(csi1, csi2);
+}
+
+BOOST_AUTO_TEST_CASE(Equality)
+{
+  CsInfo csi1, csi2;
+  BOOST_CHECK_EQUAL(csi1, csi2);
+
+  csi1 = makeCsInfo();
+  BOOST_CHECK_NE(csi1, csi2);
+  csi2 = csi1;
+  BOOST_CHECK_EQUAL(csi1, csi2);
+
+  csi2.setNHits(8267);
+  BOOST_CHECK_NE(csi1, csi2);
+}
+
+BOOST_AUTO_TEST_CASE(Print)
+{
+  CsInfo csi;
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(csi), "CS: 0 hits, 0 misses");
+
+  csi = makeCsInfo();
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(csi), "CS: 12951 hits, 28179 misses");
+
+  csi.setNHits(1).setNMisses(1);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(csi), "CS: 1 hit, 1 miss");
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestCsInfo
+BOOST_AUTO_TEST_SUITE_END() // Nfd
+BOOST_AUTO_TEST_SUITE_END() // Mgmt
+
+} // namespace tests
+} // namespace nfd
+} // namespace ndn
diff --git a/tests/unit-tests/mgmt/nfd/status-dataset.t.cpp b/tests/unit-tests/mgmt/nfd/status-dataset.t.cpp
index 13cd203..990f7f1 100644
--- a/tests/unit-tests/mgmt/nfd/status-dataset.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/status-dataset.t.cpp
@@ -378,6 +378,28 @@
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
 }
 
+BOOST_AUTO_TEST_CASE(CsInfo)
+{
+  using ndn::nfd::CsInfo;
+
+  bool hasResult = false;
+  controller.fetch<CsInfoDataset>(
+    [&hasResult] (const CsInfo& result) {
+      hasResult = true;
+      BOOST_CHECK_EQUAL(result.getNHits(), 4539);
+    },
+    datasetFailCallback);
+  this->advanceClocks(time::milliseconds(500));
+
+  CsInfo payload;
+  payload.setNHits(4539);
+  this->sendDataset("/localhost/nfd/cs/info", payload);
+  this->advanceClocks(time::milliseconds(500));
+
+  BOOST_CHECK(hasResult);
+  BOOST_CHECK_EQUAL(failCodes.size(), 0);
+}
+
 BOOST_AUTO_TEST_CASE(StrategyChoiceList)
 {
   bool hasResult = false;
