diff --git a/src/mgmt/nfd/face-status.cpp b/src/mgmt/nfd/face-status.cpp
index 53ccf61..3361d99 100644
--- a/src/mgmt/nfd/face-status.cpp
+++ b/src/mgmt/nfd/face-status.cpp
@@ -54,30 +54,18 @@
 {
   size_t totalLength = 0;
 
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::Flags, m_flags);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::NOutBytes, m_nOutBytes);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::NInBytes, m_nInBytes);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::NOutNacks, m_nOutNacks);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::NOutDatas, m_nOutData);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::NOutInterests, m_nOutInterests);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::NInNacks, m_nInNacks);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::NInDatas, m_nInData);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::NInInterests, m_nInInterests);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::LinkType, m_linkType);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::FacePersistency, m_facePersistency);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::FaceScope, m_faceScope);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Flags, m_flags);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutBytes, m_nOutBytes);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInBytes, m_nInBytes);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutNacks, m_nOutNacks);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutData, m_nOutData);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutInterests, m_nOutInterests);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInNacks, m_nInNacks);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInData, m_nInData);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInInterests, m_nInInterests);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::LinkType, m_linkType);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FacePersistency, m_facePersistency);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FaceScope, m_faceScope);
   if (m_expirationPeriod) {
     totalLength += prependNonNegativeIntegerBlock(encoder,
                    tlv::nfd::ExpirationPeriod, static_cast<uint64_t>(m_expirationPeriod->count()));
@@ -190,12 +178,12 @@
     BOOST_THROW_EXCEPTION(Error("missing required NInInterests field"));
   }
 
-  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInDatas) {
+  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInData) {
     m_nInData = readNonNegativeInteger(*val);
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("missing required NInDatas field"));
+    BOOST_THROW_EXCEPTION(Error("missing required NInData field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInNacks) {
@@ -214,12 +202,12 @@
     BOOST_THROW_EXCEPTION(Error("missing required NOutInterests field"));
   }
 
-  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutDatas) {
+  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutData) {
     m_nOutData = readNonNegativeInteger(*val);
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("missing required NOutDatas field"));
+    BOOST_THROW_EXCEPTION(Error("missing required NOutData field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutNacks) {
@@ -280,7 +268,7 @@
 }
 
 FaceStatus&
-FaceStatus::setNInDatas(uint64_t nInData)
+FaceStatus::setNInData(uint64_t nInData)
 {
   m_wire.reset();
   m_nInData = nInData;
@@ -304,7 +292,7 @@
 }
 
 FaceStatus&
-FaceStatus::setNOutDatas(uint64_t nOutData)
+FaceStatus::setNOutData(uint64_t nOutData)
 {
   m_wire.reset();
   m_nOutData = nOutData;
@@ -348,10 +336,10 @@
       a.hasExpirationPeriod() == b.hasExpirationPeriod() &&
       (!a.hasExpirationPeriod() || a.getExpirationPeriod() == b.getExpirationPeriod()) &&
       a.getNInInterests() == b.getNInInterests() &&
-      a.getNInDatas() == b.getNInDatas() &&
+      a.getNInData() == b.getNInData() &&
       a.getNInNacks() == b.getNInNacks() &&
       a.getNOutInterests() == b.getNOutInterests() &&
-      a.getNOutDatas() == b.getNOutDatas() &&
+      a.getNOutData() == b.getNOutData() &&
       a.getNOutNacks() == b.getNOutNacks() &&
       a.getNInBytes() == b.getNInBytes() &&
       a.getNOutBytes() == b.getNOutBytes();
@@ -377,8 +365,8 @@
      << "     Flags: " << AsHex{status.getFlags()} << ",\n"
      << "     Counters: {Interests: {in: " << status.getNInInterests() << ", "
      << "out: " << status.getNOutInterests() << "},\n"
-     << "                Data: {in: " << status.getNInDatas() << ", "
-     << "out: " << status.getNOutDatas() << "},\n"
+     << "                Data: {in: " << status.getNInData() << ", "
+     << "out: " << status.getNOutData() << "},\n"
      << "                Nacks: {in: " << status.getNInNacks() << ", "
      << "out: " << status.getNOutNacks() << "},\n"
      << "                bytes: {in: " << status.getNInBytes() << ", "
diff --git a/src/mgmt/nfd/face-status.hpp b/src/mgmt/nfd/face-status.hpp
index 32c2607..1051e65 100644
--- a/src/mgmt/nfd/face-status.hpp
+++ b/src/mgmt/nfd/face-status.hpp
@@ -87,13 +87,27 @@
   setNInInterests(uint64_t nInInterests);
 
   uint64_t
-  getNInDatas() const
+  getNInData() const
   {
     return m_nInData;
   }
 
+  DEPRECATED(
+  uint64_t
+  getNInDatas() const)
+  {
+    return getNInData();
+  }
+
   FaceStatus&
-  setNInDatas(uint64_t nInData);
+  setNInData(uint64_t nInData);
+
+  DEPRECATED(
+  FaceStatus&
+  setNInDatas(uint64_t nInData))
+  {
+    return setNInData(nInData);
+  }
 
   uint64_t
   getNInNacks() const
@@ -114,13 +128,27 @@
   setNOutInterests(uint64_t nOutInterests);
 
   uint64_t
-  getNOutDatas() const
+  getNOutData() const
   {
     return m_nOutData;
   }
 
+  DEPRECATED(
+  uint64_t
+  getNOutDatas() const)
+  {
+    return getNOutData();
+  }
+
   FaceStatus&
-  setNOutDatas(uint64_t nOutData);
+  setNOutData(uint64_t nOutData);
+
+  DEPRECATED(
+  FaceStatus&
+  setNOutDatas(uint64_t nOutData))
+  {
+    return setNOutData(nOutData);
+  }
 
   uint64_t
   getNOutNacks() const
diff --git a/src/mgmt/nfd/forwarder-status.cpp b/src/mgmt/nfd/forwarder-status.cpp
index fbb6c73..06c8f1f 100644
--- a/src/mgmt/nfd/forwarder-status.cpp
+++ b/src/mgmt/nfd/forwarder-status.cpp
@@ -37,10 +37,10 @@
   , m_nMeasurementsEntries(0)
   , m_nCsEntries(0)
   , m_nInInterests(0)
-  , m_nInDatas(0)
+  , m_nInData(0)
   , m_nInNacks(0)
   , m_nOutInterests(0)
-  , m_nOutDatas(0)
+  , m_nOutData(0)
   , m_nOutNacks(0)
 {
 }
@@ -56,28 +56,17 @@
 {
   size_t totalLength = 0;
 
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutNacks,
-                                                m_nOutNacks);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutDatas,
-                                                m_nOutDatas);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutInterests,
-                                                m_nOutInterests);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInNacks,
-                                                m_nInNacks);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInDatas,
-                                                m_nInDatas);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInInterests,
-                                                m_nInInterests);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NCsEntries,
-                                                m_nCsEntries);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NMeasurementsEntries,
-                                                m_nMeasurementsEntries);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NPitEntries,
-                                                m_nPitEntries);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NFibEntries,
-                                                m_nFibEntries);
-  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NNameTreeEntries,
-                                                m_nNameTreeEntries);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutNacks, m_nOutNacks);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutData, m_nOutData);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutInterests, m_nOutInterests);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInNacks, m_nInNacks);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInData, m_nInData);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInInterests, m_nInInterests);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NCsEntries, m_nCsEntries);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NMeasurementsEntries, m_nMeasurementsEntries);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NPitEntries, m_nPitEntries);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NFibEntries, m_nFibEntries);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NNameTreeEntries, m_nNameTreeEntries);
   totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::CurrentTimestamp,
                                                 time::toUnixTimestamp(m_currentTimestamp).count());
   totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::StartTimestamp,
@@ -195,12 +184,12 @@
     BOOST_THROW_EXCEPTION(Error("missing required NInInterests field"));
   }
 
-  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInDatas) {
-    m_nInDatas = static_cast<uint64_t>(readNonNegativeInteger(*val));
+  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInData) {
+    m_nInData = static_cast<uint64_t>(readNonNegativeInteger(*val));
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("missing required NInDatas field"));
+    BOOST_THROW_EXCEPTION(Error("missing required NInData field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInNacks) {
@@ -219,12 +208,12 @@
     BOOST_THROW_EXCEPTION(Error("missing required NOutInterests field"));
   }
 
-  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutDatas) {
-    m_nOutDatas = static_cast<uint64_t>(readNonNegativeInteger(*val));
+  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutData) {
+    m_nOutData = static_cast<uint64_t>(readNonNegativeInteger(*val));
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("missing required NOutDatas field"));
+    BOOST_THROW_EXCEPTION(Error("missing required NOutData field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutNacks) {
@@ -232,7 +221,7 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("missing required NInNacks field"));
+    BOOST_THROW_EXCEPTION(Error("missing required NOutNacks field"));
   }
 }
 
@@ -309,10 +298,10 @@
 }
 
 ForwarderStatus&
-ForwarderStatus::setNInDatas(uint64_t nInDatas)
+ForwarderStatus::setNInData(uint64_t nInData)
 {
   m_wire.reset();
-  m_nInDatas = nInDatas;
+  m_nInData = nInData;
   return *this;
 }
 
@@ -333,10 +322,10 @@
 }
 
 ForwarderStatus&
-ForwarderStatus::setNOutDatas(uint64_t nOutDatas)
+ForwarderStatus::setNOutData(uint64_t nOutData)
 {
   m_wire.reset();
-  m_nOutDatas = nOutDatas;
+  m_nOutData = nOutData;
   return *this;
 }
 
@@ -360,10 +349,10 @@
       a.getNMeasurementsEntries() == b.getNMeasurementsEntries() &&
       a.getNCsEntries() == b.getNCsEntries() &&
       a.getNInInterests() == b.getNInInterests() &&
-      a.getNInDatas() == b.getNInDatas() &&
+      a.getNInData() == b.getNInData() &&
       a.getNInNacks() == b.getNInNacks() &&
       a.getNOutInterests() == b.getNOutInterests() &&
-      a.getNOutDatas() == b.getNOutDatas() &&
+      a.getNOutData() == b.getNOutData() &&
       a.getNOutNacks() == b.getNOutNacks();
 }
 
@@ -380,8 +369,8 @@
      << "                         CsEntries: " << status.getNCsEntries() << ",\n"
      << "                         Interests: {in: " << status.getNInInterests() << ", "
      << "out: " << status.getNOutInterests() << "},\n"
-     << "                         Data: {in: " << status.getNInDatas() << ", "
-     << "out: " << status.getNOutDatas() << "},\n"
+     << "                         Data: {in: " << status.getNInData() << ", "
+     << "out: " << status.getNOutData() << "},\n"
      << "                         Nacks: {in: " << status.getNInNacks() << ", "
      << "out: " << status.getNOutNacks() << "}}\n"
      << "              )";
diff --git a/src/mgmt/nfd/forwarder-status.hpp b/src/mgmt/nfd/forwarder-status.hpp
index 7e1b35c..58403f8 100644
--- a/src/mgmt/nfd/forwarder-status.hpp
+++ b/src/mgmt/nfd/forwarder-status.hpp
@@ -156,13 +156,27 @@
   setNInInterests(uint64_t nInInterests);
 
   uint64_t
-  getNInDatas() const
+  getNInData() const
   {
-    return m_nInDatas;
+    return m_nInData;
+  }
+
+  DEPRECATED(
+  uint64_t
+  getNInDatas() const)
+  {
+    return getNInData();
   }
 
   ForwarderStatus&
-  setNInDatas(uint64_t nInDatas);
+  setNInData(uint64_t nInData);
+
+  DEPRECATED(
+  ForwarderStatus&
+  setNInDatas(uint64_t nInData))
+  {
+    return setNInData(nInData);
+  }
 
   uint64_t
   getNInNacks() const
@@ -183,13 +197,27 @@
   setNOutInterests(uint64_t nOutInterests);
 
   uint64_t
-  getNOutDatas() const
+  getNOutData() const
   {
-    return m_nOutDatas;
+    return m_nOutData;
+  }
+
+  DEPRECATED(
+  uint64_t
+  getNOutDatas() const)
+  {
+    return getNOutData();
   }
 
   ForwarderStatus&
-  setNOutDatas(uint64_t nOutDatas);
+  setNOutData(uint64_t nOutData);
+
+  DEPRECATED(
+  ForwarderStatus&
+  setNOutDatas(uint64_t nOutData))
+  {
+    return setNOutData(nOutData);
+  }
 
   uint64_t
   getNOutNacks() const
@@ -210,10 +238,10 @@
   size_t m_nMeasurementsEntries;
   size_t m_nCsEntries;
   uint64_t m_nInInterests;
-  uint64_t m_nInDatas;
+  uint64_t m_nInData;
   uint64_t m_nInNacks;
   uint64_t m_nOutInterests;
-  uint64_t m_nOutDatas;
+  uint64_t m_nOutData;
   uint64_t m_nOutNacks;
 
   mutable Block m_wire;
