Lines Matching full:scope

230  * Get a scope of the address. Node-local, link-local, site-local or global.
314 * Validate the specified scope zone ID in the sin6_scope_id field. If the ID
317 * This routine then generates the kernel-internal form: if the address scope
336 * link-local scope IDs, and use interface indices as the in sa6_embedscope()
383 "%s: embedded scope mismatch: %s%%%d. " in sa6_recoverscope()
397 * Determine the appropriate scope zone ID for in6 and ifp. If ret_id is
406 int scope; in in6_setscope() local
418 scope = in6_addrscope(in6); in in6_setscope()
419 if (scope == IPV6_ADDR_SCOPE_INTFACELOCAL || in in6_setscope()
420 scope == IPV6_ADDR_SCOPE_LINKLOCAL) { in in6_setscope()
428 } else if (scope != IPV6_ADDR_SCOPE_GLOBAL) { in in6_setscope()
437 zoneid = sid->s6id_list[scope]; in in6_setscope()
449 * Just clear the embedded scope identifier. Return 0 if the original address
467 * Return the scope identifier or zero.
480 * Returns scope zone id for the unicast address @in6.
503 * link-local scope.
513 * Return zone id for the specified scope.
516 in6_getscopezone(const struct ifnet *ifp, int scope) in in6_getscopezone() argument
519 if (scope == IPV6_ADDR_SCOPE_INTFACELOCAL || in in6_getscopezone()
520 scope == IPV6_ADDR_SCOPE_LINKLOCAL) in in6_getscopezone()
522 if (scope >= 0 && scope < IPV6_ADDR_SCOPES_COUNT) in in6_getscopezone()
523 return (SID(ifp)->s6id_list[scope]); in in6_getscopezone()
528 * Extracts scope from address @dst, stores cleared address
556 int scope; in sa6_checkzone() local
558 scope = in6_addrscope(&sa6->sin6_addr); in sa6_checkzone()
559 if (scope == IPV6_ADDR_SCOPE_GLOBAL) in sa6_checkzone()
562 scope != IPV6_ADDR_SCOPE_LINKLOCAL && in sa6_checkzone()
563 scope != IPV6_ADDR_SCOPE_INTFACELOCAL) { in sa6_checkzone()
565 sa6->sin6_scope_id = V_sid_default.s6id_list[scope]; in sa6_checkzone()
576 sa6->sin6_scope_id = in6_getscopezone(V_loif, scope); in sa6_checkzone()
577 else if (sa6->sin6_scope_id != in6_getscopezone(V_loif, scope)) in sa6_checkzone()
584 sa6->sin6_scope_id = V_sid_default.s6id_list[scope]; in sa6_checkzone()
596 int scope; in sa6_checkzone_ifp() local
598 scope = in6_addrscope(&sa6->sin6_addr); in sa6_checkzone_ifp()
599 if (scope == IPV6_ADDR_SCOPE_LINKLOCAL || in sa6_checkzone_ifp()
600 scope == IPV6_ADDR_SCOPE_INTFACELOCAL) { in sa6_checkzone_ifp()
602 sa6->sin6_scope_id = in6_getscopezone(ifp, scope); in sa6_checkzone_ifp()
604 } else if (sa6->sin6_scope_id != in6_getscopezone(ifp, scope)) in sa6_checkzone_ifp()