Daniel Stenberg <[EMAIL PROTECTED]> writes: > I'd suggest that you instead pass around a 'struct hostent *' on > IPv4 only platforms
Why? The rest of the code never needs anything from `struct hostent' except the list of addresses, and this is what my code extracts. By extension, the idea was for the IPv6 code to extract the list of addresses from the data returned by the IPv6 calls. >> with the appropriate #ifdefs for when IPv6 is not >> available. ipv6_address might also need to contain the "scope" >> information. (I don't know what that is, but I trust that you do. >> I've been told that IPv6 addresses were "scoped".) > > IPv6 addresses are scoped, but that is nothing you have to care > about as mere application writer (unless you really want to of > course). If you just keep the list of addresses in the addrinfo > struct and you try all them when you connect, then it'll work > transparantly. `struct addrinfo' contains a `struct sockaddr', which carries the necessary scoping information (I think). The question at the time was whether I could extract only the "address(es)" and ignore everything else, as it was possible with IPv4. Itojune implied that "scoping" of addresses made this hard or impossible.
