• 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: bind() not working for outbound socket connections...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bind() not working for outbound socket connections...


  • Subject: Re: bind() not working for outbound socket connections...
  • From: Giuliano Gavazzi <email@hidden>
  • Date: Sun, 22 May 2005 10:43:42 +0200

At 6:54 pm -0700 2005/05/21, Justin Walker wrote:
On May 21, 2005, at 18:28, Philip George wrote:
i have a system with two ports, one is connected to a router that CAN see the internet and and one is connected to a router that CANNOT see the internet.

if i try to bind() a socket to the port that connects to the "dead" router, the system still autoroutes it through the good interface to get the message to the web server out on the internet. for most practical purposes, that feature rocks, but for my particular needs, i have to be sure that the messages are being routed out through a specific interface. if there is no good route to the destination address thru the chosen interface, then the subsequent connect() should fail (as opposed to looking for another route).

i **don't** want these particular messages autorouted thru any random interface.

You really do need to read enough to understand IP routing. You can complain all you want, but the kernel routing engine is still going to pick an outbound interface that takes your packets in the direction of the destination address. The interfaces aren't chosen randomly; they are chosen in a deterministic way by the routing engine.

well, would it not be enough to add manually a route for the particular remote ip/net going through the dead router (and thus the interface he wants)?


Giuliano
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: bind() not working for outbound socket connections...
      • From: Philip George <email@hidden>
References: 
 >bind() not working for outbound socket connections... (From: Philip George <email@hidden>)
 >Re: bind() not working for outbound socket connections... (From: Justin Walker <email@hidden>)

  • Prev by Date: passwordserver_sasl-59.2
  • Next by Date: Re: bind() not working for outbound socket connections...
  • Previous by thread: Re: bind() not working for outbound socket connections...
  • Next by thread: Re: bind() not working for outbound socket connections...
  • Index(es):
    • Date
    • Thread