2004-07-23 Sowmini Varadhan <Sowmini.Varadhan@Sun.COM>

        * if_ioctl_solaris.c: HAVE_IPV6 ifdef fixups
        * zserv.c: ditto
        * ioctl_solaris.c: ditto.
        * interface.c: cast for LLADDR
        * interface.h: Add guards, include redistribute.h and remove
          extraneous definitions of zebra_interface_{up,down}_update
        * ioctl.h: Add AF_IOCTL define for non SOLARIS_IPV6
        * redistribute.h: include dependent header, zserv.h
        * zserv.h: include dependent header, rib.h
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c
index 9441abe..c05883c 100644
--- a/zebra/if_ioctl_solaris.c
+++ b/zebra/if_ioctl_solaris.c
@@ -137,11 +137,22 @@
   for (n = 0; n < lifconf.lifc_len; n += sizeof (struct lifreq))
     {
       ifp = if_get_by_name (lifreq->lifr_name);
+
       if (lifreq->lifr_addr.ss_family == AF_INET)
         ifp->flags |= IFF_IPV4;
+
       if (lifreq->lifr_addr.ss_family == AF_INET6)
-        ifp->flags |= IFF_IPV6;
+        {
+#ifdef HAVE_IPV6
+          ifp->flags |= IFF_IPV6;
+#else
+          lifreq++;
+          continue;
+#endif /* HAVE_IPV6 */
+        }
+        
       if_add_update (ifp);
+
       interface_info_ioctl (ifp);
       if_get_addr (ifp, (struct sockaddr *) &lifreq->lifr_addr);
       lifreq++;
@@ -265,7 +276,8 @@
           dest_pnt = (char *) &SIN (&dest)->sin_addr;
         }
     }
-  else
+#ifdef HAVE_IPV6
+  else if (af == AF_INET6)
     {
       if (ifp->flags & IFF_POINTOPOINT)
         {
@@ -285,15 +297,17 @@
             }
         }
     }
-
+#endif /* HAVE_IPV6 */
 
   /* Set address to the interface. */
   if (af == AF_INET)
     connected_add_ipv4 (ifp, 0, &SIN (addr)->sin_addr, prefixlen,
                         (struct in_addr *) dest_pnt, NULL);
-  else
+#ifdef HAVE_IPV6
+  else if (af == AF_INET6)
     connected_add_ipv6 (ifp, &SIN6 (addr)->sin6_addr, prefixlen,
                         (struct in6_addr *) dest_pnt);
+#endif /* HAVE_IPV6 */
 
   return 0;
 }
@@ -319,6 +333,7 @@
 struct connected *
 if_lookup_linklocal (struct interface *ifp)
 {
+#ifdef HAVE_IPV6
   listnode node;
   struct connected *ifc;
 
@@ -333,5 +348,7 @@
           (IN6_IS_ADDR_LINKLOCAL (&ifc->address->u.prefix6)))
         return ifc;
     }
+#endif /* HAVE_IPV6 */
+
   return NULL;
 }