Subject: Re: send-pr IPv6 patches?
To: None <>
From: Feico Dillema <>
List: tech-net
Date: 12/02/1999 23:25:44
On Fri, Dec 03, 1999 at 01:11:23AM +0900, wrote:
> 	It is better to bind(2) two sockets for both AFs, not single socket
> 	for AF_INET6.  Some kernel does not support IPv4 mapped address.
> 	Also, most of IPv4-only setsockopt() is not, and will not, be
> 	supported on AF_INET6 socket with IPv4 mapped address.
> 	Applications become simpler if you bind(2) two sockets.
> 	The best way to do this is, again, getaddrinfo(3).
I used this approach for several apps and started out with it with
syslogd too, but got stuck a bit... got endless loops etc ;{. Now, 
I have a working simple version and can spend some more time on 
`doing the right thing'. WHat I need to add is after opening the
list of sockets is some code to decide which one to use when
remote logging because of a @hostname in the config file, by 
matching the AF of what hostname resolves to to the address
family of each of the opened sockets. Then all AF_INET/AF_INET6
would be gone from the code...

Thanks for commiting my send-pr so quickly, I'll spent some
time on making a new one which is more elegant.

> 	When rewriting application, sometimes it need a big rewrite to
> 	be very independent from AFs (like the code assumes single socket).
> 	I sometimes need to compromise myself when rewriting other's code.
Yep, my experience is too that changing an application to use the new 
API is the easy part and letting it support multiple socket is often
a lot harder to fix elegantly.
> 	anyway, it is very good to see more IPv6-aware applications.
I totally agree and for that was very happy with the integrated
IPv6 support in NetBSD, including the pkgsrc system. It makes the
effort of patching things much more worthwhile and manageable.