Lines Matching refs:afd
124 static const struct afd { struct
188 static int get_name __P((const char *, const struct afd *, struct addrinfo **,
193 const struct afd *, const char *));
196 static const struct afd *find_afd __P((int));
218 #define GET_AI(ai, afd, addr) \ argument
221 (ai) = get_ai(pai, (afd), (addr)); \
307 const struct afd *afd; local
451 for (afd = afdl; afd->a_af; afd++) {
454 if (!MATCH_FAMILY(pai->ai_family, afd->a_af, 1))
461 pai->ai_family = afd->a_af;
531 const struct afd *afd; local
550 afd = find_afd(pai->ai_family);
645 GET_AI(cur->ai_next, afd, ap);
658 get_name(ap, afd, &cur->ai_next,
696 const struct afd *afd; local
722 afd = find_afd(pai->ai_family);
725 GET_AI(cur->ai_next, afd, afd->a_addrany);
731 GET_AI(cur->ai_next, afd, afd->a_loopback);
758 const struct afd *afd; local
775 afd = find_afd(pai->ai_family);
778 if (inet_pton(afd->a_af, hostname, pton) == 1) {
784 switch (afd->a_af) {
802 if (pai->ai_family == afd->a_af ||
805 GET_AI(cur->ai_next, afd, pton);
818 get_name(pton, afd, &cur->ai_next,
850 const struct afd *afd;
863 afd = find_afd(pai->ai_family);
864 if (!afd->a_scoped)
912 get_name(addr, afd, res, numaddr, pai, servname) in get_name() argument
914 const struct afd *afd;
927 hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
929 hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
933 GET_AI(cur, afd, hp->h_addr_list[0]);
948 GET_AI(cur, afd, ap);
955 GET_AI(cur, afd, numaddr);
995 get_ai(pai, afd, addr) in get_ai() argument
997 const struct afd *afd;
1004 + (afd->a_socklen));
1010 memset(ai->ai_addr, 0, afd->a_socklen);
1012 ai->ai_addr->sa_len = afd->a_socklen;
1014 ai->ai_addrlen = afd->a_socklen;
1015 ai->ai_addr->sa_family = ai->ai_family = afd->a_af;
1017 memcpy(p + afd->a_off, addr, afd->a_addrlen);
1108 static const struct afd *
1112 const struct afd *afd; local
1116 for (afd = afdl; afd->a_af; afd++) {
1117 if (afd->a_af == af)
1118 return afd;