Lines Matching refs:afd
139 static const struct afd { struct
230 const struct afd *, const char *);
233 static const struct afd *find_afd(int);
274 #define GET_AI(ai, afd, addr) \ argument
277 (ai) = get_ai(pai, (afd), (addr)); \
866 const struct afd *afd; in explore_null() local
896 afd = find_afd(pai->ai_family); in explore_null()
897 if (afd == NULL) in explore_null()
901 GET_AI(cur->ai_next, afd, afd->a_addrany); in explore_null()
907 GET_AI(cur->ai_next, afd, afd->a_loopback); in explore_null()
931 const struct afd *afd; in explore_numeric() local
952 afd = find_afd(pai->ai_family); in explore_numeric()
953 if (afd == NULL) in explore_numeric()
956 switch (afd->a_af) { in explore_numeric()
960 if (pai->ai_family == afd->a_af || in explore_numeric()
962 GET_AI(cur->ai_next, afd, pton); in explore_numeric()
980 if (inet_pton(afd->a_af, hostname, pton) == 1) { in explore_numeric()
981 if (pai->ai_family == afd->a_af || in explore_numeric()
983 GET_AI(cur->ai_next, afd, pton); in explore_numeric()
1021 const struct afd *afd; in explore_numeric_scope()
1038 afd = find_afd(pai->ai_family); in explore_numeric_scope()
1039 if (afd == NULL) in explore_numeric_scope()
1042 if (!afd->a_scoped) in explore_numeric_scope()
1099 get_ai(const struct addrinfo *pai, const struct afd *afd, const char *addr) in get_ai() argument
1105 assert(afd != NULL); in get_ai()
1109 + (afd->a_socklen)); in get_ai()
1115 memset(ai->ai_addr, 0, (size_t)afd->a_socklen); in get_ai()
1118 ai->ai_addr->sa_len = afd->a_socklen; in get_ai()
1121 ai->ai_addrlen = afd->a_socklen; in get_ai()
1125 ai->ai_addr->sa_family = ai->ai_family = afd->a_af; in get_ai()
1127 memcpy(p + afd->a_off, addr, (size_t)afd->a_addrlen); in get_ai()
1228 static const struct afd *
1231 const struct afd *afd; in find_afd() local
1235 for (afd = afdl; afd->a_af; afd++) { in find_afd()
1236 if (afd->a_af == af) in find_afd()
1237 return afd; in find_afd()
1315 const struct afd *afd; in getanswer() local
1472 afd = find_afd(ai.ai_family); in getanswer()
1473 if (afd == NULL) { in getanswer()
1477 cur->ai_next = get_ai(&ai, afd, (const char *)cp); in getanswer()