/netbsd/crypto/external/bsd/openssh/dist/ |
H A D | addr.c | 51 masklen_valid(int af, u_int masklen) in masklen_valid() argument 55 return masklen <= 32 ? 0 : -1; in masklen_valid() 57 return masklen <= 128 ? 0 : -1; in masklen_valid() 347 addr_host_to_all0s(struct xaddr *a, u_int masklen) 360 addr_host_to_all1s(struct xaddr *a, u_int masklen) in addr_host_to_all1s() argument 460 long unsigned int masklen = 999; in addr_pton_cidr() local 470 masklen = strtoul(mp, &cp, 10); in addr_pton_cidr() 479 masklen = addr_unicast_masklen(tmp.af); in addr_pton_cidr() 480 if (masklen_valid(tmp.af, masklen) == -1) in addr_pton_cidr() 482 if (addr_host_is_all0s(&tmp, masklen) != 0) in addr_pton_cidr() [all …]
|
H A D | addrmatch.c | 54 u_int masklen, neg; in addr_match_list() local 72 r = addr_pton_cidr(cp, &match_addr, &masklen); in addr_match_list() 80 &match_addr, masklen) == 0) { in addr_match_list() 114 u_int masklen; in addr_match_cidr_list() local 150 r = addr_pton_cidr(cp, &match_addr, &masklen); in addr_match_cidr_list() 162 masklen) == 0) in addr_match_cidr_list()
|
H A D | addr.h | 58 int addr_host_is_all0s(const struct xaddr *n, u_int masklen); 59 int addr_host_to_all0s(struct xaddr *a, u_int masklen); 60 int addr_host_to_all1s(struct xaddr *a, u_int masklen); 62 u_int masklen);
|
H A D | ssh-keyscan.c | 643 u_int masklen; in do_host() local 647 if (addr_pton_cidr(host, &addr, &masklen) != 0) { in do_host() 654 if (addr_host_to_all1s(&end_addr, masklen) != 0) in do_host()
|
/netbsd/usr.sbin/rtadvd/ |
H A D | if.c | 371 int masklen; in prefixlen() local 373 for (masklen = 0; p < lim; p++) { in prefixlen() 376 masklen += 8; in prefixlen() 379 masklen += 7; in prefixlen() 382 masklen += 6; in prefixlen() 385 masklen += 5; in prefixlen() 388 masklen += 4; in prefixlen() 391 masklen += 3; in prefixlen() 394 masklen += 2; in prefixlen() 397 masklen += 1; in prefixlen() [all …]
|
/netbsd/usr.sbin/ip6addrctl/ |
H A D | ip6addrctl.c | 333 int masklen, final = 0; in mask2plen() local 336 masklen = 0; in mask2plen() 345 masklen += 8; in mask2plen() 348 masklen += 7; in mask2plen() 352 masklen += 6; in mask2plen() 356 masklen += 5; in mask2plen() 360 masklen += 4; in mask2plen() 364 masklen += 3; in mask2plen() 368 masklen += 2; in mask2plen() 372 masklen += 1; in mask2plen() [all …]
|
/netbsd/sbin/route/ |
H A D | rtutil.c | 603 int masklen, final = 0, illegal = 0; in netname6() local 610 masklen = 0; in netname6() 626 masklen += 8; in netname6() 629 masklen += 7; in netname6() 633 masklen += 6; in netname6() 637 masklen += 5; in netname6() 641 masklen += 4; in netname6() 645 masklen += 3; in netname6() 649 masklen += 2; in netname6() 653 masklen += 1; in netname6() [all …]
|
/netbsd/lib/libwrap/ |
H A D | hosts_access.c | 471 unsigned long masklen; in masked_match6() local 510 masklen = strtoul(mask_tok, &ep, 10); in masked_match6() 527 if (masklen / 8 > alen) in masked_match6() 529 memset(mp, 0xff, masklen / 8); in masked_match6() 530 if (masklen % 8) in masked_match6() 531 mp[masklen / 8] = 0xff00 >> (masklen % 8); in masked_match6()
|
/netbsd/sys/sys/ |
H A D | ptree.h | 147 #define PTN_SET_MASK_BITLEN(ptn,masklen) \ argument 148 PTN__INSERT((ptn)->ptn_nodedata, PTN_MASK_BITLEN, masklen)
|
/netbsd/sys/external/bsd/ipf/netinet/ |
H A D | radix_ipf.c | 104 int masklen; in buildnodes() local 109 masklen = 0; in buildnodes() 112 masklen = last - (u_32_t *)mask; in buildnodes() 121 nodes[0].addroff = nodes[0].addrkey + masklen; in buildnodes() 122 nodes[0].maskoff = nodes[0].maskkey + masklen; in buildnodes() 124 nodes[0].offset = masklen; in buildnodes() 126 nodes[1].offset = masklen; in buildnodes()
|
/netbsd/external/bsd/ipf/dist/ |
H A D | radix_ipf.c | 109 int masklen; local 114 masklen = 0; 117 masklen = last - (u_32_t *)mask; 127 nodes[0].addroff = nodes[0].addrkey + masklen; 128 nodes[0].maskoff = nodes[0].maskkey + masklen; 130 nodes[0].offset = masklen; 132 nodes[1].offset = masklen;
|
/netbsd/sbin/ifconfig/ |
H A D | parse.c | 460 size_t masklen; in paddr_match() local 468 masklen = paddr_prefix_size(mask); in paddr_match() 470 d = prop_data_create_copy(mask, masklen); in paddr_match()
|
/netbsd/sys/net/ |
H A D | rtsock_shared.c | 738 socklen_t masklen = sockaddr_getlen( in COMPATNAME() local 740 if (sa_len != 0 && sa_len > masklen) { in COMPATNAME() 742 memcpy(&netmask, info.rti_info[RTAX_NETMASK], masklen); in COMPATNAME() 743 memset((char *)&netmask + masklen, 0, sa_len - masklen); in COMPATNAME()
|
/netbsd/usr.sbin/mountd/ |
H A D | mountd.c | 1955 struct sockaddr *addrp, int addrlen, struct sockaddr *maskp, int masklen, in add_export_arg() argument 1986 if (masklen > 0) { in add_export_arg() 1987 export->ex_mask = emalloc(masklen); in add_export_arg() 1988 export->ex_masklen = masklen; in add_export_arg() 1989 memcpy(export->ex_mask, maskp, masklen); in add_export_arg()
|
/netbsd/external/bsd/libpcap/dist/ |
H A D | gencode.c | 6950 unsigned int masklen, struct qual q) in gen_mcode() argument 6975 if (masklen > 32) in gen_mcode() 6977 if (masklen == 0) { in gen_mcode() 6984 m = 0xffffffff << (32 - masklen); in gen_mcode() 6987 s1, masklen); in gen_mcode() 7147 if (sizeof(mask) * 8 < masklen) in gen_mcode6() 7150 memset(&mask, 0xff, masklen / 8); in gen_mcode6() 7151 if (masklen % 8) { in gen_mcode6() 7152 mask.s6_addr[masklen / 8] = in gen_mcode6() 7153 (0xff << (8 - masklen % 8)) & 0xff; in gen_mcode6() [all …]
|