From 3f8a4ab17dc2a27aa54ec9fddae070bc9fd97120 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 25 Sep 2018 17:59:01 +0100 Subject: [PATCH] Add bytes_sent and bytes_recvd to getSwitchPorts --- src/yggdrasil/admin.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/yggdrasil/admin.go b/src/yggdrasil/admin.go index 9f57881..46420c5 100644 --- a/src/yggdrasil/admin.go +++ b/src/yggdrasil/admin.go @@ -510,6 +510,8 @@ func (a *admin) getData_getSwitchPeers() []admin_nodeInfo { {"ip", net.IP(addr[:]).String()}, {"coords", fmt.Sprint(coords)}, {"port", elem.port}, + {"bytes_sent", atomic.LoadUint64(&peer.bytesSent)}, + {"bytes_recvd", atomic.LoadUint64(&peer.bytesRecvd)}, } peerInfos = append(peerInfos, info) }