]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ntp.c
GRE: Refine the WCCP header commit. [skip ci]
[tcpdump] / print-ntp.c
index 499585fd1dfe44bd6c92b48954a45796a8181dce..d41f515218beb6ff995da398f1707eb5bfd6be34 100644 (file)
@@ -38,8 +38,6 @@
 
 #include "netdissect-stdinc.h"
 
-#include <time.h>
-
 #define ND_LONGJMP_FROM_TCHECK
 #include "netdissect.h"
 #include "addrtoname.h"
@@ -179,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 }
 };
 
@@ -300,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),