• 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
Re: adding/removing DNS servers in Mac OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding/removing DNS servers in Mac OS X


  • Subject: Re: adding/removing DNS servers in Mac OS X
  • From: Quinn <email@hidden>
  • Date: Thu, 14 Mar 2002 17:23:34 +0000

At 10:28 -0500 14/3/02, Rob Newberry wrote:
I'd prefer a solution that works on Darwin, so if that excludes the SCF,
no biggie. What I'd really like to know is, what is the correct mechanism
for adding/removing DNS servers, and where can I find out how to use those
APIs?

I believe that the correct way to do this would be via SCF. SCF is part of Darwin, so that's not an obstacle to you using it. SCF also takes care of taking the appropriate actions based on what you change; you don't have to hard code lookupd signals and so on, because SCF already contains that knowledge.

For an example of how to make this work, take a look at the Darwin PPP code.

<http://www.opensource.apple.com/projects/darwin/1.4/source/apsl/ppp-2.3.11-57.tar.gz>

If you search for the string "kSCPropNetDNSServerAddresses" you'll find two hits that are both relevant. The basic idea is that your code can change the kSCPropNetDNSServerAddresses property in the state domain of the dynamic store. The "Kicker" confid plug-in will see that change and do whatever is necessary to make the system comply.

Of course, I've never tried this myself, so I can't be 100% sure. But that's where I'd start.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >adding/removing DNS servers in Mac OS X (From: Rob Newberry <email@hidden>)

  • Prev by Date: RE: adding/removing DNS servers in Mac OS X
  • Next by Date: Re: Modem Port
  • Previous by thread: Re: adding/removing DNS servers in Mac OS X
  • Next by thread: RE: adding/removing DNS servers in Mac OS X
  • Index(es):
    • Date
    • Thread