Lines Matching refs:afd

78 const struct afd {  struct
134 static struct addrinfo* get_ai(const struct addrinfo*, const struct afd*, const char*);
137 static const struct afd* find_afd(int);
179 #define GET_AI(ai, afd, addr) \ argument
182 (ai) = get_ai(pai, (afd), (addr)); \
486 const struct afd* afd; in explore_null() local
516 afd = find_afd(pai->ai_family); in explore_null()
517 if (afd == NULL) return 0; in explore_null()
520 GET_AI(cur->ai_next, afd, afd->a_addrany); in explore_null()
523 GET_AI(cur->ai_next, afd, afd->a_loopback); in explore_null()
541 const struct afd* afd; in explore_numeric() local
561 afd = find_afd(pai->ai_family); in explore_numeric()
562 if (afd == NULL) return 0; in explore_numeric()
564 if (inet_pton(afd->a_af, hostname, pton) == 1) { in explore_numeric()
565 if (pai->ai_family == afd->a_af || pai->ai_family == PF_UNSPEC /*?*/) { in explore_numeric()
566 GET_AI(cur->ai_next, afd, pton); in explore_numeric()
598 const struct afd* afd; in explore_numeric_scope() local
616 afd = find_afd(pai->ai_family); in explore_numeric_scope()
617 if (afd == NULL) return 0; in explore_numeric_scope()
619 if (!afd->a_scoped) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
666 static struct addrinfo* get_ai(const struct addrinfo* pai, const struct afd* afd, in get_ai() argument
672 assert(afd != NULL); in get_ai()
680 ai->ai_addrlen = afd->a_socklen; in get_ai()
681 ai->ai_addr->sa_family = ai->ai_family = afd->a_af; in get_ai()
683 memcpy(p + afd->a_off, addr, (size_t) afd->a_addrlen); in get_ai()
761 static const struct afd* find_afd(int af) { in find_afd()
762 const struct afd* afd; in find_afd() local
765 for (afd = afdl; afd->a_af; afd++) { in find_afd()
766 if (afd->a_af == af) return afd; in find_afd()
821 const struct afd* afd; in getanswer() local
974 afd = find_afd(ai.ai_family); in getanswer()
975 if (afd == NULL) { in getanswer()
979 cur->ai_next = get_ai(&ai, afd, (const char*) cp); in getanswer()