#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.26 1999-10-30 05:11:18 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.29 1999-11-21 12:38:24 itojun Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
#endif
#include <sys/param.h>
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*/
+ switch (ip->ip_v) {
+ case 4 :
+ ip_print((const void *)ip, length);
+ break;
+#ifdef INET6
+ case 6:
+ ip6_print((const void *)ip, length);
+ break;
+#endif /* INET6 */
+ default :
+ printf("ip v%d", ip->ip_v);
+ break;
+ }
if (xflag)
default_print((const u_char *)ip, caplen - NULL_HDRLEN);