mgmt: move Flags field from FaceStatus to FaceTraits

refs #3732

Change-Id: I20ce5b608b6238d2c0c05db125ce261edd846dab
diff --git a/src/mgmt/nfd/face-event-notification.cpp b/src/mgmt/nfd/face-event-notification.cpp
index a65c7ba..a322ae9 100644
--- a/src/mgmt/nfd/face-event-notification.cpp
+++ b/src/mgmt/nfd/face-event-notification.cpp
@@ -50,6 +50,8 @@
   size_t totalLength = 0;
 
   totalLength += prependNonNegativeIntegerBlock(encoder,
+                 tlv::nfd::Flags, m_flags);
+  totalLength += prependNonNegativeIntegerBlock(encoder,
                  tlv::nfd::LinkType, m_linkType);
   totalLength += prependNonNegativeIntegerBlock(encoder,
                  tlv::nfd::FacePersistency, m_facePersistency);
@@ -150,6 +152,13 @@
   else {
     BOOST_THROW_EXCEPTION(Error("missing required LinkType field"));
   }
+
+  if (val != m_wire.elements_end() && val->type() == tlv::nfd::Flags) {
+    m_flags = readNonNegativeInteger(*val);
+  }
+  else {
+    BOOST_THROW_EXCEPTION(Error("missing required Flags field"));
+  }
 }
 
 FaceEventNotification&
@@ -192,8 +201,13 @@
      << "LocalUri: " << notification.getLocalUri() << ", "
      << "FaceScope: " << notification.getFaceScope() << ", "
      << "FacePersistency: " << notification.getFacePersistency() << ", "
-     << "LinkType: " << notification.getLinkType()
-     << ")";
+     << "LinkType: " << notification.getLinkType() << ", ";
+
+  auto osFlags = os.flags();
+  os << "Flags: " << std::showbase << std::hex << notification.getFlags();
+  os.flags(osFlags);
+
+  os << ")";
   return os;
 }