Subject: Re: I-D ACTION:draft-chakrabarti-ipv6-addrselect-api-03.txt

From: Samita Chakrabarti <[email-masked]>
Date: Mon, 25 Jul 2005 11:22:40 -0700 (PDT)

Hi Keiichi,

> >  
> > >  One example might be that if sender wants to use global destination
> > >  address to talk to an onlink node for which it knows a smaller scope
> > >  address.  In that situation, setting  LARGESCOPE
> > >  socket option and passing AI flag to getaddrinfo() is recommended.
> > 
> > For which socket are you intending to set the LARGESCOPE socket
> > option?  Could you show an example code fragment that uses this option
> > (e.g., containing calls to getaddrinfo(), socket(), and connect() or
> > sendto())?
> 
> I had the same feeling with Tatsuya.
> 

Thanks for providing the example below.  It is similar to what I had in 
mind. I agree that setting IPV6_PREFER_DST socket option may be redundant
in most implementations.

I can see your and Jinmei's view point. 

> For the particular case, that you quated, maybe we don't need
> IPV6_PREFER_DST_ option.  If were you, I would write the following code:
> 
> hints.ai_family = PF_UNSPEC;
> hints.ai_socktype = SOCK_STREAM;
> hints.ai_flags = AI_PREFER_SRC_LARGESCOPE|AI_PREFER_DST_LARGESCOPE;
> getaddrinfo("www.foobar.com", "http", &hints, &res0);
> for every res in res0 {
>     s = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
>     setsockopt(s, IPPROTO_IPV6, IPV6_PREFER_SRC_LARGESCOPE=on);
>     connect(s, res->ai_addr, res->ai_addrlen);
>     ...
> }
> 
> I think specifying IPV6_PREFER_DST_XXX doesn't have any meaning,
> because the destination address has already been chosen in
> getaddrinfo().
> 

Are you suggesting to drop all the IPV6_PREFER_DST_*SCOPE socket-option
flags ?  I'll discuss this with my co-authors of this draft.
Does any implementor in this list have any objection on dropping
the above socket option?

Thanks again,
-Samita

--------------------------------------------------------------------
IETF IPv6 working group mailing list
[email-masked]
Administrative Requests: https://www1.ietf.org/mailman/listinfo/ipv6
--------------------------------------------------------------------

---

From: Keiichi SHIMA <[email-masked]>
Date: Tue, 26 Jul 2005 13:54:01 +0900 (JST)

Hi Samita,

From: Samita Chakrabarti <[email-masked]>
Date: Mon, 25 Jul 2005 11:22:40 -0700 (PDT)
> flags ?  I'll discuss this with my co-authors of this draft.

Yes, that is what I meant.

> Does any implementor in this list have any objection on dropping

Though I only know the internal implementation of BSD networking
systems, at least we don't need those socket options (related to
choosing a destination address) for the BSD systems.

I don't know other implementations.  I'm not sure if there are any
implementations which can utilize those socket options.  I think
inputs from other implementors should be helpful.

Regards,
---
Keiichi SHIMA
IIJ Research Laboratory <[email-masked]>
KAME Project <[email-masked]>