#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.87 2000-09-23 08:54:31 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
#include <sys/socket.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include <stdio.h>
#include <stdlib.h>
(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;
return;
}
memcpy (&hdr, (char *)ip, 4);
- switch (hdr.ip_v) {
+ switch (IP_V(&hdr)) {
case 4:
ip_print (bp, length);
return;
return;
#endif
default:
- (void)printf("unknown ip %d", hdr.ip_v);
+ (void)printf("unknown ip %d", IP_V(&hdr));
return;
}
}