]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-null.c
Patch sent to Debian by Roderick Schertler <[email protected]> to print
[tcpdump] / print-null.c
index cf9d6c497e425f5ba9a55b15322ce7c180a94dc8..8e43bb5dcba8c566590ab97405047cd2eddac2fc 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.34 2000-09-23 08:54:35 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.38 2000-10-07 05:53:13 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,23 +36,20 @@ static const char rcsid[] =
 
 struct mbuf;
 struct rtentry;
-#include <net/if.h>
 
 #include <netinet/in.h>
-#include <netinet/in_systm.h>
 
 #include <pcap.h>
 #include <stdio.h>
 #include <string.h>
 
-#ifdef INET6
-#include <netinet/ip6.h>
-#endif
-
 #include "interface.h"
 #include "addrtoname.h"
 
 #include "ip.h"
+#ifdef INET6
+#include "ip6.h"
+#endif
 
 #ifndef AF_NS
 #define AF_NS          6               /* XEROX NS protocols */
@@ -121,7 +118,7 @@ null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
        if (eflag)
                null_print(p, ip, length);
 
-       switch (ip->ip_v) {
+       switch (IP_V(ip)) {
        case 4:
                ip_print((const u_char *)ip, length);
                break;
@@ -131,7 +128,7 @@ null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
                break;
 #endif /* INET6 */
        default:
-               printf("ip v%d", ip->ip_v);
+               printf("ip v%d", IP_V(ip));
                break;
        }