Lines Matching refs:in6
397 * Determine the appropriate scope zone ID for in6 and ifp. If ret_id is
399 * in the in6_addr structure, in6 will be modified.
404 in6_setscope(struct in6_addr *in6, struct ifnet *ifp, u_int32_t *ret_id)
414 if (IN6_IS_ADDR_LOOPBACK(in6)) {
418 scope = in6_addrscope(in6);
427 in6->s6_addr16[1] = htons(zoneid & 0xffff); /* XXX */
453 in6_clearscope(struct in6_addr *in6)
457 if (IN6_IS_SCOPE_LINKLOCAL(in6) || IN6_IS_ADDR_MC_INTFACELOCAL(in6)) {
458 if (in6->s6_addr16[1] != 0)
460 in6->s6_addr16[1] = 0;
470 in6_getscope(const struct in6_addr *in6)
473 if (IN6_IS_SCOPE_LINKLOCAL(in6) || IN6_IS_ADDR_MC_INTFACELOCAL(in6))
474 return (in6->s6_addr16[1]);
480 * Returns scope zone id for the unicast address @in6.
486 in6_get_unicast_scopeid(const struct in6_addr *in6, const struct ifnet *ifp)
489 if (IN6_IS_SCOPE_LINKLOCAL(in6))
495 in6_set_unicast_scopeid(struct in6_addr *in6, uint32_t scopeid)
498 in6->s6_addr16[1] = htons(scopeid & 0xffff);