Re: Routing Information
Re: Routing Information
- Subject: Re: Routing Information
- From: "Pablo Bendersky" <email@hidden>
- Date: Tue, 13 Jun 2006 08:36:05 -0300
My question is Cocoa related. While I know how to find the default
gateway using the command line, I don't know how to find it using
Cocoa.
I found SystemConfiguration.framework may provide the information, but
can't find samples on how to do it.
Thanks.
On 6/12/06, Chris Suter <email@hidden> wrote:
On 13/06/2006, at 10:13 AM, Pablo Bendersky wrote:
> Hi,
> Is there any way of getting the default gateway's IP address?
> So far, my solution would be to use an NSTask and parse the result of
> running netstat.
> Is there any other alternative?
> Thanks in advance.
This isn't really Cocoa.
Have a look at the route(4) man page. (Haven't tried this myself but
it looks promising.)
I'd have thought you could also find the source for netstat somewhere.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden