Lines Matching refs:afd
66 static const struct afd *find_afd(int);
67 static int getnameinfo_inet(const struct afd *,
75 static int getnameinfo_link(const struct afd *,
79 static int getnameinfo_un(const struct afd *,
83 static const struct afd {
88 int (*a_func)(const struct afd *,
117 const struct afd *afd;
122 afd = find_afd(sa->sa_family);
123 if (afd == NULL)
132 if (salen > afd->a_socklen ||
133 salen <= afd->a_socklen -
138 if (salen <= afd->a_socklen -
143 if (salen != afd->a_socklen)
148 return ((*afd->a_func)(afd, sa, salen, host, hostlen,
152 static const struct afd *
155 const struct afd *afd;
159 for (afd = &afdl[0]; afd->a_af > 0; afd++) {
160 if (afd->a_af == af)
161 return (afd);
167 getnameinfo_inet(const struct afd *afd,
183 addr = (const char *)sa + afd->a_off;
261 switch(afd->a_af) {
274 if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
284 hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
308 switch(afd->a_af) {
322 if (inet_ntop(afd->a_af, addr, host,
416 getnameinfo_link(const struct afd *afd,
512 getnameinfo_un(const struct afd *afd,
521 pathlen = sa->sa_len - afd->a_off;
527 strlcpy(host, (const char *)sa + afd->a_off, pathlen + 1);