]> The Tcpdump Group git mirrors - tcpdump/commit
NTP: Print kiss codes relevant for NTP debugging
authorJoachim Kross <[email protected]>
Fri, 19 Apr 2024 10:04:33 +0000 (12:04 +0200)
committerfxlb <[email protected]>
Mon, 16 Sep 2024 06:43:27 +0000 (06:43 +0000)
commitc99c899d6e0da1b869776dadfd04f8a9f9972b3e
tree2688584b14c4d0e09225bfefe1423ee16fb756ca
parent72095a100d236aa35efedd68d9297b65523cc989
NTP: Print kiss codes relevant for NTP debugging

NTPv4 (RFC 5905, section 7.4) formalizes that if the stratum value
is zero, the refid _may_ contain a printable ("designed for
character displays and log files"), four-character, left justified,
zero filled ASCII string for status reporting and debugging ("kiss
code"). RFC 5905 establishes a registry at IANA for kiss codes,
initially populated with values defined in the RFC, but the list
may be modified or extended in the future, and unregistered kiss
codes, e.g., for experimentation and development, are possible (and
are being seen in the field).

Thus, IF the stratum value is zero AND the refid field begins with
a printable character, assume the refid field contains a kiss code
and print it (instead of current "(unspec)").
CHANGES
print-ntp.c
tests/ntp-v.out