Subject: Re: [mobile-ip] Re: Proposal for MIPv6 APIs to switch default source address selection

From: Samita Chakrabarti <[email-masked]>
Date: Sun, 24 Nov 2002 21:20:45 -0800 (PST)

> > In your previous mail you wrote:
> > 
> >    An alternative approach could be: If the application cares about
> >    the source address, it can use the Mobile IP API to figure out which
> >    ones are home address, which ones are care-of address, and than
> >    explicitly "bind" the socket to the desired address. IMO, this would
> >    also satisfy the needs of the Mobile IPv6 mobile node.
> >    
> > => this is similar to what I implemented in the past.
> > But a function giving the list of addresses with status is not enough,
> > the best is to give the home address and the care-of address for
> > a destination. 
> 
> I see. When the mobile node has more than one pair of 
> home_address-care_of_address, then it won't really know which
> one to pick. So, maybe, instead of exporting all this information
> to the apps and giving them the control, it might be better 
> to enable the app to say "bind this socket to any address, preferably
> topologically correct (i.e., a CoA, or home address when at home)".
> I suspect this is what Samita had in her mind.. 
> 

Correct. When an app uses bind(), in most cases it assumes that the bound-to-
address is an interface address of the node. So, if the home-addr and temporary
addresses are configured as logical interfaces of COA interface (in visited
network) of the mobile node, binding to a specific source address would work.
But for multi-homed nodes or a node which has multiple home-addresses and COAs,
the client apps may not want to bind to any particular source address and
it wants to let the kernel decide to choose the correct topological address
corresponding to the local network. Since the apps need to be generic to handle
all cases, binding to a source address would not work always.

> > As first info is getsockname() for bound sockets,
> > I added a clone of getsockname() which returns the real source
> > address after MIPv6 processing.
> 
> Or, don't change the getsockname(), but instead call 
> mip_get_one_mobile_node() afterwards to identify if the address is bound
> to a care-of address. Note that this binding can dynamically any time,
> and subsequent mip_get_one_mobile_node() calls are sufficient to capture
> the changes.

I'd say for connected and bound sockets, getsockname() would return the
correct topological source address.

Thanks,
-Samita

> > Note this doesn't solve the need of a control for smarter choice
> > between Co@/H@. I proposed some and implemented two: use always
> > the H@ and use it but a Co@ when the destination is in the same
> > link then a Co@. They were global (still better than none :-).
> > 
> > Thanks
> > 
> > [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: "Alper E. YEGIN" <[email-masked]>
Date: Sat, 30 Nov 2002 13:58:45 -0800

> correct topological source address.

But that'd break the getsockname() function, which should return the local
binding of the socket. If the socket is bound to a home address, that
address
should be returned by the function, even though it might be also
(Mobile IP-)bound to a care-of address.

alper