Proposal [Trac #1212]: add IPv6 support to network library

Bryan O'Sullivan bos at
Sat Mar 10 03:14:08 EST 2007

Here's the Trac ticket:

This proposal adds two standard protocol-independent functions to 
Network.BSD to allow the networking code to work with both IPv6 and IPv4 
addresses and protocols.

getAddrInfo is the equivalent of getaddrinfo from RFC 2553. getNameInfo 
is the equivalent of getnameinfo from RFC 2553.

These functions rely on a few new types:

AddrInfo AddrInfoFlags NameInfoFlags

Several global values provide mnemonics for query hints and flags.

Both of these functions are available on all modern operating systems. 
They unify name and service lookup for IPv4 and IPv6. The code has been 
autoconfiscated so that it will not be compiled if IPv6 support is not 

I have not touched existing code in any way, save to add and extend the 
smallest possible number of types and functions so that IPv6 addresses 
can be accommodated.

I would suggest a consideration period of one week, since my changes are 
non-intrusive in nature.



More information about the Libraries mailing list