From a Mac OS X app, I want to resolve some domain names using a specific DNS server (that has not been set in System Preferences), and easily retrieve the resolved addresses.
I can do this in Terminal with nslookup google.com DNS_SERVER
but can't find a simple way to accomplish it in Objective-C. I though NSHost
would have a similar way to specify the DNS server to resolve with, but unfortunately it doesn't.
Any suggestions as to how to go about this?