in6.c (81115) | in6.c (83130) |
---|---|
1/* $FreeBSD: head/sys/netinet6/in6.c 81115 2001-08-03 19:10:31Z ume $ */ | 1/* $FreeBSD: head/sys/netinet6/in6.c 83130 2001-09-06 02:40:43Z jlemon $ */ |
2/* $KAME: in6.c,v 1.187 2001/05/24 07:43:59 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 276 unchanged lines hidden (view full) --- 286 int idx; 287{ 288 struct ifnet *ifp; 289 struct ifaddr *ifa; 290 struct sockaddr_in6 *sin6; 291 292 if (idx < 0 || if_index < idx) 293 return -1; | 2/* $KAME: in6.c,v 1.187 2001/05/24 07:43:59 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 276 unchanged lines hidden (view full) --- 286 int idx; 287{ 288 struct ifnet *ifp; 289 struct ifaddr *ifa; 290 struct sockaddr_in6 *sin6; 291 292 if (idx < 0 || if_index < idx) 293 return -1; |
294 ifp = ifindex2ifnet[idx]; | 294 ifp = ifnet_byindex(idx); |
295 296 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) 297 { 298 if (ifa->ifa_addr->sa_family != AF_INET6) 299 continue; 300 sin6 = (struct sockaddr_in6 *)ifa->ifa_addr; 301 if (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr)) 302 return sin6->sin6_scope_id & 0xffff; --- 2150 unchanged lines hidden --- | 295 296 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) 297 { 298 if (ifa->ifa_addr->sa_family != AF_INET6) 299 continue; 300 sin6 = (struct sockaddr_in6 *)ifa->ifa_addr; 301 if (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr)) 302 return sin6->sin6_scope_id & 0xffff; --- 2150 unchanged lines hidden --- |