tools: display face flags in nfdc and nfd-status-http-server
refs #3733
Change-Id: Idd66ffb7594079d2738253d035792300fe3febef
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";
}