Home
last modified time | relevance | path

Searched refs:afd (Results 1 – 9 of 9) sorted by relevance

/netbsd-src/external/bsd/libbind/dist/irs/
H A Dgetaddrinfo.c130 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 Dgetnameinfo.c73 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 Dsrvtest.c62 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 Dgetaddrinfo.c134 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 Dgetnameinfo.c83 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 Dgetnameinfo.c120 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 Dt_mapped.c168 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 Dcdplay.c153 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 Dssltestlib.c919 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()