tools: Display face attribute fields instead of FaceFlags
refs #1991
Change-Id: I413db0afd77ceaa1549fcd11d6cb832fff02020b
diff --git a/docs/_static/nfd-status.xsd b/docs/_static/nfd-status.xsd
index 6f2770f..a34b2f2 100644
--- a/docs/_static/nfd-status.xsd
+++ b/docs/_static/nfd-status.xsd
@@ -53,22 +53,17 @@
</xs:sequence>
</xs:complexType>
-<xs:complexType name="faceFlagsType">
- <xs:sequence>
- <xs:element type="xs:string" name="local" minOccurs="0"/>
- <xs:element type="xs:string" name="on-demand" minOccurs="0"/>
- </xs:sequence>
-</xs:complexType>
-
<xs:complexType name="faceType">
<xs:sequence>
<xs:element type="xs:nonNegativeInteger" name="faceId"/>
<xs:element type="xs:anyURI" name="remoteUri"/>
<xs:element type="xs:anyURI" name="localUri"/>
<xs:element type="xs:duration" name="expirationPeriod" minOccurs="0"/>
+ <xs:element type="xs:string" name="faceScope"/>
+ <xs:element type="xs:string" name="facePersistency"/>
+ <xs:element type="xs:string" name="linkType"/>
<xs:element type="nfd:bidirectionalPacketCountersType" name="packetCounters"/>
<xs:element type="nfd:bidirectionalByteCountersType" name="byteCounters"/>
- <xs:element type="nfd:faceFlagsType" name="flags" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
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;
}
}