Mauro Tortonesi <[EMAIL PROTECTED]> writes:

> 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. ;-)

But so does Wget!  Take a look at the code:

    if (opt.ipv4_only)
      hints.ai_family = AF_INET;
    else if (opt.ipv6_only)
      hints.ai_family = AF_INET6;
    else
      {
        hints.ai_family = AF_UNSPEC;
        hints.ai_flags |= AI_ADDRCONFIG;
      }

That's why I am surprised at the different behavior.

Reply via email to