From e19fcaa2b0b2b947cff81b9cc6c20bb8e3b44311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Mon, 7 Oct 2019 14:18:50 +0000 Subject: [PATCH] Show remote loss too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- mud | 2 +- src/path.c | 46 ++++++++++++++++++++++------------------------ 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/mud b/mud index 9a378ae..ee4b484 160000 --- a/mud +++ b/mud @@ -1 +1 @@ -Subproject commit 9a378aea993bf642dfb85d30e26a09b62231ff17 +Subproject commit ee4b484a3808fbc78971b717647f835470d1363c diff --git a/src/path.c b/src/path.c index c7e69f0..c6f7168 100644 --- a/src/path.c +++ b/src/path.c @@ -34,29 +34,26 @@ gt_path_print_status(struct mud_path *path, int term) const char *statusstr = path->ok ? "OK" : "DEGRADED"; printf(term ? "path %s\n" - " status: %s\n" - " bind: %s port %"PRIu16"\n" - " public: %s port %"PRIu16"\n" - " peer: %s port %"PRIu16"\n" - " mtu: %zu bytes\n" - " rtt: %.3f ms\n" - " rttvar: %.3f ms\n" - " loss: %"PRIu64" %%\n" - " rate tx: %"PRIu64" bytes/sec\n" - " rate rx: %"PRIu64" bytes/sec\n" - " total tx: %"PRIu64" packets\n" - " total rx: %"PRIu64" packets\n" + " status: %s\n" + " bind: %s port %"PRIu16"\n" + " public: %s port %"PRIu16"\n" + " peer: %s port %"PRIu16"\n" + " mtu: %zu bytes\n" + " rtt: %.3f ms\n" + " rttvar: %.3f ms\n" + " tx:\n" + " rate: %"PRIu64" bytes/sec\n" + " loss: %"PRIu64" percent\n" + " total: %"PRIu64" packets\n" + " rx:\n" + " rate: %"PRIu64" bytes/sec\n" + " loss: %"PRIu64" percent\n" + " total: %"PRIu64" packets\n" : "path %s %s" - " %s %"PRIu16 - " %s %"PRIu16 - " %s %"PRIu16 - " %zu" - " %.3f %.3f" - " %"PRIu64 - " %"PRIu64 - " %"PRIu64 - " %"PRIu64 - " %"PRIu64 + " %s %"PRIu16" %s %"PRIu16" %s %"PRIu16 + " %zu %.3f %.3f" + " %"PRIu64" %"PRIu64" %"PRIu64 + " %"PRIu64" %"PRIu64" %"PRIu64 "\n", statestr, statusstr, @@ -69,10 +66,11 @@ gt_path_print_status(struct mud_path *path, int term) path->mtu.ok, (double)path->rtt.val / 1e3, (double)path->rtt.var / 1e3, - path->loss, path->rate_tx, - path->rate_rx, + path->loss_tx, path->send.total, + path->rate_rx, + path->loss_rx, path->recv.total); }