Hi all.<br><br>I started reading source code of bind 9.<br><br>Is there any book and documentation of the data sturctures etc?<br><br>The immediate questions I have is:<br><br>1. <br> I am trying to modify (spoof) the incoming query right after it receives.<br>
For example, when smeone requests like below<br> %dig <a href="http://www.google.com">www.google.com</a><br> <br> Inside bind code, right after I receive it, I want to change <a href="http://www.google.com">www.google.com</a> to <a href="http://www.yahoo.com">www.yahoo.com</a>. <br>
Which module/data structure is the right place? <br> I am thinking right after<b> dns_message_parse </b> of<b> client.c.</b><br> When I put the debugging statement, query is saved to <b>message->sections[0].head->ndata</b><br>
<br> result = dns_message_parse(client->message, buffer, 0);<br><br> fprintf(stderr, "After Parsing, client->message->sections[0].head->ndata= %s\n", client->message->sections[0].head->ndata);<br>
<br>2.<br> Second question is related to the first question.<br><br> ndata has the format of www[0001]google[0008]com<br> Each dot is replace by couple bytes (0003,0008 something like that).<br> What is this? Why dot is replaced like that. <br>
I found that<b> dns_name_print</b> (0 put it back to <a href="http://www.google.com">www.google.com</a> though.<br><br>Any help on this?<br><br>I really hope some documentation about data sturctures of the bind code.<br>
<br>Thanks.<br><br>-Myeong <br><br><br>