Re: bind() not working for outbound socket connections...
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On May 22, 2005, at 11:40 AM, Vincent Lubet wrote: [1] if i add a route, how do i make sure that the new route is chosen and nothing else? gotcha. makes perfect sense. [2] after using it, does the route need to be removed explicitly, or is closing the socket i used thru it enough? that's what i thought. just needed to hear it in plain english. [3] does adding a new route or deleting a route only apply to the context of my app or does it affect the entire system? that's what i thought. just needed to hear it in plain english. [4] i have already played with this a little, but the examples i'm going off of are a little over-the-top. if you know of a simple example of how this is done in C, please post a link. in any case, you're post was very helpful. thanks for answering all of my questions. - philip _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... The routing engine picks the route that is the more specific for the destination address. A host route is the more specific kind of route, so simply add a host route with the IP address of the dead router. You need to remove the route yourself, there is no connection between the socket layer and the routing table. It's a system wide setting (that's why it's a privileged operation) I suggest to have a look at the source code of the "route" command in Darwin or FreeBSD repository. that's actually one of the sources i was referring to above. but, since my last post, i've cleared out most of the stuff i'm not interested in and I can now see the some semblance of simplicity in it. and by the way, Giuliano, thanks for actually helping out instead of talking down to me and then giving me a reading assignment. i've been plagued with unhelpful responses on this issue on three lists... mostly from the same guy chasing me from list to list. Because you have out of the ordinary requirements you really need to understand what you are doing especially when changing system wide settings. understood. but, it's presumptuous to assume that i don't already get that. it's not helpful to avoid answering questions and instead repeatedly blast back negativity and reading assignments at someone. the posts i'm referring to were not done in a spirit of helpfulness. they were done in a spirit of know-it-all-ism. not cool. This email sent to site_archiver@lists.apple.com
participants (1)
-
Philip George