[TriLUG] C & sockets programming question

Ken Mink ken.mink at gmail.com
Thu Jul 28 15:25:20 EDT 2005


On 7/28/05, Rick DeNatale <rick.denatale at gmail.com> wrote:
> On 7/28/05, Tanner Lovelace <clubjuggler at gmail.com> wrote:
> > On 7/27/05, Wing D Lizard <wingedlizard at nc.rr.com> wrote:
> > > But a socket is tied to an ip address, and each interface has it's own
> > > ip address.
> >
> > But, an interface may actually have anywhere from 0 to n IP addresses
> > it responds to.
> 
> And I'm pretty sure that there are cases where the ip address to
> interface mapping can change while a socket is still open, e.g. a card
> swap, moving between two different wireless setups, dhcp ...  One of
> the beauties of the socket api is that it insulates the app from such
> low-level considerations.

This can and does happen. I've got  a PowerBook with wireless and
wired interfaces. I've got my topology set up such that the both
interfaces will get the same IP address. If I want to speed up a
transfer I can just plug in the wired connection and traffic just
switchs to it. I've done this with an inprogress scp and the only
thing that happened was that the tranfer rate shot up. An open tcp
socket switched interfaces and kept going.

Ken
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
> 


-- 
---------------------------------------------
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."--Benjamin Franklin
" 'Necessity' is the plea for every infringement of human liberty; it
is the argument of tyrants; it is the creed of slaves."--William Pitt



More information about the TriLUG mailing list