Lines Matching refs:afd
128 static const struct afd { struct
219 const struct afd *, const char *);
224 static const struct afd *find_afd(int);
269 #define GET_AI(ai, afd, addr) \ argument
272 (ai) = get_ai(pai, (afd), (addr)); \
630 const struct afd *afd; in explore_null() local
660 afd = find_afd(pai->ai_family); in explore_null()
661 if (afd == NULL) in explore_null()
665 GET_AI(cur->ai_next, afd, afd->a_addrany); in explore_null()
671 GET_AI(cur->ai_next, afd, afd->a_loopback); in explore_null()
696 const struct afd *afd; in explore_numeric() local
717 afd = find_afd(pai->ai_family); in explore_numeric()
718 if (afd == NULL) in explore_numeric()
721 switch (afd->a_af) { in explore_numeric()
725 if (pai->ai_family == afd->a_af || in explore_numeric()
727 GET_AI(cur->ai_next, afd, pton); in explore_numeric()
745 if (inet_pton(afd->a_af, hostname, pton) == 1) { in explore_numeric()
746 if (pai->ai_family == afd->a_af || in explore_numeric()
748 GET_AI(cur->ai_next, afd, pton); in explore_numeric()
786 const struct afd *afd; in explore_numeric_scope()
803 afd = find_afd(pai->ai_family); in explore_numeric_scope()
804 if (afd == NULL) in explore_numeric_scope()
807 if (!afd->a_scoped) in explore_numeric_scope()
866 get_ai(const struct addrinfo *pai, const struct afd *afd, const char *addr) in get_ai() argument
872 _DIAGASSERT(afd != NULL); in get_ai()
876 + (afd->a_socklen)); in get_ai()
882 memset(ai->ai_addr, 0, (size_t)afd->a_socklen); in get_ai()
883 ai->ai_addr->sa_len = (uint8_t)afd->a_socklen; in get_ai()
884 ai->ai_addrlen = afd->a_socklen; in get_ai()
885 ai->ai_family = afd->a_af; in get_ai()
888 memcpy(p + afd->a_off, addr, (size_t)afd->a_addrlen); in get_ai()
995 static const struct afd *
998 const struct afd *afd; in find_afd() local
1002 for (afd = afdl; afd->a_af; afd++) { in find_afd()
1003 if (afd->a_af == af) in find_afd()
1004 return afd; in find_afd()
1074 const struct afd *afd; in getanswer() local
1235 afd = find_afd(ai.ai_family); in getanswer()
1236 if (afd == NULL) { in getanswer()
1240 cur->ai_next = get_ai(&ai, afd, (const char *)cp); in getanswer()