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

From: Samita Chakrabarti <[email-masked]>
Date: Mon, 2 Dec 2002 10:38:42 -0800 (PST)

> > I'd say for connected and bound sockets, getsockname() would return the
> > 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.

In order to bind() to a address it generally requires that the address
is locally configured. I assumed that the suggestion was that the MN would
always have a home-address configured as a logical interface or some pseudo
interface. It seems a bit odd for a socket API to return a fake address 
while it's bound to a different address.  

That's why it's clean to direct the kernel to swtich the source address
selection mechanism  from the default to the desired. 

-Samita

---

From: "Alper E. YEGIN" <[email-masked]>
Date: Mon, 2 Dec 2002 12:57:55 -0800

> is locally configured.

Sure. Both a home address and a care-of address can be locally configured
at the same time. (regardless of one being on a logical interface, other
on a physical interface).

> I assumed that the suggestion was that the MN would

This part, I didn't get it. A socket can be bound to a home address, or
a care-of address. Either case, socket API should treat them equally.
Getsockname() should return the IP address that local endpoint is
bound to, regardless of the type (i.e., home address vs care-of address,
configured on physical vs. logical interface).

> selection mechanism  from the default to the desired.

OK, this is about changing the address selection policy per application.
This is about controlling the behavior of the kernel, not reading state
from it.

alper