X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e89409254248af64db721ede4babbe9fd1753f6c..8fb0656b71083c70f6c749a5cb9ad7152abb2a9d:/print-null.c diff --git a/print-null.c b/print-null.c index c08f28dc..8e43bb5d 100644 --- a/print-null.c +++ b/print-null.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.32 2000-09-23 08:03:39 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,27 +36,21 @@ static const char rcsid[] = struct mbuf; struct rtentry; -#include #include -#include -#include -#include -#include -#include -#include #include #include #include -#ifdef INET6 -#include -#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 */ #endif @@ -124,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; @@ -134,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; }