From: atib Date: Sat, 8 Aug 2020 09:12:05 +0000 (+0530) Subject: Added code to print multiple addresses regitered on the same hop count X-Git-Tag: v0.94~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e2cce742920aaed48bd9ba6ea62cb91faf47970;p=thirdparty%2Fmtr.git Added code to print multiple addresses regitered on the same hop count --- diff --git a/ui/report.c b/ui/report.c index 1f5bd28..e51d95c 100644 --- a/ui/report.c +++ b/ui/report.c @@ -191,8 +191,14 @@ void report_close( mplss = net_mplss(at, z); if ((addrcmp ((void *) &ctl->unspec_addr, (void *) addr2, - ctl->af)) == 0) + ctl->af)) == 0) { break; + } else { + snprint_addr(ctl, name, sizeof(name), addr2); + snprintf(fmt, sizeof(fmt), " %%-%zus", len_hosts); + snprintf(buf, sizeof(buf), fmt, name); + printf("%s\n", buf); + } for (w = 0; w < z; w++) /* Ok... checking if there are ips repeated on same hop */ if ((addrcmp