On Mon, 25 Jun 2001 [EMAIL PROTECTED] wrote:
> �Hola!
>
> > > for(n = 0; (n < MAX_AF) && res ; res = res->ai_next) {
> > > listenfds[n] = socket(res->ai_family, res->ai_socktype,
> > > res->ai_protocol);
> > > if(listenfds[n] < 0)
> > > continue; /* libc supports protocols that kernel don't */
> > >
> > > if(bind(listenfds[n], res->ai_addr, res->ai_addrlen) != 0)
> > > die();
> > >
> > > if(listen(listenfds[n], 10) != 0)
> > > die();
> > > n++;
> > > }
>
> > i am afraid i don't understand this portion of code. is getaddrinfo
> > expected to return one-and-only-one ready-to-be-bound address for
> > every AF when called with flag AI_PASSIVE set? there's nothing in
> > the drafts that states this:
>
> That's not specified, as far as I can tell. It must return all the
> sockaddr's to bind to. If with just one sockaddr is enough that could
> be correct. But it's implemented normally as you described.
unfortunately, on linux it's not.
> > from what i can guess, instead, the expected behaviour for getaddrinfo in
> > this case (AI_PASSIVE, AF_UNSPEC and SOCK_STREAM set) is to return a
> > ready-to-be-bound ::1 (ipv6) address. am i wrong?
>
> It should be :: (ANY), not ::1 (loopback) and that could be done that way
> if all the AFs can be mapped to IPv6, but if there are no mappable protocols
> it should return the list.
of course. it's ::. excuse me.
> > if so, your code (which is truly AF-indipendent) is not RFC2553-compliant.
> > or better, the API specified by RFC2553 is not AF-indipendent.
>
> I don't understand that.
it was a reference to the AF-indipendent code you have presented in your
paper.
> > that's nonsense. compliant stacks would not be AF-independent, but
> > quasi-compliant stacks would be.
>
> I like better the noncompliant systems, but standard compliance is too
> important to discard it. So I hope to change the standard to accept
> the actually noncompliant behaviour.
i don't think we will reach consensus about this.
--
Aequam memento rebus in arduis servare mentem...
Mauro Tortonesi [EMAIL PROTECTED]
Ferrara Linux User Group http://www.ferrara.linux.it
Project6 - IPv6 for Linux http://project6.ferrara.linux.it
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page: http://playground.sun.com/ipng
FTP archive: ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------