Home | History | Annotate | Download | only in net

Lines Matching refs:afd

136 static const struct afd {
227 const struct afd *, const char *);
230 static const struct afd *find_afd(int);
270 #define GET_AI(ai, afd, addr) \
273 (ai) = get_ai(pai, (afd), (addr)); \
871 const struct afd *afd;
901 afd = find_afd(pai->ai_family);
902 if (afd == NULL)
906 GET_AI(cur->ai_next, afd, afd->a_addrany);
912 GET_AI(cur->ai_next, afd, afd->a_loopback);
936 const struct afd *afd;
957 afd = find_afd(pai->ai_family);
958 if (afd == NULL)
961 switch (afd->a_af) {
965 if (pai->ai_family == afd->a_af ||
967 GET_AI(cur->ai_next, afd, pton);
985 if (inet_pton(afd->a_af, hostname, pton) == 1) {
986 if (pai->ai_family == afd->a_af ||
988 GET_AI(cur->ai_next, afd, pton);
1026 const struct afd *afd;
1043 afd = find_afd(pai->ai_family);
1044 if (afd == NULL)
1047 if (!afd->a_scoped)
1104 get_ai(const struct addrinfo *pai, const struct afd *afd, const char *addr)
1110 assert(afd != NULL);
1114 + (afd->a_socklen));
1120 memset(ai->ai_addr, 0, (size_t)afd->a_socklen);
1123 ai->ai_addr->sa_len = afd->a_socklen;
1126 ai->ai_addrlen = afd->a_socklen;
1130 ai->ai_addr->sa_family = ai->ai_family = afd->a_af;
1132 memcpy(p + afd->a_off, addr, (size_t)afd->a_addrlen);
1233 static const struct afd *
1236 const struct afd *afd;
1240 for (afd = afdl; afd->a_af; afd++) {
1241 if (afd->a_af == af)
1242 return afd;
1309 const struct afd *afd;
1463 afd = find_afd(ai.ai_family);
1464 if (afd == NULL) {
1468 cur->ai_next = get_ai(&ai, afd, (const char *)cp);