Programmatically obtain DNS servers of host

Posted by Nicholas Palko on Stack Overflow See other posts from Stack Overflow or by Nicholas Palko
Published on 2010-05-26T20:48:13Z Indexed on 2010/05/26 20:51 UTC
Read the original article Hit count: 209

Filed under:
|
|

Using C++, I would like to obtain the DNS servers being used by a host for three operating systems: OS X, FreeBSD, and Windows. I'd like confirmation that the approaches below are indeed best practice, and if not, a superior alternative.

  • OS X: already answered; updated link at developer.apple.com
  • Windows: [GetNetworkParms](http://msdn.microsoft.com/en-us/library/aa365968(VS.85).aspx)
  • FreeBSD: /etc/resolv.conf

Thanks in advance for your help!

© Stack Overflow or respective owner

Related posts about c++

Related posts about cross-platform