plan9port/src
David du Colombier 3409bc9ae1 lib9/dial: add support for IPv6
The function p9dialparse() returns the host as a sockaddr_storage
structure instead of a u32int, to be able to handle both IPv4
and IPv6 addresses. Because the sockaddr_storage structure also
handle port numbers and Unix path names, there is no longer
need to set them in the calling functions. However, these values
are still returned for convenience.

The sockaddr_in and sockaddr_un structures have been replaced
by sockaddr_storage to handle Unix, IPv4 and IPv6 sockets.

Names and addresses are resolved using either gethostbyname()
or getaddrinfo() functions.

The getaddrinfo() function is documented in RFC2553 and standardized
since POSIX.1-2001. It supports both IPv4 and IPv6 addresses.
The gethostbyname() function is deprecated since POSIX.1-2008.
However, some libc implementations don't handle getaddrinfo()
properly, thus we preferred to try gethostbyname() first.

I've tried to preserve most of the old code logic to prevent
from surprising or unwanted behavior.

R=rsc
http://codereview.appspot.com/6255068
2012-06-02 21:50:59 +02:00
..
cmd lib9/dial: add support for IPv6 2012-06-02 21:50:59 +02:00
lib9 lib9/dial: add support for IPv6 2012-06-02 21:50:59 +02:00
lib9p delete 9P2000.u 2010-12-07 13:34:11 -05:00
lib9pclient delete 9P2000.u 2010-12-07 13:34:11 -05:00
libString Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
libacme save old q0, q1 2006-06-25 23:52:41 +00:00
libauth Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
libauthsrv fix type-punned pointer warnings from gcc 2010-03-10 14:50:33 -08:00
libavl venti: import changes from plan 9 2011-06-02 09:33:56 -04:00
libbin
…
libbio convert to 4-byte UTF-8 and 32-bit Rune 2009-09-11 17:03:06 -04:00
libcomplete
…
libdisk libdisk: avoid unreachable code to silence Sun cc warning (Russell Davies) 2008-06-04 20:59:28 -04:00
libdiskfs venti: 32-bit extensions to data structures 2009-05-25 02:11:27 -07:00
libdraw libdraw: allow 32-bit Runes 2010-01-28 16:58:34 -08:00
libflate make flate crc32 work when ulong is 64 bits 2010-02-07 16:51:28 -08:00
libframe libframe: fix line wrap display glitch (Erik Quanstrom) 2011-01-02 17:54:48 -05:00
libgeometry
…
libhtml Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
libhttpd use fmtlocaleinit 2007-04-21 22:25:45 +00:00
libip more type-punned pointers 2010-03-10 14:59:03 -08:00
libmach merge 2012-03-05 16:36:31 -05:00
libmemdraw fix type-punned pointer warnings from gcc 2010-03-10 14:50:33 -08:00
libmemlayer separate out 2006-06-25 18:58:06 +00:00
libmp arm: build fixes 2011-05-18 13:20:56 -04:00
libmux libmux: more robust code 2008-05-05 23:09:48 -04:00
libndb Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
libplumb libplumb, Mail: fix crash on nil plumb fids 2009-09-12 15:25:51 -04:00
libregexp libregexp: more placating of gcc (John Gosset) 2008-05-10 13:36:05 -04:00
libsec libsec: fix dsagen 64-bit bug 2011-10-05 16:23:01 -04:00
libsunrpc fix memory leak (bakul shah) 2007-04-24 06:49:30 +00:00
libthread OS X PowerPC fixes (thanks Cameron Kaiser) 2011-10-23 17:55:23 -04:00
libventi libventi: add functions vtsha1 and vtsha1check 2012-01-21 10:01:20 +01:00
make2mk
…
mk2make
…
mkcommon
…
mkdirs add tracing cd prints 2005-11-26 15:39:32 +00:00
mkfile fix INSTALL warnings 2012-05-29 15:11:14 -04:00
mkhdr OS X PowerPC fixes (thanks Cameron Kaiser) 2011-10-23 17:55:23 -04:00
mklib build: use ar s flag to avoid ranlib 2007-11-05 11:27:14 -05:00
mkmany
…
mkmk.sh mkmk.sh: update for new date files 2008-07-10 11:10:00 -04:00
mkone
…
mksyslib build: use ar s flag to avoid ranlib 2007-11-05 11:27:14 -05:00