]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-timed.c
add tracefiles for infinite loop testing
[tcpdump] / print-timed.c
index 0396cee94bad455254d88c27de563e173557e5ec..1be1348be487721a956dde8e7684c5e7fa4d7309 100644 (file)
@@ -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.7.2.2 2003-11-16 08:51:51 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;