This is a discussion on Re: Developing against libbind - DNS ; Mark Andrews wrote: >> Hi, >> >> I apologise if this is the wrong place for this type of question, but >> I'm developing an application that needs to do DNS lookups, and I cannot >> find any documentation about ...
Mark Andrews wrote:
>> I apologise if this is the wrong place for this type of question, but
>> I'm developing an application that needs to do DNS lookups, and I cannot
>> find any documentation about how to use libbind. I have build bind
>> 9.5.0 with --enable-libbind and cannot find anything helpful (except the
>> header files) in the build.
>> Can anyone point me in the direction of any documentation available
>> showing how to use the Bind library to do DNS lookups from a C application?
> Most UNIX boxes already have most of the man pages. You can
> also just down load the documentation tar ball from BIND 8.
> "libbind" is from BIND 8.
> "man resolver" will get you most of the man pages.
"man resolver" just gets me the documentation of how to use
/etc/resolver.conf - what I'm looking for is some documentation of an
API to resolve DNS names, including A, MX, PTR and SRV records from a C
application we're developing. I've read about Bind's resolver library
and was hoping to use that.
- Our application links to bind resolver library to process DNS calls
- The bind library contacts the local lwresd, which gets the info from
the DNS (our nameservers, which run Bind 9.5)
- The bind library passes the result back to the application
I've found plenty of documentation of how to get lwresd up and running,
but nothing saying how to code our application to use this library.
From what I can tell from the GNU documentation, the GNU C Library
calls can only lookup IP addresses (using gethostbyname) hence why I
wanted to use bind's library.
Hope this helps to explain more what I'm trying to achieve, and why I'm
a bit stuck. Paul Vixie very kindly sent me a sample application which
I can sort of get my head around, but I was hoping there'd be some clear
documentation similar to the GNU C Manual for Bind's resolver library.