diff --git a/apps/routerconsole/jsp/peers.jsp b/apps/routerconsole/jsp/peers.jsp index 14a919d62..c4b72b931 100644 --- a/apps/routerconsole/jsp/peers.jsp +++ b/apps/routerconsole/jsp/peers.jsp @@ -8,11 +8,11 @@ <%@include file="summary.jsi" %>

<%=intl._("I2P Network Peers")%>

-
+
" /> " /> -
+
diff --git a/router/java/src/net/i2p/router/transport/TransportManager.java b/router/java/src/net/i2p/router/transport/TransportManager.java index a4088b715..87a8bc8b2 100644 --- a/router/java/src/net/i2p/router/transport/TransportManager.java +++ b/router/java/src/net/i2p/router/transport/TransportManager.java @@ -499,6 +499,11 @@ public class TransportManager implements TransportEventListener { Transport t= (Transport)iter.next(); t.renderStatusHTML(out, urlBase, sortFlags); } + + if (_transports.size() > 0) { + out.write(getTransportsLegend()); + } + StringBuilder buf = new StringBuilder(4*1024); buf.append("

").append(_("Router Transport Addresses")).append("

\n");
         for (int i = 0; i < _transports.size(); i++) {
@@ -517,6 +522,41 @@ public class TransportManager implements TransportEventListener {
         out.flush();
     }
 
+
+    private final String getTransportsLegend() {
+        StringBuilder buf = new StringBuilder(1024);
+        buf.append("

").append(_("Definitions")).append("

" + + "

").append(_("Peer")).append(": ").append(_("The remote peer, identified by router hash")).append("
\n" + + "").append(_("Dir")).append(": " + + " ").append(_("Inbound connection")).append("
\n" + + "       " + + " ").append(_("Outbound connection")).append("
\n" + + "       " + + "\"V\" ").append(_("They offered to introduce us (help other peers traverse our firewall)")).append("
\n" + + "       " + + "\"^\" ").append(_("We offered to introduce them (help other peers traverse their firewall)")).append("
\n" + + "").append(_("Idle")).append(": ").append(_("How long since a packet has been received / sent")).append("
\n" + + "").append(_("In/Out")).append(": ").append(_("The smoothed inbound / outbound transfer rate (KBytes per second)")).append("
\n" + + "").append(_("Up")).append(": ").append(_("How long ago this connection was established")).append("
\n" + + "").append(_("Skew")).append(": ").append(_("The difference between the peer's clock and your own")).append("
\n" + + "CWND: ").append(_("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" /
\n" + + "        ").append(_("The number of sent messages awaiting acknowledgement")).append(" /
\n" + + "        ").append(_("The maximum number of concurrent messages to send")).append(" /
\n"+ + "        ").append(_("The number of pending sends which exceed congestion window")).append("
\n" + + "SST: ").append(_("The slow start threshold")).append("
\n" + + "RTT: ").append(_("The round trip time in milliseconds")).append("
\n" + + "").append(_("Dev")).append(": ").append(_("The standard deviation of the round trip time in milliseconds")).append("
\n" + + "RTO: ").append(_("The retransmit timeout in milliseconds")).append("
\n" + + "MTU: ").append(_("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("
\n" + + "").append(_("TX")).append(": ").append(_("The total number of packets sent to the peer")).append("
\n" + + "").append(_("RX")).append(": ").append(_("The total number of packets received from the peer")).append("
\n" + + "").append(_("Dup TX")).append(": ").append(_("The total number of packets retransmitted to the peer")).append("
\n" + + "").append(_("Dup RX")).append(": ").append(_("The total number of duplicate packets received from the peer")).append("

" + + "
\n"); + return buf.toString(); + } + + /** * Mark a string for extraction by xgettext and translation. * Use this only in static initializers. diff --git a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java index 9d1c3a432..0d6f4561d 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java +++ b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java @@ -707,7 +707,7 @@ public class NTCPTransport extends TransportImpl { long totalRecv = 0; StringBuilder buf = new StringBuilder(512); - buf.append("

").append(_("NTCP connections")).append(": ").append(peers.size()); + buf.append("

").append(_("NTCP connections")).append(": ").append(peers.size()); buf.append(". ").append(_("Limit")).append(": ").append(getMaxConnections()); buf.append(". ").append(_("Timeout")).append(": ").append(DataHelper.formatDuration(_pumper.getIdleTimeout())); buf.append(".

\n" + diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index 88d57877b..5570b8389 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -2116,7 +2116,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority buf.append(sendTotal).append(" ").append(recvTotal).append("\n" + "").append(resentTotal); buf.append("").append(dupRecvTotal).append("\n" + - "
\n"); + "\n"); /***** long bytesTransmitted = _context.bandwidthLimiter().getTotalAllocatedOutboundBytes(); @@ -2132,7 +2132,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority out.write(buf.toString()); buf.setLength(0); - out.write(getKey()); } private static final DecimalFormat _fmt = new DecimalFormat("#,##0.00"); @@ -2148,42 +2147,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority } } - /** - * Todo: Move since some of these apply to NTCP also, and the whole thing - * is hidden if i2np.udp.enable=false - */ - private final String getKey() { - StringBuilder buf = new StringBuilder(1024); - buf.append("

").append(_("Definitions")).append("

" + - "

").append(_("Peer")).append(": ").append(_("The remote peer, identified by router hash")).append("
\n" + - "").append(_("Dir")).append(": " + - " ").append(_("Inbound connection")).append("
\n" + - "       " + - " ").append(_("Outbound connection")).append("
\n" + - "       " + - "\"V\" ").append(_("They offered to introduce us (help other peers traverse our firewall)")).append("
\n" + - "       " + - "\"^\" ").append(_("We offered to introduce them (help other peers traverse their firewall)")).append("
\n" + - "").append(_("Idle")).append(": ").append(_("How long since a packet has been received / sent")).append("
\n" + - "").append(_("In/Out")).append(": ").append(_("The smoothed inbound / outbound transfer rate (KBytes per second)")).append("
\n" + - "").append(_("Up")).append(": ").append(_("How long ago this connection was established")).append("
\n" + - "").append(_("Skew")).append(": ").append(_("The difference between the peer's clock and your own")).append("
\n" + - "CWND: ").append(_("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" /
\n" + - "        ").append(_("The number of sent messages awaiting acknowledgement")).append(" /
\n" + - "        ").append(_("The maximum number of concurrent messages to send")).append(" /
\n"+ - "        ").append(_("The number of pending sends which exceed congestion window")).append("
\n" + - "SST: ").append(_("The slow start threshold")).append("
\n" + - "RTT: ").append(_("The round trip time in milliseconds")).append("
\n" + - "").append(_("Dev")).append(": ").append(_("The standard deviation of the round trip time in milliseconds")).append("
\n" + - "RTO: ").append(_("The retransmit timeout in milliseconds")).append("
\n" + - "MTU: ").append(_("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("
\n" + - "").append(_("TX")).append(": ").append(_("The total number of packets sent to the peer")).append("
\n" + - "").append(_("RX")).append(": ").append(_("The total number of packets received from the peer")).append("
\n" + - "").append(_("Dup TX")).append(": ").append(_("The total number of packets retransmitted to the peer")).append("
\n" + - "").append(_("Dup RX")).append(": ").append(_("The total number of duplicate packets received from the peer")).append("

" + - "
\n"); - return buf.toString(); - } private static final String BUNDLE_NAME = "net.i2p.router.web.messages";