Writing a client to query DNS

Barry Margolin barmar at bbnplanet.com
Fri Feb 25 16:22:05 UTC 2000


In article <900E7814F4BCD111B5F600600877FCD1EB1481 at MAIL_SERVER>,
Matthew Thompson  <matthewt at fairplay.co.uk> wrote:
>QNAME LengthOctet: 00010010 (18)
>QNAME Data: www.fairplay.co.uk
>QNAME NullOctet: 00000000 (0)

In the DNS protocol, each label in a name is sent as a separate string.  So
this should be:

QNAME LengthOctet: 00000011 (3)
QNAME Data: www
QNAME LengthOctet: 00001000 (8)
QNAME Data: fairplay
QNAME LengthOctet: 00000010 (2)
QNAME Data: co
QNAME LengthOctet: 00000010 (2)
QNAME Data: uk
QNAME NullOctet: 00000000 (0)

Your query was trying to look up a name that would have been entered into
the root zone as:

www\.fairplay\.co\.uk

-- 
Barry Margolin, barmar at bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



More information about the bind-users mailing list