Hi,
Thanks a lot. I got it. The function below copy the request in namebuf.
dns_name_format(client->query.qname, namebuf, sizeof(namebuf));
Now namebuf is "ABC.test.hss.hns.com".
Regards
-Sheel
Pete Ehlke <pde@xxxxxxxxxx> on 01/28/2003 07:51:12 PM
To: Satyendra Sheel/HSS@HSS
cc: bind9-users@xxxxxxx
Subject: Re: how to extract query name data from the request message...
On Tue, Jan 28, 2003 at 06:22:56PM +0530, ssheel@xxxxxxxxxxx wrote:
> Can anybody pls tell me to how to extract the query name data coming from
user
> in the query request message. When I do telnet "ABC.test.hss.hns.com" from
> command prompt , name server prints the query name data
> "client->query.qname->ndata" as below- :
>
> Query_name is : ^DABC^Etest^Chss^Chns^Ccom
>
> My requirement is to find out most frequently accessed server (say top 5 ) .
I
> want this name as "ABC.test.hss.hns.com" .
>
Just turn on query logging and parse the log file.
You'll see things like:
Jan 28 08:20:14 bastet named[135]: client 64.81.113.233#3850: query:
smilodon.rfc822.net IN A
|