RE: How to get the list of current DNS servers on iPhone?
RE: How to get the list of current DNS servers on iPhone?
- Subject: RE: How to get the list of current DNS servers on iPhone?
- From: Kenny Millar <email@hidden>
- Date: Mon, 12 Oct 2009 09:08:09 +0100
You might get a faster answer over at
https://devforums.apple.com/community/iphone
-Kenny
-----Original Message-----
From: macnetworkprog-bounces+kennymillar=email@hidden
[mailto:macnetworkprog-bounces+kennymillar=email@hidden] On
Behalf Of Alex Curylo
Sent: 12 October 2009 05:03
To: email@hidden
Subject: How to get the list of current DNS servers on iPhone?
So I've got this code that does asynchronous DNS resolution using the
ares library that I need to port to the iPhone. Getting the list of
DNS servers on the desktop is straightforward,
SCDynamicStoreContext context = {0, NULL, NULL, NULL, NULL};
SCDynamicStoreRef store = SCDynamicStoreCreate(NULL,
CFSTR("init_by_defaults_systemconfiguration"), NULL, &context);
CFStringRef key = CFSTR("State:/Network/Global/DNS");
CFDictionaryRef dnsDict = SCDynamicStoreCopyValue(store, key);
CFArrayRef addresses = (CFArrayRef) CFDictionaryGetValue(dnsDict,
kSCPropNetDNSServerAddresses);
... but the SCDynamicStore APIs aren't available on the iPhone and
it's not immediately evident what an equivalent might be. Any
suggestions?
--
Alex Curylo -- email@hidden -- http://www.alexcurylo.com/
Optimists see the glass half full. Pessimists see the glass half empty.
Engineers see that the glass is twice as big as it needs to be.
_______________________________________________
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
_______________________________________________
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