This commit is contained in:
Tony Garnock-Jones 2011-09-19 17:38:47 -04:00
parent 0d015c6e9c
commit 7bc67b0c7f
1 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,8 @@
(define (packet->dns-message packet)
(bit-string-case packet
([ (id :: bits 16)
;; 16 bits of flags, opcode, and response-code:
(qr :: (t:named-bit 'request 'response))
(opcode :: bits 4)
(aa :: (t:named-bit 'non-authoritative 'authoritative))
@ -154,6 +156,7 @@
(ra :: (t:named-bit 'no-recursion-available 'recursion-available))
(= 0 :: bits 3)
(rcode :: bits 4)
(qdcount :: bits 16)
(ancount :: bits 16)
(nscount :: bits 16)