• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to get the list of current DNS servers on iPhone?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get the list of current DNS servers on iPhone?


  • Subject: How to get the list of current DNS servers on iPhone?
  • From: Alex Curylo <email@hidden>
  • Date: Sun, 11 Oct 2009 21:03:05 -0700

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


  • Follow-Ups:
    • RE: How to get the list of current DNS servers on iPhone?
      • From: Kenny Millar <email@hidden>
  • Prev by Date: Re: SO_NOSIGPIPE option.
  • Next by Date: RE: How to get the list of current DNS servers on iPhone?
  • Previous by thread: Re: SO_NOSIGPIPE option.
  • Next by thread: RE: How to get the list of current DNS servers on iPhone?
  • Index(es):
    • Date
    • Thread