Re: Network Interface for a Given Destination Address
Re: Network Interface for a Given Destination Address
- Subject: Re: Network Interface for a Given Destination Address
- From: Josh Graessley <email@hidden>
- Date: Fri, 9 Mar 2007 11:10:01 -0800
On Mar 9, 2007, at 12:57 AM, Jones Curtis wrote:
On Mar 9, 2007, at 03.43.27, Michael Smith wrote:
It's my understanding that advisory forms of the kernel's routing
policy decisions are not exported to userspace.
There are good reasons for this; not the least of which being that
between obtaining such advice and actually committing to a
decision based on that advice, the validity of the advice may
expire due to changes in the system's topology.
I realise this doesn't help you much, but telling the future is a
tough business. 8(
Thanks for the reply.
The conditions under which the system's topology might change (DHCP
server says to, user unplugs ethernet cable, cordless phone/
microwave interferes with wireless network and causes loss of
connectivity, etc.) are all possibilities I'll have to live with.
Knowing the future would certainly be helpful, but I'm content with
knowing how it would proceed if it were to happen presently.
Is there no KPI interface for asking the routing table for the
gateway ip address for a given destination address?
I think you want a routing socket (AF_ROUTE). I'm not familiar with
the details of how routing sockets work, but I'll bet there is some
good code in the route command. Check to see how "route get" works.
-josh
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden