]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf6.c
better print the IP addresses native than using getname();
[tcpdump] / print-ospf6.c
index 083b2a1db3476dbbaaab62b1d1cfab6491692bbc..ec18eacec6eca0284f95d16b3b34181a47caaaa6 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.6 2000-09-29 04:58:45 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.8 2002-06-11 17:08:53 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -241,7 +241,7 @@ ospf6_print_lsaprefix(register const struct lsa_prefix *lsapp)
        }
        memset(&prefix, 0, sizeof(prefix));
        memcpy(&prefix, lsapp->lsa_p_prefix, k * 4);
-       printf(" %s/%d", ip6addr_string(&prefix), 
+       printf(" %s/%d", ip6addr_string(&prefix),
                lsapp->lsa_p_len);
        if (lsapp->lsa_p_opt)
                printf("(opt=%x)", lsapp->lsa_p_opt);
@@ -359,7 +359,7 @@ ospf6_print_lsa(register const struct lsa *lsap)
                flags32 = ntohl(lsap->lsa_un.un_asla.asla_metric);
                ospf6_print_bits(ospf6_asla_flag_bits, flags32);
                printf(" metric %u",
-                      ntohl(lsap->lsa_un.un_asla.asla_metric) &
+                      (u_int32_t)ntohl(lsap->lsa_un.un_asla.asla_metric) &
                       ASLA_MASK_METRIC);
                lsapp = lsap->lsa_un.un_asla.asla_prefix;
                k = ospf6_print_lsaprefix(lsapp);
@@ -379,7 +379,7 @@ ospf6_print_lsa(register const struct lsa *lsap)
 
                        if ((flags32 & ASLA_FLAG_ROUTETAG) != 0) {
                                TCHECK(*(u_int32_t *)ls_opt);
-                               printf(" tag %s", 
+                               printf(" tag %s",
                                       ipaddr_string((u_int32_t *)ls_opt));
 
                                ls_opt += sizeof(u_int32_t);