(no subject)

Kevin Darcy kcd at daimlerchrysler.com
Wed Apr 18 21:37:02 UTC 2001


Look at RFCs 1034 and 1035, for starters. Those and later RFCs are present in the
doc/rfc subdirectory of the BIND distribution.

What you want to do is non-trivial, given things like name compression, aliasing,
variable-length labels, records and sections (records have different meanings in
different sections, etc.) and other factors. It's not just as simple as "the
answer to the question is always at offset X from the beginning of the packet" or
even "the answer to the question is always the first RR in the Answer Section".
There's lots of variation and complication. If I were you, I would probably try to
plagiarize some existing resolver code rather than attempting to write my own from
scratch.


- Kevin

nilesham38 wrote:

> Hello,
>
> I want to know what is the format of dns query and response in a udp datagram .
>
> I want to parse the entire packet in a program .
>
> Please reply as soon as possible.
>
> Thanx in advance,
> Nilesh.
>
> Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com





More information about the bind-users mailing list