[bind10-dev] bind source code
Myeong Lim
maumtech at gmail.com
Wed Nov 3 00:48:35 UTC 2010
Hi all.
I started reading source code of bind 9.
Is there any book and documentation of the data sturctures etc?
The immediate questions I have is:
1.
I am trying to modify (spoof) the incoming query right after it
receives.
For example, when smeone requests like below
%dig www.google.com
Inside bind code, right after I receive it, I want to change
www.google.com to www.yahoo.com.
Which module/data structure is the right place?
I am thinking right after* dns_message_parse * of* client.c.*
When I put the debugging statement, query is saved to *
message->sections[0].head->ndata*
result = dns_message_parse(client->message, buffer, 0);
fprintf(stderr, "After Parsing,
client->message->sections[0].head->ndata= %s\n",
client->message->sections[0].head->ndata);
2.
Second question is related to the first question.
ndata has the format of www[0001]google[0008]com
Each dot is replace by couple bytes (0003,0008 something like that).
What is this? Why dot is replaced like that.
I found that* dns_name_print* (0 put it back to www.google.com though.
Any help on this?
I really hope some documentation about data sturctures of the bind code.
Thanks.
-Myeong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20101102/87a18281/attachment.html>
More information about the bind10-dev
mailing list