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"
"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),
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
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*:::