summaryrefslogtreecommitdiff
path: root/zebra/ioctl_solaris.c
diff options
context:
space:
mode:
authorpaul <paul>2004-07-23 15:26:14 +0000
committerpaul <paul>2004-07-23 15:26:14 +0000
commit5b73a671aac22a75cc90657aa4a924d199f2284b (patch)
tree8716d34430c239cb994ba286db18efb24eb09319 /zebra/ioctl_solaris.c
parent1470bafb7aa179dad7dc4bdc998d68c14752f824 (diff)
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
Diffstat (limited to 'zebra/ioctl_solaris.c')
-rw-r--r--zebra/ioctl_solaris.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c
index 805a9ca0..7b4dde36 100644
--- a/zebra/ioctl_solaris.c
+++ b/zebra/ioctl_solaris.c
@@ -80,10 +80,11 @@ if_ioctl (u_long request, caddr_t buffer)
return 0;
}
-#ifdef HAVE_IPV6
+
int
if_ioctl_ipv6 (u_long request, caddr_t buffer)
{
+#ifdef HAVE_IPV6
int sock;
int ret = 0;
int err = 0;
@@ -116,9 +117,10 @@ if_ioctl_ipv6 (u_long request, caddr_t buffer)
errno = err;
return ret;
}
+#endif /* HAVE_IPV6 */
+
return 0;
}
-#endif /* HAVE_IPV6 */
/*
* get interface metric
@@ -134,8 +136,10 @@ if_get_metric (struct interface *ifp)
if (ifp->flags & IFF_IPV4)
ret = AF_IOCTL (AF_INET, SIOCGLIFMETRIC, (caddr_t) & lifreq);
+#ifdef SOLARIS_IPV6
else if (ifp->flags & IFF_IPV6)
ret = AF_IOCTL (AF_INET6, SIOCGLIFMETRIC, (caddr_t) & lifreq);
+#endif /* SOLARIS_IPV6 */
else
ret = -1;
@@ -171,10 +175,13 @@ if_get_mtu (struct interface *ifp)
}
}
-
+#ifdef HAVE_IPV6
if ((ifp->flags & IFF_IPV6) == 0)
-
+ return;
+
+ memset(&lifreq, 0, sizeof(lifreq));
lifreq_set_name (&lifreq, ifp);
+
ret = AF_IOCTL (AF_INET6, SIOCGLIFMTU, (caddr_t) & lifreq);
if (ret < 0)
{
@@ -185,6 +192,7 @@ if_get_mtu (struct interface *ifp)
{
ifp->mtu6 = lifreq.lifr_metric;
}
+#endif /* HAVE_IPV6 */
}
/* Set up interface's address, netmask (and broadcast? ).