Get Router using SystemConfigration Framework
Get Router using SystemConfigration Framework
- Subject: Get Router using SystemConfigration Framework
- From: Link Dupont <email@hidden>
- Date: Sun, 25 Jan 2009 16:58:15 -0800
Hey all,
I've been reading over the archives of this list, and didn't seem to find the answer to my question, so here goes (apologies if this is totally n00b, or the totally wrong list to post to; I'm relatively new to Mac OS X and network programming).
My ultimate goal is to write a small daemon that watches the link status of my network devices, and manually injects/changes a route into my routing table. In order to do that, I need the gateway of my en0 device. I'm trying to find the router IP address of my en0 device. I've found the router information of my *default* device via SystemConfiguration, but I want to get the router of a specific device.
My instinct tells me this should be available from within the SystemConfiguration framework. I've tried to use the SCNetworkInterfaceGetConfiguration function on my "Ethernet" interface, but it returns NULL. Am I expecting some results when I shouldn't be? What is the expected use/output of the SCNetworkInterfaceGetConfiguration function?
Thanks in advance! |
_______________________________________________
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