Try to find ipv6 address by hostname */
| 306 | |
| 307 | /* Try to find ipv6 address by hostname */ |
| 308 | static int |
| 309 | lookup_host6 (char *host, struct in6_addr *ip6addr) |
| 310 | { |
| 311 | struct hostent *he; |
| 312 | |
| 313 | if (!inet_pton(AF_INET6_LINUX, host, ip6addr)) { |
| 314 | #ifndef FSTACK |
| 315 | if ((he = gethostbyname2(host, AF_INET6)) == NULL) |
| 316 | #endif |
| 317 | return(-1); |
| 318 | memcpy(ip6addr, he->h_addr_list[0], sizeof( struct in6_addr)); |
| 319 | } |
| 320 | return (0); |
| 321 | } |
| 322 | |
| 323 | |
| 324 | /* |