X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/695ce83d0ad8eeaec1e1dec218279ac2d2168189..86bed03b4740e542339f45dba70a556bb8433758:/print-ntp.c diff --git a/print-ntp.c b/print-ntp.c index f4ea80f6..d41f5152 100644 --- a/print-ntp.c +++ b/print-ntp.c @@ -177,7 +177,7 @@ static const struct tok ntp_leapind_values[] = { static const struct tok ntp_stratum_values[] = { { UNSPECIFIED, "unspecified" }, - { PRIM_REF, "primary reference" }, + { PRIM_REF, "primary reference" }, { 0, NULL } }; @@ -298,16 +298,16 @@ ntp_time_print(netdissect_options *ndo, p_ntp_delta(ndo, &(bp->org_timestamp), &(bp->xmt_timestamp)); /* FIXME: this code is not aware of any extension fields */ - if (length == NTP_TIMEMSG_MINLEN + 4) { /* Optional: key-id (crypto-NAK) */ + if (length == NTP_TIMEMSG_MINLEN + 4) { /* Optional: key-id (crypto-NAK) */ ND_PRINT("\n\tKey id: %u", GET_BE_U_4(bp->key_id)); - } else if (length == NTP_TIMEMSG_MINLEN + 4 + 16) { /* Optional: key-id + 128-bit digest */ + } else if (length == NTP_TIMEMSG_MINLEN + 4 + 16) { /* Optional: key-id + 128-bit digest */ ND_PRINT("\n\tKey id: %u", GET_BE_U_4(bp->key_id)); ND_PRINT("\n\tAuthentication: %08x%08x%08x%08x", GET_BE_U_4(bp->message_digest), GET_BE_U_4(bp->message_digest + 4), GET_BE_U_4(bp->message_digest + 8), GET_BE_U_4(bp->message_digest + 12)); - } else if (length == NTP_TIMEMSG_MINLEN + 4 + 20) { /* Optional: key-id + 160-bit digest */ + } else if (length == NTP_TIMEMSG_MINLEN + 4 + 20) { /* Optional: key-id + 160-bit digest */ ND_PRINT("\n\tKey id: %u", GET_BE_U_4(bp->key_id)); ND_PRINT("\n\tAuthentication: %08x%08x%08x%08x%08x", GET_BE_U_4(bp->message_digest),