[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 01919) getifaddrs() in glibc, IPv6 detection questions
- To: usagi-users@xxxxxxxxxxxxxx
- Subject: (usagi-users 01919) getifaddrs() in glibc, IPv6 detection questions
- From: David Helder <dhelder@xxxxxxxxx>
- Date: Thu, 31 Oct 2002 16:25:09 -0500 (EST)
- Reply-to: usagi-users@xxxxxxxxxxxxxx
Hello,
I'm the lead developer of the GNet network library (www.gnetlibrary.org).
I'm currently working on adding IPv6 support. I have a couple questions.
1) Has there been any progress in getting an IPv6-aware getifaddrs() into
glibc? The last time I looked at glibc's getifaddrs(), it used the
ioctl() method of listing. There is some discussion from the list here:
http://www2.linux-ipv6.org/ml/usagi-users/msg01705.html
If not, would it be ok to use the Usagi code in GNet? We're under the
LGPL, the getifaddrs() code is under the GPL.
2) We have a function gnet_inetaddr_new(char* name) which maps a FQDN to a
network address. It uses getaddrinfo() for DNS queries. The problem is a
FQDN can map to multiple addresses, some IPv4 and some IPv6, even when the
host cannot make IPv6 connections. Ideally, our function will return IPv6
addresses only if the host can make IPv6 connections.
The best solution I've come up with is to get the list of interfaces,
check if there's an interface that supports IPv6, and only return an IPv6
address if there is an IPv6 supporting interface. Is this sensible or is
there a better solution?
Thanks,
David
--
__ _ __ David Helder - dhelder@xxxxxxxxx
___/ /__ __ __(_)__/ / <http://www.eecs.umich.edu/~dhelder>
/ _ / _ `/ |/ / / _ / Jungle Monkey: <http://www.junglemonkey.net>
|_,_/|_,_/|___/_/|_,_/ Paper CD Case: <http://www.papercdcase.com>