Source Code Question

Kevin Darcy kcd at daimlerchrysler.com
Sat Jan 13 04:07:13 UTC 2001


According to the comments in the code, nlookup() looks up a "name" in a
particular hashed (i.e. in-core) database, and will optionally insert an
entry into that database.

Of course a "name" can own a variable number of RRsets, which in turn
can each have a variable number of RRs associated with them. So there's
potentially a lot more work to do after calling nlookup() in order to
get the data one needs. See the big loop in finddata() (in
ns_resp.c) for an example of walking through all of the "datum" structs
associated with a given "namebuf" struct (there's a similar loop in
req_query() itself). Note that the database may also contain negative
caching entries, or expired cache entries, so you have to look at
"datum" structs carefully to tell whether they represent "real" data or
not.


- Kevin

Questions Answers wrote:

> Hello the BIND code hackers/creators out there!
>
> I am using BINS 8.2.2 P7. Could someone please throw
> some light on what the following function in the
> source code is supposed to do :
>
> file : src/bin/named/db_lookup.c
> line : 108
> function : nlookup()
>
> I can see it being called in the debugging output also
> e.g the line
> req: nlookup(galt.cs.bu.edu) id 29574 type=1 class=1
> which corressponds to the following in the code
>
> file : src/bin/named/ns_req.c
> line : 735
> function : req_query()
>
> Thanks much
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/






More information about the bind-users mailing list