]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Raw pings output time in usec. Correct args and docs. 538/head
authorLogan Ingalls <log@plutor.org>
Wed, 9 Jul 2025 14:33:08 +0000 (10:33 -0400)
committerGitHub <noreply@github.com>
Wed, 9 Jul 2025 14:33:08 +0000 (10:33 -0400)
(An alternate solution is to correct https://github.com/traviscross/mtr/blob/master/ui/net.c#L319, but that would potentially break workflows for users, so this is likely a more acceptable fix)

FORMATS
ui/display.c
ui/display.h
ui/raw.c
ui/raw.h

diff --git a/FORMATS b/FORMATS
index cae643df413a6906d6493167146f798df17bf3d1..a09cf6d59e91759759e8a32064809ac0f4b7a33f 100644 (file)
--- a/FORMATS
+++ b/FORMATS
@@ -20,7 +20,7 @@ xmitline:
 x <pos> <seqnum>
 
 pingline:
-p <pos> <pingtime (ms)> <seqnum>
+p <pos> <pingtime (usec)> <seqnum>
 
 dnsline:
 d <pos> <hostname>
index 6761b19072fa468dcb5d6bd5de87162deef0cfb1..a076154fe8da1cbd70843c2213b108541ac3abd3 100644 (file)
@@ -218,11 +218,11 @@ void display_rawxmit(
 void display_rawping(
     struct mtr_ctl *ctl,
     int host,
-    int msec,
+    int usec,
     int seq)
 {
     if (ctl->DisplayMode == DisplayRaw)
-        raw_rawping(ctl, host, msec, seq);
+        raw_rawping(ctl, host, usec, seq);
 }
 
 
index ad74e63220f4e2e512b630d59370da5cf4acd501..bfe1aa3616686aa6ef505d65b381f11238de0485 100644 (file)
@@ -79,7 +79,7 @@ extern void display_rawxmit(
 extern void display_rawping(
     struct mtr_ctl *ctl,
     int hostnum,
-    int msec,
+    int usec,
     int seq);
 extern void display_rawhost(
     struct mtr_ctl *ctl,
index 74ed35fca2f6dd5ffd3428f32217ecd79b74161e..aef1ad14884193379a67b1a27c1fab49995c0e8d 100644 (file)
--- a/ui/raw.c
+++ b/ui/raw.c
@@ -47,7 +47,7 @@ void raw_rawxmit(
 void raw_rawping(
     struct mtr_ctl *ctl,
     int host,
-    int msec,
+    int usec,
     int seq)
 {
     static int havename[MaxHost];
@@ -60,7 +60,7 @@ void raw_rawping(
             printf("d %d %s\n", host, name);
         }
     }
-    printf("p %d %d %d\n", host, msec, seq);
+    printf("p %d %d %d\n", host, usec, seq);
     fflush(stdout);
 }
 
index f3fde96692798335353add1e4961622f2b627636..41ac8f12271f964f11785307852b2f0442c2223c 100644 (file)
--- a/ui/raw.h
+++ b/ui/raw.h
@@ -25,7 +25,7 @@ extern void raw_rawxmit(
 extern void raw_rawping(
     struct mtr_ctl *ctl,
     int host,
-    int msec,
+    int usec,
     int seq);
 extern void raw_rawhost(
     struct mtr_ctl *ctl,