Lines Matching refs:afd
119 static const struct afd { struct
183 static int get_name (const char *, const struct afd *, struct addrinfo **,
188 const struct afd *, const char *);
191 static const struct afd *find_afd (int);
213 #define GET_AI(ai, afd, addr) \ argument
216 (ai) = get_ai(pai, (afd), (addr)); \
300 const struct afd *afd; local
444 for (afd = afdl; afd->a_af; afd++) {
447 if (!MATCH_FAMILY(pai->ai_family, afd->a_af, 1))
454 pai->ai_family = afd->a_af;
524 const struct afd *afd; local
543 afd = find_afd(pai->ai_family);
638 GET_AI(cur->ai_next, afd, ap);
651 get_name(ap, afd, &cur->ai_next,
689 const struct afd *afd; local
715 afd = find_afd(pai->ai_family);
718 GET_AI(cur->ai_next, afd, afd->a_addrany);
724 GET_AI(cur->ai_next, afd, afd->a_loopback);
751 const struct afd *afd; local
768 afd = find_afd(pai->ai_family);
771 if (inet_pton(afd->a_af, hostname, pton) == 1) {
777 switch (afd->a_af) {
795 if (pai->ai_family == afd->a_af ||
798 GET_AI(cur->ai_next, afd, pton);
811 get_name(pton, afd, &cur->ai_next,
843 const struct afd *afd;
856 afd = find_afd(pai->ai_family);
857 if (!afd->a_scoped)
905 get_name(addr, afd, res, numaddr, pai, servname) in get_name() argument
907 const struct afd *afd;
920 hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
922 hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
926 GET_AI(cur, afd, hp->h_addr_list[0]);
941 GET_AI(cur, afd, ap);
948 GET_AI(cur, afd, numaddr);
989 get_ai(pai, afd, addr) in get_ai() argument
991 const struct afd *afd;
998 + (afd->a_socklen));
1004 memset(ai->ai_addr, 0, afd->a_socklen);
1006 ai->ai_addr->sa_len = afd->a_socklen;
1008 ai->ai_addrlen = afd->a_socklen;
1009 ai->ai_addr->sa_family = ai->ai_family = afd->a_af;
1011 memcpy(p + afd->a_off, addr, afd->a_addrlen);
1102 static const struct afd *
1106 const struct afd *afd; local
1110 for (afd = afdl; afd->a_af; afd++) {
1111 if (afd->a_af == af)
1112 return afd;