mgmt: declare cs/erase command

refs #4318

Change-Id: If34ba8d55a4d46d53f552f4edd748623d4c0e55e
diff --git a/src/mgmt/nfd/control-parameters.cpp b/src/mgmt/nfd/control-parameters.cpp
index 1e4d9fe..c0377c5 100644
--- a/src/mgmt/nfd/control-parameters.cpp
+++ b/src/mgmt/nfd/control-parameters.cpp
@@ -76,6 +76,9 @@
   if (this->hasFlags()) {
     totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Flags, m_flags);
   }
+  if (this->hasNCsEntries()) {
+    totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NCsEntries, m_nCsEntries);
+  }
   if (this->hasCapacity()) {
     totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Capacity, m_capacity);
   }
@@ -173,6 +176,12 @@
     m_capacity = readNonNegativeInteger(*val);
   }
 
+  val = m_wire.find(tlv::nfd::NCsEntries);
+  m_hasFields[CONTROL_PARAMETER_N_CS_ENTRIES] = val != m_wire.elements_end();
+  if (this->hasNCsEntries()) {
+    m_nCsEntries = readNonNegativeInteger(*val);
+  }
+
   val = m_wire.find(tlv::nfd::Flags);
   m_hasFields[CONTROL_PARAMETER_FLAGS] = val != m_wire.elements_end();
   if (this->hasFlags()) {
@@ -328,6 +337,10 @@
     os << "Capacity: " << parameters.getCapacity() << ", ";
   }
 
+  if (parameters.hasNCsEntries()) {
+    os << "NCsEntries: " << parameters.getNCsEntries() << ", ";
+  }
+
   if (parameters.hasFlags()) {
     os << "Flags: " << AsHex{parameters.getFlags()} << ", ";
   }