Re: attached gateways
Re: attached gateways
- Subject: Re: attached gateways
- From: Chase <email@hidden>
- Date: Tue, 28 Jun 2005 11:55:16 -0500
fd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
Here is what the code to read from it looks like:
struct sockaddr_in from;
socklen_t len;
char buf[8192];
int result;
result = recvfrom(fd, buf, 8192, 0, (struct sockaddr *)&from, &len);
Hope this helps,
Thanks. It yields the same net effect, unfortunately.
Before I travel too far down this tangent (and drag you all with me),
let me go back to the simple goal I'm trying to achieve:
My application simply needs to know the addresses of **all** of the
routers attached to the computer's various networking interfaces.
For example, on my ibook, I have an airport connection to one router
(192.168.0.250) and a cat5 connection to another router (192.168.1.250).
When I open system prefs, click "Network", and look at the TCP/IP
section of Airport, I see "Router: 192.168.0.250".
When I look at the TCP/IP section for Built-in Ethernet, I see
"Router: 192.168.1.250".
What is the simplest way to get that exact same information?
That's all I want.
- Chase
_______________________________________________
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