]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ntp.c
There's no link-layer header on Linux ARPHRD_ATM packets; there's
[tcpdump] / print-ntp.c
index 97419790dde4599e2d0915dec9d7e7a3a5c57a37..8e795cbc88152849ebe1a76ff11a9aa60ae0e7b0 100644 (file)
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.26 1999-10-07 23:47:12 mcr Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.32 2001-08-20 15:36:57 fenner Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
 #endif
 
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/socket.h>
 
-#if __STDC__
-struct mbuf;
-struct rtentry;
-#endif
-#include <net/if.h>
-
 #include <netinet/in.h>
-#include <netinet/if_ether.h>
 
 #include <ctype.h>
 #include <stdio.h>
@@ -64,7 +61,6 @@ ntp_print(register const u_char *cp, u_int length)
 {
        register const struct ntpdata *bp;
        int mode, version, leapind;
-       static char rclock[5];
 
        bp = (struct ntpdata *)cp;
        /* Note funny sized packets */
@@ -159,9 +155,7 @@ ntp_print(register const u_char *cp, u_int length)
                break;
 
        case PRIM_REF:
-               strncpy(rclock, (char *)&(bp->refid), 4);
-               rclock[4] = '\0';
-               fputs(rclock, stdout);
+               fn_printn((char *)&(bp->refid), 4, NULL);
                break;
 
        case INFO_QUERY: