]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Added code to print multiple addresses regitered on the same hop count 362/head
authoratib <atibuddin92@gmail.com>
Sat, 8 Aug 2020 09:12:05 +0000 (14:42 +0530)
committeratib <atibuddin92@gmail.com>
Sat, 8 Aug 2020 09:12:05 +0000 (14:42 +0530)
ui/report.c

index 1f5bd285cadb7181d205d6267259c490b436bbda..e51d95c2114dd69887a8a4f52971be7cca33e424 100644 (file)
@@ -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