Yoann Vandoorselaere <[EMAIL PROTECTED]> writes: > If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be > returned only if an IPv4 address is configured on the local system, and > IPv6 addresses shall be returned only if an IPv6 address is configured > on the local system.
This looks tricky to implement. Looking at libc code, it uses getifaddrs, which appear tricky to implement portably. But we could support multiple implementations of getifaddrs, one for each system where we know how to implement it. I don't see how we could hope to do better. > If the AI_PASSIVE flag is specified, the returned address information > shall be suitable for use in binding a socket for accepting incoming > connections for the specified service. In this case, if the nodename > argument is null, then the IP address portion of the socket address > structure shall be set to INADDR_ANY for an IPv4 address or > IN6ADDR_ANY_INIT for an IPv6 address. (...) I don't think this would be that difficult to implement. > As an example, libprelude will break with GnuLib getaddrinfo due to the > usage of the AI_ADDRCONFIG option (if available), and AI_PASSIVE. Without the current gnulib getaddrinfo module, you are even worse off because there is no portable replacement for this functionality. Or what were you doing before? Perhaps that code could be integrated into the gnulib module. Generally, I agree with you that much of the glibc getaddrinfo code could and should be merged with the gnulib module. It would be very useful to work on this, but I can't promise to commit to this soon myself. Thanks, Simon _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib