Re: Determinining which IF will get the traffic to arbitrary remote address
Re: Determinining which IF will get the traffic to arbitrary remote address
- Subject: Re: Determinining which IF will get the traffic to arbitrary remote address
- From: Josh Graessley <email@hidden>
- Date: Thu, 23 Feb 2006 17:01:27 -0800
What you need is a routing socket. You can use the routing socket to
get the route given a destination IP address. See the route command
in the network_cmds project for some (perhaps ugly) sample code. The
route will include the interface packets to that destination will be
sent through. As of 10.3 I think, you can perform a route get without
being root. Any route operation that modifies the route table will
require root.
It's probably obvious, but anything beyond the local network may not
be accessible at those speeds. In addition, the speed of a wireless
network will vary based on how far you and the person you are talking
to are from the access point.
-josh
On Feb 23, 2006, at 4:56 PM, troy wrote:
I am tasked with reporting the linkspeed of the connection to an
arbitrary remote host.
I have the first part of this task working, thanks to old sample
code that walks the IOKit registry of en{x} links for linkspeeds,
but I need some way of mapping remote host ip addresses (in_addr)
to the interface that will get it.
Help?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden