Examples/Documentation of bind9.4 libs

Danny Mayer mayer at gis.net
Fri Aug 24 02:48:57 UTC 2007


Phil Nick wrote:
> Greetings all,
> I am currently working on a multi-platform (Win32,AIX,Linux,SCO) c/c++
> program which communicates over the internet on a regular interval.
> Currently we use a hard coded IP for our software to be able to call home.
> We are interested in adding the ability to use a dns name instead, but have
> no control over how the system we are running on is configured and are not
> able to make changes. I began searching for a library to allow our software
> to resolve dns names. Bind seemed to be the best solution I have found.
> 
> My ultimate goal is the ability to specify our own resolv.conf with name
> servers we know are good and resolve the names we need.
> 
> I have been able to make simple resolver.exe which does what I need. I used
> nslookup as an example of how to use your libs. All I changed was where the
> bind libs look for resolv.conf and made a version of nslookup which just
> takes in one name and outputs a ip.
> 
> I am still trying to wrap my head around the bind code. Is the isc_app setup
> meant to be thread safe? My problems begin to manifest when I try to use the
> bind libs in a threaded environment. I am not sure if the problem is my
> messing around with nslookup code or if the underlying libs are not meant to
> be used in a threaded environment.
> 
> 
> Thanks for your time,
> Phil

Is getaddrinfo() which is available in all O/S's these days not
sufficient for you? It should give you what you need.

Danny



More information about the bind-users mailing list