title: how can i decipher dns messages?
body: <p>i'm writing a program to receive dns messages and respond an appropriate answer(a simple dns server that only reply A records).<br />
  but when i receive messages it's not like the described format in 1035 RFC. <br />
  for example this is a dns query generated by nslookup:<br /></p>
  
  <pre><code>'\xe1\x0c\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x06google\x03com\x00\x00\x01\x00\x01'
  </code></pre>
  
  <p>i know about dns headers and bits as defined in 1035 RFC but why it should be in hex?<br />
  should i consider them as hex numbers or their utf-8 equivalents?<br />
  should my responses have this format too?  <br /></p>