client: print reference ID in hexadecimal

This is an incompatible change in the output of the tracking command,
which may break some scripts, but it's necessary to avoid confusion with
IPv4 addresses when synchronised to an IPv6 server or reference clock.
This commit is contained in:
Miroslav Lichvar
2016-11-25 09:57:14 +01:00
parent 1045adaa88
commit 5fb1107cc7
4 changed files with 20 additions and 14 deletions

View File

@@ -1789,10 +1789,9 @@ print_report(const char *format, ...)
else
print_freq_ppm(dbl);
break;
case 'R': /* reference ID in quad-dotted notation */
case 'R': /* reference ID in hexdecimal */
long_uinteger = va_arg(ap, unsigned long);
printf("%lu.%lu.%lu.%lu", long_uinteger >> 24, (long_uinteger >> 16) & 0xff,
(long_uinteger >> 8) & 0xff, long_uinteger & 0xff);
printf("%lX", long_uinteger);
break;
case 'S': /* offset with unit */
dbl = va_arg(ap, double);