#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.28 2000-07-01 03:39:07 assar 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 <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
+#include <tcpdump-stdinc.h>
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-
-#include <netinet/in.h>
-#include <netinet/if_ether.h>
-
-#include <ctype.h>
#include <stdio.h>
#include <string.h>
{
register const struct ntpdata *bp;
int mode, version, leapind;
- static char rclock[5];
bp = (struct ntpdata *)cp;
/* Note funny sized packets */
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: