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
- FreeBSD:
/etc/resolv.conf
Thanks in advance for your help!