Re: how to tell a socket to use a specific interface...
Re: how to tell a socket to use a specific interface...
- Subject: Re: how to tell a socket to use a specific interface...
- From: Justin Walker <email@hidden>
- Date: Sun, 22 May 2005 20:31:31 -0700
On May 22, 2005, at 16:58, Eric Dahlman wrote:
On May 22, 2005, at 1:51 PM, Justin Walker wrote:
There's relatively little that a bind() can do to make a remote
server happy. Unless you have something in mind that I don't
understand (Nah...), the only real reason to call bind() on a socket
that you will call connect() on is to deal with the possibility that
routing is not enabled on your system, and you have multiple
interfaces to choose from.
In this one case, you would want to bind to an address associated to
an interface that is "in the direction" of your destination. Given
the complex routing setups that could occur (adding a lot of host
routes, for example :-}), this could be necessary to overcome bad
decisions in the routing engine.
Other opinions solicited...
Just one crusty old example for historical correctness. Back in the
day some protocols (was it for zone transfers in the old DNS bind or
some such thing, I don't remember myself) would distinguish a
connection from a specific low numbered port from a high numbered
port. It was a little added protection since a normal user could not
use a low numbered port for outgoing traffic. Now in this day and age
that is just silly but those were simpler times...
Thanks; that is a valid reason (and is still somewhat apropos; there
are sufficiently many Unix-derived systems around that some of the old
rules apply).
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Some people have a mental horizon of radius zero, and
call it their point of view.
-- David Hilbert
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden