]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-mobile.c
When checking for pcap_if_t, add $V_INCLS to CFLAGS, so we look at the
[tcpdump] / print-mobile.c
index f217932a4f9ae26b90dbe7d39c0dcfd84c0ac610..816ffd6e65859917f76da3960b47629d2557a6c7 100644 (file)
 #endif
 
 #ifndef lint
-static const char rcsid[] =
-     "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.7 2001-08-20 17:53:54 fenner Exp $";
+static const char rcsid[] _U_ =
+     "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.15 2004-03-24 01:58:14 guy Exp $";
 #endif
 
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <sys/socket.h>
+#include <tcpdump-stdinc.h>
 
-#include <netinet/in.h>
-
-#include <netdb.h>
 #include <stdio.h>
 
 #include "interface.h"
@@ -83,7 +77,7 @@ mobile_print(const u_char *bp, u_int length)
 
        mob = (const struct mobile_ip *)bp;
 
-       if (length < MOBILE_SIZE) {
+       if (length < MOBILE_SIZE || !TTEST(*mob)) {
                fputs("[|mobile]", stdout);
                return;
        }
@@ -95,7 +89,7 @@ mobile_print(const u_char *bp, u_int length)
                osp=1;
                cp +=4 ;
        }
-       
+
        if (osp)  {
                fputs("[S] ",stdout);
                if (vflag)