tools: display RIB flags by name in nfd-status page

refs #1870

Change-Id: I327ef9a672dc845f814930c818982fa2700f6402
diff --git a/tools/nfd-status-http-server-files/nfd-status.xsl b/tools/nfd-status-http-server-files/nfd-status.xsl
index 07b0faa..fe3077e 100644
--- a/tools/nfd-status-http-server-files/nfd-status.xsl
+++ b/tools/nfd-status-http-server-files/nfd-status.xsl
@@ -294,9 +294,23 @@
               </xsl:for-each>
             </tr>
             <tr>
-              <th>Flags</th>
+              <th>ChildInherit</th>
               <xsl:for-each select="nfd:routes/nfd:route">
-                <td><xsl:value-of select="nfd:flags"/></td>
+                <td>
+                  <xsl:if test="nfd:flags/nfd:childInherit">
+                    Y
+                  </xsl:if>
+                </td>
+              </xsl:for-each>
+            </tr>
+            <tr>
+              <th>RibCapture</th>
+              <xsl:for-each select="nfd:routes/nfd:route">
+                <td>
+                  <xsl:if test="nfd:flags/nfd:ribCapture">
+                    Y
+                  </xsl:if>
+                </td>
               </xsl:for-each>
             </tr>
             <tr>
diff --git a/tools/nfd-status.cpp b/tools/nfd-status.cpp
index 219e53d..2706be2 100644
--- a/tools/nfd-status.cpp
+++ b/tools/nfd-status.cpp
@@ -710,7 +710,14 @@
                 std::cout << "<faceId>"  << nextRoute->getFaceId() << "</faceId>";
                 std::cout << "<origin>"  << nextRoute->getOrigin() << "</origin>";
                 std::cout << "<cost>"    << nextRoute->getCost()   << "</cost>";
-                std::cout << "<flags>"   << nextRoute->getFlags()  << "</flags>";
+
+                std::cout << "<flags>";
+                if (nextRoute->isChildInherit())
+                  std::cout << "<childInherit/>";
+                if (nextRoute->isRibCapture())
+                  std::cout << "<ribCapture/>";
+                std::cout << "</flags>";
+
                 if (!nextRoute->hasInfiniteExpirationPeriod()) {
                   std::cout << "<expirationPeriod>PT"
                             << time::duration_cast<time::seconds>(nextRoute->getExpirationPeriod())
@@ -754,13 +761,18 @@
                   std::cout << ", ";
                 std::cout << "faceid="   << nextRoute->getFaceId()
                           << " (origin="  << nextRoute->getOrigin()
-                          << " cost="    << nextRoute->getCost()
-                          << " flags="   << nextRoute->getFlags();
+                          << " cost="    << nextRoute->getCost();
                 if (!nextRoute->hasInfiniteExpirationPeriod()) {
                   std::cout << " expires="
                             << time::duration_cast<time::seconds>(nextRoute->getExpirationPeriod())
                                .count() << "s";
                 }
+
+                if (nextRoute->isChildInherit())
+                  std::cout << " ChildInherit";
+                if (nextRoute->isRibCapture())
+                  std::cout << " RibCapture";
+
                 std::cout << ")";
               }
             std::cout << "}" << std::endl;