Lines Matching defs:masklen
65 masklen_valid(int af, u_int masklen)
69 return masklen <= 32 ? 0 : -1;
71 return masklen <= 128 ? 0 : -1;
291 * Test whether host portion of address 'a', as determined by 'masklen'
297 addr_host_is_all0s(const struct xaddr *a, u_int masklen)
302 if (addr_hostmask(a->af, masklen, &tmp_mask) == -1)
317 long unsigned int masklen = 999;
327 masklen = strtoul(mp, &cp, 10);
328 if (*mp == '\0' || *cp != '\0' || masklen > 128)
336 masklen = addr_unicast_masklen(tmp.af);
337 if (masklen_valid(tmp.af, masklen) == -1)
339 if (addr_host_is_all0s(&tmp, masklen) != 0)
345 *l = masklen;
351 addr_netmatch(const struct xaddr *host, const struct xaddr *net, u_int masklen)
358 if (addr_netmask(host->af, masklen, &tmp_mask) == -1)
382 u_int masklen, neg;
400 r = addr_pton_cidr(cp, &match_addr, &masklen);
408 &match_addr, masklen) == 0) {