ANN: IPv6 support for network

Bryan O'Sullivan bos at
Thu Mar 8 03:08:22 EST 2007

I've added enough IPv6 support to the network package that I can run the 
attached test program successfully, in the following manner:

     $ runghc NetTest.hs fec0::1:215:c5ff:fee2:451a

     HTTP/1.1 200 OK
     Date: Thu, 08 Mar 2007 07:56:20 GMT
     Server: Apache/2.2.3 (Fedora)

The changes required were very minor:

Network.BSD: New getAddrInfo and getNameInfo functions logically replace 
getHostByName and getHostByAddr, respectively.

Network.Socket: The SockAddr ADT has acquired a new, um, whatever it is 
that ADTs acquire (a branch? a case?), called SockAddrInet6.  Functions 
that work with SockAddrs are now SockAddrInet6-savvy.

Network.Socket: New typeclass, HostAddr, allows definition of inet_ntop 
over HostAddress and HostAddress6 types.

Documentation isn't yet 100% complete, but it should be pretty clear 
what's going on.  I've bumped the library version in the .cabal file, 
just to make sure people don't confuse it with the regular network library.

To fetch:

darcs get --partial

Please take a look and let me know if you have any comments.  If things 
look sane, I'll do the remaining doco and formally submit my changes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: NetTest.hs
Type: text/x-haskell
Size: 526 bytes
Desc: not available
Url :

More information about the Libraries mailing list