tools: display face flags in nfdc and nfd-status-http-server

refs #3733

Change-Id: Idd66ffb7594079d2738253d035792300fe3febef
diff --git a/tools/nfd-status-http-server-files/nfd-status.xsl b/tools/nfd-status-http-server-files/nfd-status.xsl
index f8ba4c8..ff92dae 100644
--- a/tools/nfd-status-http-server-files/nfd-status.xsl
+++ b/tools/nfd-status-http-server-files/nfd-status.xsl
@@ -151,6 +151,7 @@
         <th>Scope</th>
         <th>Persistency</th>
         <th>LinkType</th>
+        <th>Flags</th>
         <th>Expires in</th>
         <th>In Interests</th>
         <th>In Data</th>
@@ -181,6 +182,13 @@
         <td><xsl:value-of select="nfd:linkType"/></td>
         <td>
           <xsl:choose>
+            <xsl:when test="nfd:flags/nfd:localFieldsEnabled">
+              local-fields
+            </xsl:when>
+          </xsl:choose>
+        </td>
+        <td>
+          <xsl:choose>
             <xsl:when test="nfd:expirationPeriod">
               <xsl:call-template name="formatDuration"><xsl:with-param name="duration" select="nfd:expirationPeriod" /></xsl:call-template>
             </xsl:when>
diff --git a/tools/nfdc/face-module.cpp b/tools/nfdc/face-module.cpp
index 97e836c..076b7af 100644
--- a/tools/nfdc/face-module.cpp
+++ b/tools/nfdc/face-module.cpp
@@ -91,6 +91,17 @@
   os << "<facePersistency>" << item.getFacePersistency() << "</facePersistency>";
   os << "<linkType>" << item.getLinkType() << "</linkType>";
 
+  if (item.getFlags() == 0) {
+    os << "<flags/>";
+  }
+  else {
+    os << "<flags>";
+    if (item.getFlagBit(ndn::nfd::BIT_LOCAL_FIELDS_ENABLED)) {
+      os << "<localFieldsEnabled/>";
+    }
+    os << "</flags>";
+  }
+
   os << "<packetCounters>";
   os << "<incomingPackets>"
      << "<nInterests>" << item.getNInInterests() << "</nInterests>"
@@ -146,6 +157,13 @@
   os << " " << item.getFaceScope();
   os << " " << item.getFacePersistency();
   os << " " << item.getLinkType();
+
+  os << " flags={";
+  if (item.getFlagBit(ndn::nfd::BIT_LOCAL_FIELDS_ENABLED)) {
+    os << "local-fields";
+  }
+  os << "}";
+
   os << "\n";
 }