Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



why is bind() not letting me specify a particular interface (on a multihomed system) to send socket messages thru?

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.

please tell me how to either get bind() working or to do what i'm trying to do in some other way.

thanks.

- philip


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.