tools: Visualizing local and on-demand Face flags

Change-Id: I639da99bc009777c316b52333f7a8bc4d9b02c7a
Refs: #1716
diff --git a/tools/nfd-status.cpp b/tools/nfd-status.cpp
index 7736fc8..5d35108 100644
--- a/tools/nfd-status.cpp
+++ b/tools/nfd-status.cpp
@@ -383,6 +383,17 @@
                       << "</nDatas>";
             std::cout << "</outgoingPackets>";
             std::cout << "</packetCounters>";
+
+            if (faceStatus.getFlags() != 0) {
+              std::cout << "<flags>";
+              if (faceStatus.isLocal()) {
+                std::cout << "<local/>";
+              }
+              if (faceStatus.isOnDemand()) {
+                std::cout << "<on-demand/>";
+              }
+              std::cout << "</flags>";
+            }
             std::cout << "</face>";
           }
         std::cout << "</faces>";
@@ -414,7 +425,12 @@
                       << faceStatus.getNInDatas() << "d}"
                       << " out={" << faceStatus.getNOutInterests() << "i "
                       << faceStatus.getNOutDatas() << "d}"
-                      << "}" << std::endl;
+                      << "}";
+            if (faceStatus.isLocal())
+              std::cout << " local";
+            if (faceStatus.isOnDemand())
+              std::cout << " on-demand";
+            std::cout << std::endl;
           }
        }