Replies to Queries

Kevin Darcy kcd at daimlerchrysler.com
Tue Jan 9 01:54:10 UTC 2001


I'm not that familiar with the BIND 9 codebase yet, and I don't know if
there is any kind of source-code documentation for it. The code is more
structured and modular, though, so I imagine it wouldn't be too
difficult to figure out.

In BIND 8, much of the logic to which you refer is found scattered
between ns_req.c and ns_resp.c (ns_req.c is where the incoming query is
analyzed; if the query can be satisfied entirely from the cache and/or
authoritative data, taking into account the "fetch-glue" setting, or
it's a non-recursive query or recursion is denied, then it is answered
directly without recursive effort; otherwise it shoots off a query to
some other nameserver; in ns_resp.c, responses from other nameservers
are analyzed and absorbed, and if the answer to the client's query is
complete, it then sends the response to the client; otherwise it
continues work on the answer by sending another query to another
nameserver). Don't say you weren't warned about the state of the BIND 8
code, though...


- Kevin

Questions Answers wrote:

> Thanks Kevin.
> Another followup question:
>
> Is there some documentation that exists about the
> source code of BIND 8 and/or 9. I mean the
> functionality contained in the files of different
> modules, and so on? If so, could someone please pass
> me the pointer to it? I need to hack a bit of BIND
> code for my use.
> Basically, I want the points :
> 1. where queries(especially for name-to-IP lookups)
> received by named, are evaluated for their type and
> where they come from
> and
> 2. Where "answer fields" to the queries are filled up
> for the query received.
>
> Even a broad pointer to a module/sets of files to look
> into, would be greatly appreciated!!
>
> Thanks people
>
> --- Kevin Darcy <kcd at daimlerchrysler.com> wrote:
> >
> > This functionality is plastered all over the BIND 8
> > code. This is no
> > doubt a big part of the reason why BIND 8 was
> > completely rewritten to
> > produce BIND 9. If you plan on hacking BIND code,
> > I'd strongly recommend
> > setting your sights on BIND 9 instead of BIND 8.
> >
> >
> > - Kevin
> >
> >
> > Questions Answers wrote:
> >
> > > Hello All
> > >
> > > Could someone give me some pointers to the
> > portions of
> > > code where BIND
> > > 1. determines what kind of request is received
> > > 2. determines the IPs to be returned ( in case of
> > name
> > > lookups)
> > > 3. actually sends the answer back
> > >
> > > I am using BIND Version 8.2.2 patchlevel 7 on
> > Linux RH
> > > 6.2
> > >
> > > Thanks much
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Photos - Share your holiday photos online!
> > > http://photos.yahoo.com/
> >
> >
> >
> >
> >
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/






More information about the bind-users mailing list