X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/f555c163f90c9de17ebcef8313f86404c5174ca9..b8037ee9610ca42e2f6a9f4f71ccaa45f058475f:/print-null.c diff --git a/print-null.c b/print-null.c index bb7a1fd4..f5b03227 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.24 1999-10-07 23:47:12 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.26 1999-10-30 05:11:18 itojun Exp $ (LBL)"; #endif #include @@ -44,12 +44,15 @@ struct rtentry; #include #include #include -#include #include #include #include +#ifdef INET6 +#include +#endif + #include "interface.h" #include "addrtoname.h" @@ -80,6 +83,12 @@ null_print(const u_char *p, const struct ip *ip, u_int length) printf("ip: "); break; +#ifdef INET6 + case AF_INET6: + printf("ip6: "); + break; +#endif + case AF_NS: printf("ns: "); break; @@ -114,7 +123,14 @@ null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) if (eflag) null_print(p, ip, length); +#ifndef INET6 ip_print((const u_char *)ip, length); +#else + if (ip->ip_v == IPVERSION) + ip_print((const u_char *)ip, length); + else if (ip->ip_v == 6) + ip6_print((const u_char *)ip, length); +#endif /*INET6*/ if (xflag) default_print((const u_char *)ip, caplen - NULL_HDRLEN);