Menu

#22 Resolver discovery for Mac OS X

open
nobody
None
5
2011-03-22
2011-03-22
Wim Lewis
No

This adds a simple function which populates the resolver list on a Mac OS X system by invoking the 'scutil' command and parsing its output. The output of this command is a set of sets of lines like this:

resolver #1
domain : foo.bar.com,
search domain[0] : foo.bar.com
search domain[1] : bar.com
nameserver[0] : 10.0.1.1
nameserver[1] : 10.0.1.2
order : 200000

Many of the entries are for multicast-DNS (blahblah.local) support and don't have any nameserver lines so they're ignored by this function.

Discussion

  • Wim Lewis

    Wim Lewis - 2011-03-22

    Patch to invoke scutil(8) to discover resolvers

     
  • Scott Kitterman

    Scott Kitterman - 2011-07-27

    I've incorporated this for py3dns (the Python 3 port of pydns). It will be part of the next release.