]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rt6.c
When checking for pcap_if_t, add $V_INCLS to CFLAGS, so we look at the
[tcpdump] / print-rt6.c
index dd55d1fce3c078fe2cfaea20ec795b2e5547bf48..822ae7cc3a41111781324b80fadcf43742cd2372 100644 (file)
@@ -20,8 +20,8 @@
  */
 
 #ifndef lint
-static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.21 2002-08-01 08:53:26 risso Exp $";
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.26 2003-11-19 00:36:08 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -38,6 +38,7 @@ static const char rcsid[] =
 
 #include "interface.h"
 #include "addrtoname.h"
+#include "extract.h"
 
 int
 rt6_print(register const u_char *bp, register const u_char *bp2)
@@ -70,13 +71,13 @@ rt6_print(register const u_char *bp, register const u_char *bp2)
 #define IPV6_RTHDR_TYPE_2 2
 #endif
        case IPV6_RTHDR_TYPE_0:
-       case IPV6_RTHDR_TYPE_2:                 /* Mobile IPv6 ID-17 */
+       case IPV6_RTHDR_TYPE_2:                 /* Mobile IPv6 ID-20 */
                dp0 = (struct ip6_rthdr0 *)dp;
 
                TCHECK(dp0->ip6r0_reserved);
                if (dp0->ip6r0_reserved || vflag) {
                        printf(", rsv=0x%0x",
-                           (u_int32_t)ntohl(dp0->ip6r0_reserved));
+                           EXTRACT_32BITS(&dp0->ip6r0_reserved));
                }
 
                if (len % 2 == 1)
@@ -101,6 +102,6 @@ rt6_print(register const u_char *bp, register const u_char *bp2)
 
  trunc:
        fputs("[|srcrt]", stdout);
-       return 65535;           /* XXX */
+       return -1;
 }
 #endif /* INET6 */