From 05b585380ebb9e5b2aa39b18a0700988052fabf9 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 19 Sep 2005 19:36:50 +0000 Subject: remove the unused in6_ifindex2scopeid() if at all, it works with site-local addresses whose fate is uncertain to say the least From drochner NetBSD ok deraadt@ --- sys/netinet6/in6.c | 28 +--------------------------- sys/netinet6/in6_var.h | 3 +-- 2 files changed, 2 insertions(+), 29 deletions(-) (limited to 'sys') diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 2f5609ef0ca..21a571257f8 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.60 2004/10/07 12:08:25 henning Exp $ */ +/* $OpenBSD: in6.c,v 1.61 2005/09/19 19:36:49 brad Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -276,32 +276,6 @@ in6_ifremloop(struct ifaddr *ifa) } } -int -in6_ifindex2scopeid(idx) - int idx; -{ - struct ifnet *ifp; - struct ifaddr *ifa; - struct sockaddr_in6 *sin6; - - if (idx < 0 || if_indexlim <= idx) - return -1; - ifp = ifindex2ifnet[idx]; - if (!ifp) - return -1; - - for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = ifa->ifa_list.tqe_next) - { - if (ifa->ifa_addr->sa_family != AF_INET6) - continue; - sin6 = (struct sockaddr_in6 *)ifa->ifa_addr; - if (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr)) - return sin6->sin6_scope_id & 0xffff; - } - - return -1; -} - int in6_mask2len(mask, lim0) struct in6_addr *mask; diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 9dfc3bf1a62..f1de565a740 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_var.h,v 1.24 2004/06/16 02:38:23 itojun Exp $ */ +/* $OpenBSD: in6_var.h,v 1.25 2005/09/19 19:36:49 brad Exp $ */ /* $KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $ */ /* @@ -569,7 +569,6 @@ struct in6_multi *in6_addmulti(struct in6_addr *, struct ifnet *, int *); void in6_delmulti(struct in6_multi *); struct in6_multi_mship *in6_joingroup(struct ifnet *, struct in6_addr *, int *); int in6_leavegroup(struct in6_multi_mship *); -int in6_ifindex2scopeid(int); int in6_mask2len(struct in6_addr *, u_char *); int in6_control(struct socket *, u_long, caddr_t, struct ifnet *, struct proc *); -- cgit v1.2.3