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: Philip George <email@hidden>
- Date: Fri, 20 May 2005 16:34:21 -0500
On May 20, 2005, at 4:14 PM, Peter Lovell wrote:
So your code should first open a socket, then use the "bind"
call to specify a sending IP address (and therefore a sending
interface),
and then start to send.
That's what I've got already. It's not working. Look at the code I
provided.
To test the code, I have an airport connection to a network that can
see the internet, and I have a cat5 connection to a dead network that
cannot see the internet.
Specifying the airport interface should allow the web request to
happen. Specifying the cat5 connection should not, because it cannot
see the internet to make it to the web server.
When I test **without** the SO_DONTROUTE line, both connect. When
specifying the dead cat5 connection, it re-routes thru the good airport
connection and grabs the page, which is what I'm trying to avoid.
When I test **with** SO_DONTROUTE, neither will get the page.
Is there anything wrong with the code I provided? Do you need to see
the send() and recv() lines too?
Thanks.
- Philip
_______________________________________________
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