question_fromWire 645 B

123456789101112131415161718192021222324252627282930313233
  1. #
  2. # Wire-format data of a sequence of DNS questions.
  3. # foo.example.com. IN NS
  4. # bar.example.com. CH A (owner name is compressed)
  5. # and some pathological cases
  6. #
  7. # 0 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 (-th byte)
  8. #(3) f o o (7) e x a m p l e (3) c o m .
  9. 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
  10. #7 8 9 20
  11. # type/class: NS = 2, IN = 1
  12. 00 02 00 01
  13. # 1 2 3 4 5 6
  14. #(3) b a r [ptr=0x04]
  15. 03 62 61 72 c0 04
  16. #7 8 9 30
  17. # type/class: A = 1, CH = 3
  18. 00 01 00 03
  19. # owner name is broken
  20. #1
  21. # invalid label type
  22. ff
  23. #2 3 4 5
  24. #type/class IN/A
  25. 00 01 00 01
  26. # short buffer
  27. # (root name)
  28. 00
  29. #class is missing
  30. 00 01