Lines Matching refs:mask
404 in6_mask2len(mask, lim0)
405 struct in6_addr *mask;
412 if (lim0 == NULL || lim0 - (u_char *)mask > sizeof(*mask))
413 lim = (u_char *)mask + sizeof(*mask);
414 for (p = (u_char *)mask; p < lim; x++, p++) {
442 in6_len2mask(mask, len)
443 struct in6_addr *mask;
448 bzero(mask, sizeof(*mask));
450 mask->s6_addr8[i] = 0xff;
452 mask->s6_addr8[i] = (0xff00 >> (len % 8)) & 0xff;
1144 * convert mask to prefix length (prefixmask has already
1156 /* apply the mask for safety. */
1480 * Set the address family value for the mask if it was not set.
1489 * users to specify a (non 0) prefix length (mask) for a new address.
1490 * We also require the prefix (when specified) mask is valid, and thus
1491 * reject a non-consecutive mask.
1647 /* set prefix mask */
2365 struct in6_addr mask, candidate, match;
2369 bzero(&mask, sizeof(mask));
2372 in6_prefixlen2mask(&mask, iflr->prefixlen);
2376 match.s6_addr32[0] &= mask.s6_addr32[0];
2377 match.s6_addr32[1] &= mask.s6_addr32[1];
2378 match.s6_addr32[2] &= mask.s6_addr32[2];
2379 match.s6_addr32[3] &= mask.s6_addr32[3];
2392 in6_prefixlen2mask(&mask, 128);
2422 candidate.s6_addr32[0] &= mask.s6_addr32[0];
2423 candidate.s6_addr32[1] &= mask.s6_addr32[1];
2424 candidate.s6_addr32[2] &= mask.s6_addr32[2];
2425 candidate.s6_addr32[3] &= mask.s6_addr32[3];