]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip6.c
Update from current NetBSD version of ieee80211_radiotap.h.
[tcpdump] / print-ip6.c
index e5cb504b79868724fee3a64939fed9972af34338..6294a13238b8b62f7185eca3c91a1384630eb73d 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.44 2004-07-16 14:06:00 hannes Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.47.2.3 2005-09-20 06:05:38 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -63,7 +63,7 @@ ip6_print(register const u_char *bp, register u_int length)
 
        TCHECK(*ip6);
        if (length < sizeof (struct ip6_hdr)) {
-               (void)printf("truncated-ip6 %d", length);
+               (void)printf("truncated-ip6 %u", length);
                return;
        }
 
@@ -73,7 +73,7 @@ ip6_print(register const u_char *bp, register u_int length)
        payload_len = EXTRACT_16BITS(&ip6->ip6_plen);
        len = payload_len + sizeof(struct ip6_hdr);
        if (length < len)
-               (void)printf("truncated-ip6 - %d bytes missing!",
+               (void)printf("truncated-ip6 - %u bytes missing!",
                        len - length);
 
         if (vflag) {
@@ -93,7 +93,7 @@ ip6_print(register const u_char *bp, register u_int length)
                (void)printf("flowlabel 0x%05x, ", flow & 0x000fffff);
 #endif
 
-            (void)printf("hlim %u, next-header: %s (%u), payload-len %u) ",
+            (void)printf("hlim %u, next-header: %s (%u), length: %u) ",
                          ip6->ip6_hlim,
                          tok2str(ipproto_values,"unknown",ip6->ip6_nxt),
                          ip6->ip6_nxt,
@@ -116,7 +116,7 @@ ip6_print(register const u_char *bp, register u_int length)
 
                if (cp == (const u_char *)(ip6 + 1) &&
                    nh != IPPROTO_TCP && nh != IPPROTO_UDP &&
-                   nh != IPPROTO_SCTP) {
+                   nh != IPPROTO_DCCP && nh != IPPROTO_SCTP) {
                        (void)printf("%s > %s: ", ip6addr_string(&ip6->ip6_src),
                                     ip6addr_string(&ip6->ip6_dst));
                }
@@ -160,6 +160,9 @@ ip6_print(register const u_char *bp, register u_int length)
                case IPPROTO_SCTP:
                        sctp_print(cp, (const u_char *)ip6, len);
                        return;
+               case IPPROTO_DCCP:
+                       dccp_print(cp, (const u_char *)ip6, len);
+                       return;
                case IPPROTO_TCP:
                        tcp_print(cp, len, (const u_char *)ip6, fragmented);
                        return;
@@ -192,6 +195,7 @@ ip6_print(register const u_char *bp, register u_int length)
                case IPPROTO_PIM:
                        pim_print(cp, len);
                        return;
+
                case IPPROTO_OSPF:
                        ospf6_print(cp, len);
                        return;
@@ -201,7 +205,19 @@ ip6_print(register const u_char *bp, register u_int length)
                        return;
 
                case IPPROTO_IPV4:
-                       ip_print(cp, len);
+                       ip_print(gndo, cp, len);
+                       return;
+
+                case IPPROTO_PGM:
+                        pgm_print(cp, len, (const u_char *)ip6);
+                        return;
+
+               case IPPROTO_GRE:
+                       gre_print(cp, len);
+                       return;
+
+               case IPPROTO_RSVP:
+                       rsvp_print(cp, len);
                        return;
 
                case IPPROTO_NONE: