Record Name field in DNS responce

Posted by Lescott on Stack Overflow See other posts from Stack Overflow or by Lescott
Published on 2012-04-11T11:19:16Z Indexed on 2012/04/11 11:29 UTC
Read the original article Hit count: 169

Filed under:
|

I just read about DNS protocol, and found, that the name field can be writen in two ways:

  1. lenght of the next label the label lenght of the next label the label ... zero-byte
  2. pointer to the previous name field

Next is the original article fragment:

The Resource Record Name field is encoded in the same way as the Question Name field unless the name is already present elsewhere in the DNS message, in which case a 2-byte field is used in place of a length-value encoded name and acts as a pointer to the name that is already present.

So, my question is, how can I determine the first or the second way is using in a package?

© Stack Overflow or respective owner

Related posts about dns

Related posts about internet