From 8401b7c112ebf47671b677e92e7e6a03f6504340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Tue, 3 Apr 2018 09:27:22 +0000 Subject: [PATCH] Show number of packets per path 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 | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mud b/mud index c63c94d..0c11ce5 160000 --- a/mud +++ b/mud @@ -1 +1 @@ -Subproject commit c63c94d7c84de79ecf5a0bccce131f2890230daf +Subproject commit 0c11ce5785e5dea597f5d4812f7f490dc1299f78 diff --git a/src/path.c b/src/path.c index 9cdb404..9ff82d3 100644 --- a/src/path.c +++ b/src/path.c @@ -52,7 +52,9 @@ gt_path_status(int fd) " public: %s port %"PRIu16"\n" " peer: %s port %"PRIu16"\n" " mtu: %zu bytes\n" - " rtt: %.3f ms\n", + " rtt: %.3f ms\n" + " output: %"PRIu64" packets\n" + " input: %"PRIu64" packets\n", statestr, bindstr[0] ? bindstr : "-", gt_get_port((struct sockaddr *)&res.path_status.local_addr), @@ -61,7 +63,9 @@ gt_path_status(int fd) peerstr[0] ? peerstr : "-", gt_get_port((struct sockaddr *)&res.path_status.addr), res.path_status.mtu.ok, - res.path_status.rtt/(double)1e3); + res.path_status.rtt/(double)1e3, + res.path_status.send.total, + res.path_status.recv.total); } while (res.ret == EAGAIN); return 0;