Lines Matching refs:afd
79 const struct afd { struct
136 static struct addrinfo* get_ai(const struct addrinfo*, const struct afd*, const char*);
139 static const struct afd* find_afd(int);
181 #define GET_AI(ai, afd, addr) \ argument
184 (ai) = get_ai(pai, (afd), (addr)); \
502 const struct afd* afd; in explore_null() local
532 afd = find_afd(pai->ai_family); in explore_null()
533 if (afd == NULL) return 0; in explore_null()
536 GET_AI(cur->ai_next, afd, afd->a_addrany); in explore_null()
539 GET_AI(cur->ai_next, afd, afd->a_loopback); in explore_null()
557 const struct afd* afd; in explore_numeric() local
577 afd = find_afd(pai->ai_family); in explore_numeric()
578 if (afd == NULL) return 0; in explore_numeric()
580 if (inet_pton(afd->a_af, hostname, pton) == 1) { in explore_numeric()
581 if (pai->ai_family == afd->a_af || pai->ai_family == PF_UNSPEC /*?*/) { in explore_numeric()
582 GET_AI(cur->ai_next, afd, pton); in explore_numeric()
614 const struct afd* afd; in explore_numeric_scope() local
632 afd = find_afd(pai->ai_family); in explore_numeric_scope()
633 if (afd == NULL) return 0; in explore_numeric_scope()
635 if (!afd->a_scoped) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
682 static struct addrinfo* get_ai(const struct addrinfo* pai, const struct afd* afd, in get_ai() argument
688 assert(afd != NULL); in get_ai()
698 ai->ai_addrlen = afd->a_socklen; in get_ai()
699 ai->ai_addr->sa_family = ai->ai_family = afd->a_af; in get_ai()
701 memcpy(p + afd->a_off, addr, (size_t) afd->a_addrlen); in get_ai()
780 static const struct afd* find_afd(int af) { in find_afd()
781 const struct afd* afd; in find_afd() local
784 for (afd = afdl; afd->a_af; afd++) { in find_afd()
785 if (afd->a_af == af) return afd; in find_afd()
846 const struct afd* afd; in getanswer() local
999 afd = find_afd(ai.ai_family); in getanswer()
1000 if (afd == NULL) { in getanswer()
1004 cur->ai_next = get_ai(&ai, afd, (const char*) cp); in getanswer()