]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf6.c
Add SunATM support, based on code from Yen Yen Lim at North Dakota State
[tcpdump] / print-ospf6.c
index e5944b854f8a0f6d11ebe0aa7567b7cde2f0d415..ec18eacec6eca0284f95d16b3b34181a47caaaa6 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.5 2000-09-23 08:54:36 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
@@ -35,7 +35,6 @@ static const char rcsid[] =
 #include <sys/socket.h>
 
 #include <netinet/in.h>
-#include <netinet/in_systm.h>
 
 #include <ctype.h>
 #include <stdio.h>
@@ -242,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);
@@ -360,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);
@@ -380,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);