]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-icmp6.c
From Kazushi Sugyo: patches for draft-ietf-mobile-ipv6-18.
[tcpdump] / print-icmp6.c
index babf1b28c52a962df8381223e518c3bfcbc533bf..b3711b6c6c34896f3d7009bbeb996962f31659b5 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.64 2002-08-06 04:42:05 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.65 2002-09-05 00:52:30 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -373,11 +373,17 @@ icmp6_print(const u_char *bp, const u_char *bp2)
                break;
        case ICMP6_MOBILEPREFIX_SOLICIT:
                printf("icmp6: mobile router solicitation");
+               if (vflag) {
+                       TCHECK(dp->icmp6_data16[0]);
+                       printf("(id=%d)", ntohs(dp->icmp6_data16[0]));
+               }
                break;
        case ICMP6_MOBILEPREFIX_ADVERT:
                printf("icmp6: mobile router advertisement");
                if (vflag) {
-#define MPADVLEN 4
+                       TCHECK(dp->icmp6_data16[0]);
+                       printf("(id=%d)", ntohs(dp->icmp6_data16[0]));
+#define MPADVLEN 6
                        icmp6_opt_print((const u_char *)dp + MPADVLEN,
                                        icmp6len - MPADVLEN);
                }