#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.30 2003-06-03 23:49:22 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.31 2003-06-07 11:57:54 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
#include "extract.h"
#include "ip6.h"
+#include "ipproto.h"
/*
* print an IP6 datagram.
while (cp < snapend) {
cp += advance;
-#ifndef IPPROTO_SCTP
-#define IPPROTO_SCTP 132
-#endif
if (cp == (const u_char *)(ip6 + 1)
&& nh != IPPROTO_TCP && nh != IPPROTO_UDP
&& nh != IPPROTO_SCTP) {
nh = *cp;
fragmented = 1;
break;
-#ifndef IPPROTO_MOBILITY
-#define IPPROTO_MOBILITY 62
-#endif
+
case IPPROTO_MOBILITY:
/*
* XXX - we don't use "advance"; is this
len -= padlen;
break;
}
-#ifndef IPPROTO_IPCOMP
-#define IPPROTO_IPCOMP 108
-#endif
case IPPROTO_IPCOMP:
{
int enh;
break;
}
-#ifndef IPPROTO_PIM
-#define IPPROTO_PIM 103
-#endif
case IPPROTO_PIM:
pim_print(cp, len);
goto end;
-#ifndef IPPROTO_OSPF
-#define IPPROTO_OSPF 89
-#endif
case IPPROTO_OSPF:
ospf6_print(cp, len);
goto end;
+
case IPPROTO_IPV6:
ip6_print(cp, len);
goto end;
-#ifndef IPPROTO_IPV4
-#define IPPROTO_IPV4 4
-#endif
+
case IPPROTO_IPV4:
ip_print(cp, len);
goto end;
+
case IPPROTO_NONE:
(void)printf("no next header");
goto end;