| /netbsd-src/external/bsd/libbind/dist/irs/ |
| H A D | getaddrinfo.c | 130 static const struct afd { struct 190 const struct afd *, const char *)); 194 static const struct afd *find_afd __P((int)); 227 #define GET_AI(ai, afd, addr) \ argument 230 (ai) = get_ai(pai, (afd), (addr)); \ 740 const struct afd *afd; local 749 afd = find_afd(pai->ai_family); 750 if (afd == NULL) 754 GET_AI(cur->ai_next, afd, afd->a_addrany); 760 GET_AI(cur->ai_next, afd, afd->a_loopback); [all …]
|
| H A D | getnameinfo.c | 73 static struct afd { struct 111 struct afd *afd; local 136 afd = &afdl[i]; 142 if (salen != afd->a_socklen) return EAI_FAIL; 145 addr = (const char *)sa + afd->a_off; 200 hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af); 214 switch(afd->a_af) { 227 if (inet_ntop(afd->a_af, addr, numaddr,
|
| /netbsd-src/external/bsd/blocklist/test/ |
| H A D | srvtest.c | 62 process_tcp(int afd) in process_tcp() argument 69 if ((n = read(afd, buffer, sizeof(buffer))) == -1) in process_tcp() 72 printf("%s: sending %d %s\n", getprogname(), afd, buffer); in process_tcp() 74 blocklist_r(b, 1, afd, buffer); in process_tcp() 76 blocklist(1, afd, buffer); in process_tcp() 82 process_udp(int afd) in process_udp() argument 93 if ((n = recvfrom(afd, buffer, sizeof(buffer), 0, (void *)&ss, in process_udp() 97 printf("%s: sending %d %s\n", getprogname(), afd, buffer); in process_udp() 98 blocklist_sa(1, afd, (void *)&ss, slen, buffer); in process_udp() 142 int afd; in handle() local [all …]
|
| /netbsd-src/lib/libc/net/ |
| H A D | getaddrinfo.c | 134 static const struct afd { struct 249 const struct afd *, const char *); 254 static const struct afd *find_afd(int); 317 #define GET_AI(ai, afd, addr) \ argument 320 (ai) = get_ai(pai, (afd), (addr)); \ 1224 const struct afd *afd; in explore_null() local 1254 afd = find_afd(pai->ai_family); in explore_null() 1255 if (afd == NULL) in explore_null() 1259 GET_AI(cur->ai_next, afd, afd->a_addrany); in explore_null() 1265 GET_AI(cur->ai_next, afd, afd->a_loopback); in explore_null() [all …]
|
| H A D | getnameinfo.c | 83 static const struct afd { struct 253 const struct afd *afd; in getnameinfo_inet() local 273 afd = &afdl[i]; in getnameinfo_inet() 279 if (salen < afd->a_socklen) in getnameinfo_inet() 284 addr = (const char *)(const void *)sa + afd->a_off; in getnameinfo_inet() 370 switch(afd->a_af) { in getnameinfo_inet() 383 if (inet_ntop(afd->a_af, addr, numaddr, in getnameinfo_inet() 396 hp = gethostbyaddr_r(addr, afd->a_addrlen, afd->a_af, &hent, in getnameinfo_inet() 432 switch(afd->a_af) { in getnameinfo_inet() 446 if (inet_ntop(afd->a_af, addr, host, in getnameinfo_inet()
|
| /netbsd-src/external/mpl/dhcp/bind/dist/lib/irs/ |
| H A D | getnameinfo.c | 120 static struct afd { struct 153 struct afd *afd = NULL; local 187 afd = &afdl[i]; 195 if (salen != afd->a_socklen) { 264 if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr)) == 270 if (afd->a_af == AF_INET6 && 425 if (inet_ntop(afd->a_af, addr, numaddr,
|
| /netbsd-src/tests/net/net/ |
| H A D | t_mapped.c | 168 int sfd = -1, cfd = -1, afd = -1; in test() local 208 afd = accept(sfd, (struct sockaddr *)&paddr, &plen); in test() 209 if (afd == -1) in test() 223 if (read(afd, buf, sizeof(mymsg)) != sizeof(mymsg)) in test() 229 (void)close(afd); in test() 239 (void)close(afd); in test()
|
| /netbsd-src/usr.bin/cdplay/ |
| H A D | cdplay.c | 153 int afd; member 254 da.afd = -1; in main() 392 if (da.afd == -1 && !openaudio()) { in start_digital() 422 close(da.afd); in start_analog() 423 da.afd = -1; in start_analog() 888 (void)write(da.afd, da.aubuf, aulen); in sig_timer() 1400 if (da.afd > -1) in openaudio() 1402 da.afd = open(da.auname, O_WRONLY); in openaudio() 1403 if (da.afd < 0) { in openaudio() 1410 rc = ioctl(da.afd, AUDIO_GETENC, &ae); in openaudio() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/test/helpers/ |
| H A D | ssltestlib.c | 919 int afd = -1, cfd = -1, sfd = -1; in create_test_sockets() local 925 afd = socket(AF_INET, SOCK_STREAM, 0); in create_test_sockets() 926 if (afd < 0) in create_test_sockets() 929 if (bind(afd, (struct sockaddr*)&sin, sizeof(sin)) < 0) in create_test_sockets() 932 if (getsockname(afd, (struct sockaddr*)&sin, &slen) < 0) in create_test_sockets() 935 if (listen(afd, 1) < 0) in create_test_sockets() 942 if (set_nb(afd) == -1) in create_test_sockets() 946 sfd = accept(afd, NULL, 0); in create_test_sockets() 969 if (afd != -1) in create_test_sockets() 970 close(afd); in create_test_sockets()
|