Response to client logging

Dario Lombardo at
Thu May 29 08:01:52 UTC 2014

Hello everybody
I'm digging into the named source code because I would like to add a
single log line that shows me some info about the response named is
going to send back to the client. What I would like to log is:
- client ip address
- qname/qtype/qclass
- size of the response
- number of rr for every section

I've found many points in the code where I can find those infos, but
not all together. What I've find so far (bind 9.10.0-P1):

bin/named/query.c:8381 (around) => can find client ip, qname, qtype,
qclass, but I miss the resp
lib/dns/resolver.c:8726 (around) => can find  qname, qtype, qclass,
but I miss client ip and resp

Can anybody help me to find a point in the code where I can get what I need?

More information about the bind-workers mailing list