site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jun 29, 2005, at 15:56 , Andre Smith wrote: -pmb _______________________________________________ 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... At 5:16 PM -0700 6/29/05, Justin C. Walker wrote: The routing tables that exist on a workstation or even a server will usually only contain the route for a default router; this could also obtained using a DCHP server. If you want to discover routes advertised by routers, you probably need to implement BGP, etc. There are numerous routing protocols described in detail by RFCs, just do a google search, and you should be well on your way. Be forewarned, it will take a lot more code than a simple ping to obtain advertised routes from internet routers. Good Luck. I think, now that the dust has cleared, that Chase just wants to "know the routers that the workstation knows" (whatever that may mean). On Mac OS X, it means - querying the SystemConfiguration database - finding router addresses when those are manually configured - querying BootP/DHCP/... when they are not (depending on what's recorded for each 'location'). If that is indeed what he wants, I still don't understand why it's that complicated. Netstat can clearly identify which routes are gateways. The system has to be able to do that. There might not be a way to get netstat to give you a list of only gateways (other than using grep), but clearly the information can be had the same way netstat gets it, via the procedures explained in 'man 4 route'. All the other mechanisms, including the SystemConfig database, are just hints or possibilities. Actual packets will follow the routing table displayed by 'netstat -r'. If you want to know where actual packets will go, then get that info the same way netstat gets it. This email sent to site_archiver@lists.apple.com