• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to tell a socket to use a specific interface...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: how to tell a socket to use a specific interface...
      • From: Josh Graessley <email@hidden>
References: 
 >how to tell a socket to use a specific interface... (From: Philip George <email@hidden>)
 >Re: how to tell a socket to use a specific interface... (From: "Peter Lovell" <email@hidden>)

  • Prev by Date: Re: how to tell a socket to use a specific interface...
  • Next by Date: Re: how to tell a socket to use a specific interface...
  • Previous by thread: Re: how to tell a socket to use a specific interface...
  • Next by thread: Re: how to tell a socket to use a specific interface...
  • Index(es):
    • Date
    • Thread