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
 
