X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/4460e45d9e798a0e056ded78b657b3a92a305386..8b67f771343e94182b048b0cae3ffe164dc37bb9:/print-null.c?ds=sidebyside diff --git a/print-null.c b/print-null.c index 96d83cdc..d4750c43 100644 --- a/print-null.c +++ b/print-null.c @@ -21,7 +21,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.27 1999-11-21 03:48:05 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.35 2000-09-28 06:43:05 guy Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -30,20 +34,11 @@ static const char rcsid[] = #include #include -#if __STDC__ struct mbuf; struct rtentry; -#endif -#include #include #include -#include -#include -#include -#include -#include -#include #include #include @@ -56,6 +51,8 @@ struct rtentry; #include "interface.h" #include "addrtoname.h" +#include "ip.h" + #ifndef AF_NS #define AF_NS 6 /* XEROX NS protocols */ #endif @@ -124,15 +121,15 @@ null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) null_print(p, ip, length); switch (ip->ip_v) { - case 4 : - ip_print((const void *)ip, length); + case 4: + ip_print((const u_char *)ip, length); break; #ifdef INET6 case 6: - ipv6_print((const void *)ip, length); + ip6_print((const u_char *)ip, length); break; #endif /* INET6 */ - default : + default: printf("ip v%d", ip->ip_v); break; }