Response to client logging

Dario Lombardo dario.lombardo.ml at gmail.com
Thu May 29 14:42:15 UTC 2014


Hi Mark, and thanks for your answer.

AFAIK, from client->peeraddr I can get ip address of the client, from
client->query the details of the query. I can't figure out where I can
find size of the response and RR details. Can you help me?

On Thu, May 29, 2014 at 4:17 PM, Mark Andrews <marka at isc.org> wrote:
>
> bin/named/client.c:client_send
>
> In message <CAOYJJfsd9YAm=Qbx2J1pT_sjR=yp40LemeM2aAps9XWHR_BXFg at mail.gmail.com>
> , Dario Lombardo writes:
>> 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?
>> _______________________________________________
>> bind-workers mailing list
>> bind-workers at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/bind-workers
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org


More information about the bind-workers mailing list