tools: Display face attribute fields instead of FaceFlags
refs #1991
Change-Id: I413db0afd77ceaa1549fcd11d6cb832fff02020b
diff --git a/tools/nfd-status-http-server-files/nfd-status.xsl b/tools/nfd-status-http-server-files/nfd-status.xsl
index fe3077e..5836fbb 100644
--- a/tools/nfd-status-http-server-files/nfd-status.xsl
+++ b/tools/nfd-status-http-server-files/nfd-status.xsl
@@ -152,8 +152,9 @@
<th>Face ID</th>
<th>Remote URI</th>
<th>Local URI</th>
- <th>Local</th>
- <th>OnDemand</th>
+ <th>Scope</th>
+ <th>Persistency</th>
+ <th>LinkType</th>
<th>Expires in</th>
<th>In Interests</th>
<th>In Data</th>
@@ -177,16 +178,9 @@
<td><xsl:value-of select="nfd:faceId"/></td>
<td><xsl:value-of select="nfd:remoteUri"/></td>
<td><xsl:value-of select="nfd:localUri"/></td>
- <td>
- <xsl:if test="nfd:flags/nfd:local">
- Y
- </xsl:if>
- </td>
- <td>
- <xsl:if test="nfd:flags/nfd:on-demand">
- Y
- </xsl:if>
- </td>
+ <td><xsl:value-of select="nfd:faceScope"/></td>
+ <td><xsl:value-of select="nfd:facePersistency"/></td>
+ <td><xsl:value-of select="nfd:linkType"/></td>
<td>
<xsl:choose>
<xsl:when test="nfd:expirationPeriod">
diff --git a/tools/nfd-status.cpp b/tools/nfd-status.cpp
index 68ffb73..42a35be 100644
--- a/tools/nfd-status.cpp
+++ b/tools/nfd-status.cpp
@@ -399,6 +399,13 @@
<< "</expirationPeriod>";
}
+ std::cout << "<faceScope>" << faceStatus.getFaceScope()
+ << "</faceScope>";
+ std::cout << "<facePersistency>" << faceStatus.getFacePersistency()
+ << "</facePersistency>";
+ std::cout << "<linkType>" << faceStatus.getLinkType()
+ << "</linkType>";
+
std::cout << "<packetCounters>";
std::cout << "<incomingPackets>";
std::cout << "<nInterests>" << faceStatus.getNInInterests()
@@ -421,16 +428,6 @@
<< "</outgoingBytes>";
std::cout << "</byteCounters>";
- 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>";
@@ -470,10 +467,9 @@
<< faceStatus.getNOutDatas() << "d "
<< faceStatus.getNOutBytes() << "B}"
<< "}";
- if (faceStatus.isLocal())
- std::cout << " local";
- if (faceStatus.isOnDemand())
- std::cout << " on-demand";
+ std::cout << " " << faceStatus.getFaceScope()
+ << " " << faceStatus.getFacePersistency()
+ << " " << faceStatus.getLinkType();
std::cout << std::endl;
}
}