X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/8b67f771343e94182b048b0cae3ffe164dc37bb9..2075ea09c1535b547298fa47b51b2bfe41229032:/print-ntp.c?ds=inline diff --git a/print-ntp.c b/print-ntp.c index 924b7075..1d860b01 100644 --- a/print-ntp.c +++ b/print-ntp.c @@ -25,23 +25,15 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.30 2000-09-28 06:43:04 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.34 2002-08-01 08:53:21 risso Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include -#include -#include +#include -struct mbuf; -struct rtentry; - -#include - -#include #include #include @@ -64,7 +56,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 +150,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((u_char *)&(bp->refid), 4, NULL); break; case INFO_QUERY: