tcpdump
tcpdump copied to clipboard
Print NTP kiss codes for NTP debugging
NTPv4 (RFC 5905, section 7.4) and SNTPv4 (RFC 4330, section 8) formalize that if the stratum value is zero, the refid may contain a printable ("designed for character displays and log files"), left justified, zero filled ASCII string for status reporting and debugging ("kiss code"). Some kiss codes are defined in the RFCs, 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.