Programmatically obtain DNS servers of host
- by Nicholas Palko
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!