On Tuesday 19 April 2005 09:21 pm, YOSHIFUJI Hideaki / åèèæ wrote: > In article <[EMAIL PROTECTED]> (at Wed, 20 Apr 2005 00:55:42 +0200), Hrvoje Niksic <[EMAIL PROTECTED]> says: > > Is this the intended behavior of the -4/-6 switches: > > > > $ wget -4 http://\[::ffff:127.0.0.1\] > > --00:35:50-- http://[::ffff:127.0.0.1]/ > > => `index.html' > > failed: Name or service not known. > > $ wget -6 http://\[::ffff:127.0.0.1\] > > --00:35:54-- http://[::ffff:127.0.0.1]/ > > => `index.html' > > Connecting to ::ffff:127.0.0.1:80... connected. > > ... > > > > Should -4/-6 make a better attempt to deal with this, or is the > > current behavior fine? If the latter is the case, should we document > > the current behavior? > > -4/-6 make sense when and only when we use name (instead of address) > to connect host. e.g.: > wget -4 http://localhost/
right. > (So, it is not necessary at all to do as nc6 does.) well, to defend myself, i have to say that nc6 handles the -4 and -6 switches by simply setting the ai_family member of the hints struct to be passed to getaddrinfo to PF_INET6 and PF_INET respectively, instead of the PF_UNSPEC default. so, the behaviour of -4 and -6 switches with numeric addresses in nc6 is just a byproduct of this simple assignement. ;-) -- Aequam memento rebus in arduis servare mentem... Mauro Tortonesi University of Ferrara - Dept. of Eng. http://www.ing.unife.it Institute of Human & Machine Cognition http://www.ihmc.us Deep Space 6 - IPv6 for Linux http://www.deepspace6.net Ferrara Linux User Group http://www.ferrara.linux.it