On 19/02/2014 12:56, Florian Weimer wrote:

It's encoded as a bit field, like this:

  0000 0000  end of name
  00xx xxxx  regular label of length xxxxxx
  11yy yyyy  upper 6 bits of a compression reference
             (followed by another byte containing the lower 8 bits)
  01zz zzzz  used to be invalid, then extended type, then invalid again
  10zz zzzz  invalid

I could rename the variable to typeAndLength.
Right, just too easy to mis-read compared to the original code. Using typeAndLen would be okay, so would "int len = type" and using len when constructing the String. Anything to make it easier for future maintainers.

:

It is thrown by DNSName#add(int, String).
Okay, I guess that is okay (I was mostly just wondering whether DnsName.add is throwing the most appropriate exception).

So I think we are almost done and this and I can push it for you.

-Alan

Reply via email to