From: Paul Brannan Date: 2002-09-03T04:15:07+09:00 Subject: Re: gethostbyname() requires reverse lookup to work? On Sun, Sep 01, 2002 at 04:57:33AM +0900, Daniel Berger wrote: > My point is, I think the code should be written so as not to worry about > those (very?) rare cases where it might fail with regards to IPv6. I think > reverse lookups are likely to be a much more prevalent cause of failures. The ideal solution, I think, is to use a resolver library that uses rb_f_select() instead of select(); then we don't have any issues to worry about with thread-safety and global variables and such. Barring that solution, I suppose getaddrinfo() seems reasonable, but using gethostbyaddr() to get a hostent* out of the addrinfo structure does not. Perhaps writing a function that can create the hostent* directly from the addrinfo structure might work? I don't know much about sockets or IPV6; what do most people do who have to deal with IPv6 do to resolve addresses? Paul