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

From: David Borman <[email-masked]>
Date: Tue, 22 Feb 2000 13:45:45 -0600 (CST)

> From: Jim Bound <[email-masked]>
> Subject: Re: Clarifications wanted on Basic API (RFC 2553) 
> Date: Sat, 19 Feb 2000 00:16:43 -0500
>
> Dave,
>
> >The AI_PASSIVE bit only affects things when nodename is NULL, so
> >yes, if nodename != NULL, you effectivly ignore the AI_PASSIVE bit.
>
> I think we should add this text to the specification.
> Do you agree?

I don't think so.  The text seems pretty clear to me:

   If the AI_PASSIVE bit is set in the ai_flags member of the hints
   structure, then the caller plans to use the returned socket address
   structure in a call to bind().  In this case, if the nodename
   argument is a NULL pointer, then the IP address portion of the socket
   address structure will be set to INADDR_ANY for an IPv4 address or
   IN6ADDR_ANY_INIT for an IPv6 address.
    
   If the AI_PASSIVE bit is not set in the ai_flags member of the hints
   structure, then the returned socket address structure will be ready
   for a call to connect() (for a connection-oriented protocol) or  
   either connect(), sendto(), or sendmsg() (for a connectionless
   protocol).  In this case, if the nodename argument is a NULL pointer,
   then the IP address portion of the socket address structure will be
   set to the loopback address.

The first paragraph is when AI_PASSIVE is set and nodename == NULL,
the second is when AI_PASSIVE is not set and nodename == NULL.
However, perhaps it isn't clear enough since the topic is being
discussed.  I'll offer this rewording which combines both paragraphs,
and makes it clearer that the AI_PASSIVE bit only applies when
nodename == NULL.

    If the nodename argument is a NULL pointer, then the AI_PASSIVE bit
    in the ai_flags member of the hints structure determines how to fill
    in the IP address portion of the socket address structure.  In this
    case, if the AI_PASSIVE bit is set, then the caller plans to use the
    returned socket address structure in a call to bind(), and the IP
    address portion of the socket address structure will be set to
    INADDR_ANY for an IPv4 address or IN6ADDR_ANY_INIT for an IPv6 address.
    If the AI_PASSIVE bit is not set then the returned socket address
    structure will be ready for a call to connect() (for a connection-
    oriented protocol) or either connect(), sendto(), or sendmsg() (for a
    connectionless protocol), and the IP address portion of the socket
    address structure will be set to the loopback address.

			-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: Jim Bound <[email-masked]>
Date: Tue, 22 Feb 2000 23:15:20 -0500

Hi Dave,

I will put this in the next update of the draft.

thanks
/jim