X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/c422d3ab0f6de2d38512a4566637bc47df291e74..c519841be2fe87b3cdd9dc45fa7eb8b4266d40a5:/print-timed.c diff --git a/print-timed.c b/print-timed.c index 0396cee9..55fbb39e 100644 --- a/print-timed.c +++ b/print-timed.c @@ -20,8 +20,8 @@ */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.6 2002-09-05 21:25:50 guy Exp $"; +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.9 2003-11-16 09:36:40 guy Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -35,6 +35,7 @@ static const char rcsid[] = #include "timed.h" #include "interface.h" +#include "extract.h" static const char *tsptype[TSPTYPENUMBER] = { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP", @@ -85,8 +86,8 @@ timed_print(register const u_char *bp) fputs(" [|timed]", stdout); return; } - sec = ntohl((long)tsp->tsp_time.tv_sec); - usec = ntohl((long)tsp->tsp_time.tv_usec); + sec = EXTRACT_32BITS(&tsp->tsp_time.tv_sec); + usec = EXTRACT_32BITS(&tsp->tsp_time.tv_usec); if (usec < 0) /* corrupt, skip the rest of the packet */ return;