DNS labels use the format <length><data ...> .
A label can contain a maximum of 63 bytes, so the <length> field has two bits remaining higher. They are used to encode the type of label.
If the upper two bits are 0b11 , then the other six bits are instead combined with the next byte, forming a compression pointer, which is an offset in the DNS payload, to the previous instance of another label.
Because the DNS protocol header is 12 bytes long, the shortest legal offset is 12 bytes, which gives the value you saw above 0xc00c .
[technically, you can create a compression pointer that points to a header, but does not strictly follow the protocol].
I would highly recommend not trying to reverse engineer the specification from wired packages - you will inevitably miss things. Just read RFC 1035 - all the basic things are there.
source share