]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip.c
Patch sent to Debian by Roderick Schertler <[email protected]> to print
[tcpdump] / print-ip.c
index 6500767b22a528da1ff9b1cf0e33524a5be0ea71..505cf847b665b9f5b9c6969aa44357ef7cf93dc2 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.88 2000-09-29 04:58:40 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.89 2000-10-03 02:54:58 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -443,7 +443,7 @@ ip_print(register const u_char *bp, register u_int length)
                (void)printf("truncated-ip %d", length);
                return;
        }
-       hlen = ip->ip_hl * 4;
+       hlen = IP_HL(ip) * 4;
        if (hlen < sizeof (struct ip)) {
                (void)printf("bad-hlen %d", hlen);
                return;
@@ -736,7 +736,7 @@ ipN_print(register const u_char *bp, register u_int length)
                return;
        }
        memcpy (&hdr, (char *)ip, 4);
-       switch (hdr.ip_v) {
+       switch (IP_V(&hdr)) {
        case 4:
            ip_print (bp, length);
            return;
@@ -746,7 +746,7 @@ ipN_print(register const u_char *bp, register u_int length)
            return;
 #endif
        default:
-           (void)printf("unknown ip %d", hdr.ip_v);
+           (void)printf("unknown ip %d", IP_V(&hdr));
            return;
        }
 }