]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
client: print addresses with refids in ntpdata report
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 5 Dec 2016 09:44:04 +0000 (10:44 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 6 Dec 2016 15:56:38 +0000 (16:56 +0100)
client.c
doc/chronyc.adoc

index d0e90941b577f1d57f9af2d6270e8d39c5306b46..7f1a5ffbdd3eea91ac785ad7852150693301e3a9 100644 (file)
--- a/client.c
+++ b/client.c
@@ -2215,9 +2215,9 @@ process_cmd_ntpdata(char *line)
   UTI_IPNetworkToHost(&reply.data.ntp_data.local_addr, &local_addr);
   UTI_TimespecNetworkToHost(&reply.data.ntp_data.ref_time, &ref_time);
 
-  print_report("Remote address  : %s\n"
+  print_report("Remote address  : %s (%R)\n"
                "Remote port     : %u\n"
-               "Local address   : %s\n"
+               "Local address   : %s (%R)\n"
                "Leap status     : %L\n"
                "Version         : %u\n"
                "Mode            : %M\n"
@@ -2241,8 +2241,9 @@ process_cmd_ntpdata(char *line)
                "Total TX        : %U\n"
                "Total RX        : %U\n"
                "Total valid RX  : %U\n",
-               UTI_IPToString(&remote_addr), ntohs(reply.data.ntp_data.remote_port),
-               UTI_IPToString(&local_addr),
+               UTI_IPToString(&remote_addr), (unsigned long)UTI_IPToRefid(&remote_addr),
+               ntohs(reply.data.ntp_data.remote_port),
+               UTI_IPToString(&local_addr), (unsigned long)UTI_IPToRefid(&local_addr),
                reply.data.ntp_data.leap, reply.data.ntp_data.version,
                reply.data.ntp_data.mode, reply.data.ntp_data.stratum,
                reply.data.ntp_data.poll, UTI_Log2ToDouble(reply.data.ntp_data.precision),
index 2bbb6790e1002cbc07b3204fa3a6e78e01c7e22d..eee086b5ee54ece496e0232c88d90f2d836ed1cf 100644 (file)
@@ -447,9 +447,9 @@ NTP-specific information about the NTP source. An example of the output is
 shown below.
 +
 ----
-Remote address  : 203.0.113.15
+Remote address  : 203.0.113.15 (CB00710F)
 Remote port     : 123
-Local address   : 203.0.113.74
+Local address   : 203.0.113.74 (CB00714A)
 Leap status     : Normal
 Version         : 4
 Mode            : Server
@@ -478,12 +478,13 @@ Total valid RX  : 24
 The fields are explained as follows:
 +
 *Remote address*:::
-The IP address of the NTP server or peer.
+The IP address of the NTP server or peer, and the corresponding reference ID.
 *Remote port*:::
 The UDP port number to which the request was sent. The standard NTP port is
 123.
 *Local address*:::
-The local IP address which received the response.
+The local IP address which received the response, and the corresponding
+reference ID.
 *Leap status*:::
 *Version*:::
 *Mode*:::