FreeBSD/sys/netinet6/scope6.c
/*
 * Return zone id for the specified scope.
 */
Return zone id for the specified scope.
Return zone id for the specified scope .
uint32_t
in6_getscopezone(const struct ifnet *ifp, int scope)
{
	if (scope == IPV6_ADDR_SCOPE_INTFACELOCAL ||
	    scope == IPV6_ADDR_SCOPE_LINKLOCAL)
		return (ifp->if_index);
	if (scope >= 0 && scope < IPV6_ADDR_SCOPES_COUNT)
		return (SID(ifp)->s6id_list[scope]);
	return (0);
}
uint32_t in6_getscopezone ( const struct ifnet * ifp , int scope ) { if ( scope == IPV6_ADDR_SCOPE_INTFACELOCAL || scope == IPV6_ADDR_SCOPE_LINKLOCAL ) return ( ifp -> if_index ) ; if ( scope >= 0 && scope < IPV6_ADDR_SCOPES_COUNT ) return ( SID ( ifp ) -> s6id_list [ scope ] ) ; return ( 0 ) ; }
Return zone id for the specified scope.
Return zone id for the specified scope .