Lines Matching defs:afd
66 static struct afd {
98 static int get_name(const char *, struct afd *,
141 #define GET_AI(ai, afd, addr, port) {\
144 ((afd)->a_socklen)))\
151 memset((ai)->ai_addr, 0, (afd)->a_socklen);\
152 SET_AILEN((ai), (afd)->a_socklen);\
153 (ai)->ai_addr->sa_family = (ai)->ai_family = (afd)->a_af;\
156 memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
335 struct afd *afd;
338 for (afd = &afdl[0]; afd->a_af; afd++) {
340 || pai->ai_family == afd->a_af)) {
348 s = socket(afd->a_af, SOCK_DGRAM, 0);
354 GET_AI(cur->ai_next, afd, afd->a_addrany, port);
359 GET_AI(cur->ai_next, afd, afd->a_loopback,
442 get_name(addr, afd, res, numaddr, pai, port0)
444 struct afd *afd;
454 hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
456 GET_AI(cur, afd, hp->h_addr_list[0], port);
459 GET_AI(cur, afd, numaddr, port);
548 struct afd *afd;
597 afd = &afdl[N_INET6];
604 afd = &afdl[N_INET];
611 afd = &afdl[N_INET];
613 afd = &afdl[N_INET6];
617 GET_AI(cur->ai_next, afd, ap, port);