management: Add optional filter during the decoding of LocalControlHeader

Change-Id: I152f686f3821a5e3c5524a77d283e252a819f1fe
diff --git a/src/management/nfd-local-control-header.hpp b/src/management/nfd-local-control-header.hpp
index e3bbe0c..d09fe8a 100644
--- a/src/management/nfd-local-control-header.hpp
+++ b/src/management/nfd-local-control-header.hpp
@@ -55,7 +55,8 @@
    * LocalControlHeader should be done before calling this method.
    */
   inline void 
-  wireDecode(const Block& wire);
+  wireDecode(const Block& wire,
+             bool encodeIncomingFaceId = true, bool encodeNextHopFaceId = true);
 
   inline static const Block&
   getPayload(const Block& wire);
@@ -172,7 +173,8 @@
 }
 
 inline void 
-LocalControlHeader::wireDecode(const Block& wire)
+LocalControlHeader::wireDecode(const Block& wire,
+                               bool encodeIncomingFaceId/* = true*/, bool encodeNextHopFaceId/* = true*/)
 {
   BOOST_ASSERT(wire.type() == tlv::nfd::LocalControlHeader);
   wire.parse();
@@ -187,10 +189,12 @@
       switch(i->type())
         {
         case tlv::nfd::IncomingFaceId:
-          m_incomingFaceId = readNonNegativeInteger(*i);
+          if (encodeIncomingFaceId)
+            m_incomingFaceId = readNonNegativeInteger(*i);
           break;
         case tlv::nfd::NextHopFaceId:
-          m_nextHopFaceId = readNonNegativeInteger(*i);
+          if (encodeNextHopFaceId)
+            m_nextHopFaceId = readNonNegativeInteger(*i);
           break;
         default:
           // ignore all unsupported