~ubuntu-branches/ubuntu/raring/maradns/raring

« back to all changes in this revision

Viewing changes to deadwood-2.4.10/doc/internals/DNS.HEADER

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2010-01-24 12:17:40 UTC
  • mfrom: (1.1.13 upstream) (10.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100124121740-a4e1fjobwaouz443
Tags: 1.4.02-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This is how we handle the DNS header in the recursive client.
 
2
 
 
3
ID: Stored and given back to client; not cached
 
4
QR: Must be 0 for packet to be accepted; all replies give this a 1 value
 
5
OPCODE: Must be 0; 0 in replies
 
6
AA: Value in query ignored; 0 in replies
 
7
TC: Truncation.  Ignore value in query; ignore replies where this is 1
 
8
    (for now; we may do tcp stuff later)
 
9
RD: Must be 1 in query; is 1 in reply
 
10
RA: Ignored in query; is 1 in reply (because of brain-dead DNS clients)
 
11
Z: Must be all 0 in query; set to all 0 in reply
 
12
RCODE: Must be 0 in query; usually 0 (OK) in reply but can be 2 (server
 
13
       failure) should we be unable to connect to any nameservers
 
14
QDCOUNT: Must be 1 in query; is 1 in reply (we echo the question)
 
15
ANCOUNT: As per the reply we get from the remote server (this number
 
16
         will be stored in the cache)
 
17
NSCOUNT, ARCOUNT: Same as ANCOUNT