Subject: Re: Clarifications wanted on Basic API (RFC 2553)

From: David Borman <[email-masked]>
Date: Fri, 18 Feb 2000 11:23:46 -0600 (CST)

> Date: Fri, 18 Feb 2000 11:20:59 -0500
> From: Vladislav Yasevich <[email-masked]>
> Subject: Re: Clarifications wanted on Basic API (RFC 2553)
>
> Hope it's not too late to add to this, but I was just looking/fixing our
> implementation of getaddrinfo() and had a question.
>
> Suppose the user specified the nodename and AI_PASSIVE flag when calling
> getaddrinfo().  What would be the correct behavior:
> 	1.  Return a EAI_BADFLAGS.
> 	2.  Ignore the AI_PASSIVE flag, and return the address that the
> 	    nodename resolves to. (our current implementation)
> 	3.  Ignore the nodename and return an unspecified address.

You wouldn't want to ignore it, because it is perfectly reasonable
for an application to start up a passive connection limited to
one specific address.  The nodename should be one of the local
IP addresses, though, to be useful (i.e, you can't bind to someone
elses address), but I don't think that getaddrinfo() should be
trying to enforce that.  If it isn't a local address, the application
will discover that when the bind() fails.

The AI_PASSIVE bit only affects things when nodename is NULL, so
yes, if nodename != NULL, you effectivly ignore the AI_PASSIVE bit.

			-David Borman, [email-masked]
--------------------------------------------------------------------
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-masked]
--------------------------------------------------------------------

---

From: Francis Dupont <[email-masked]>
Date: Fri, 18 Feb 2000 23:04:48 +0100

one specific address.

=> this is less useful with IPv6 but is not uncommon.

=> I don't understand why you don't take the AI_PASSIVE bit into account
and bind() the socket to the address of the nodename?

Regards

[email-masked]

---

From: Jim Bound <[email-masked]>
Date: Sat, 19 Feb 2000 00:16:43 -0500

Dave,

>yes, if nodename != NULL, you effectivly ignore the AI_PASSIVE bit.

I think we should add this text to the specification.
Do you agree?

thanks
/jim