[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Incomplete getaddrinfo module
From: |
Simon Josefsson |
Subject: |
Re: Incomplete getaddrinfo module |
Date: |
Thu, 15 Sep 2005 17:36:41 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Yoann Vandoorselaere <address@hidden> 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
- Incomplete getaddrinfo module, Yoann Vandoorselaere, 2005/09/15
- Re: Incomplete getaddrinfo module, Simon Josefsson, 2005/09/15
- Re: [bug-gnulib] Incomplete getaddrinfo module, Bruno Haible, 2005/09/15
- Re: [bug-gnulib] Incomplete getaddrinfo module, Yoann Vandoorselaere, 2005/09/15
- Re: [bug-gnulib] Incomplete getaddrinfo module, Derek Price, 2005/09/15
- Re: [bug-gnulib] Incomplete getaddrinfo module, Yoann Vandoorselaere, 2005/09/15
- Re: [bug-gnulib] Incomplete getaddrinfo module, Derek Price, 2005/09/15
- Re: Incomplete getaddrinfo module,
Simon Josefsson <=
- Re: Incomplete getaddrinfo module, Yoann Vandoorselaere, 2005/09/15
- Re: Incomplete getaddrinfo module, Simon Josefsson, 2005/09/15