1 The IP-over-DNS protocol is as follows:
4 We don't want to go outside alphanumerics and hyphens,
5 ie hostname-legal. So we do base32 encoding:
6 8 hostname characters encoding 5 bits each, which encodes
10 - client splits packet into appropriate fragments
16 We use CNAME queries. The request/response Q and R are bit-encoded
17 into the labels of the query domain and answer section domains,
20 The server maintains a local cache of questions we have been asked and
21 answers we gave. Neither side ever retries packets; so any responses
22 from our server's cache are due to resolvers between the client and
30 4 bits Length of client-message-nonce in bits,
31 0 meaning 16; default is 8
32 remaining Unfragmented response message data bytes
34 R 5 bits Length of associd in bits
35 0 meaning 32; default is 8
53 remaining Unfragmented response message data bytes
56 4 bits Double-logarithmic server queue length
57 # ciel(log_2( Number of bytes of queued message data ))
58 # except that if no queued message data, value is 0
61 [ If there is actually any data to send:
63 [ If not only fragment:
64 1 bit Final fragment ?
65 12 bits Fragment offset
66 [ In packets from server:
67 8 bits netlink-packet-sequence-number
68 # In payloads from client, the client-message-nonce
69 # is used for reassembly.
75 associd := n bits as specified in Create Association response
77 client-init-nonce := 64 bits Random number
78 client-message-nonce := some bits Sequence number, starts at random value
79 # Ie if we start having more than 255 queries outstanding, we're
80 # going to start losing things. With our default TTL of 1s and
81 # a compliant DNS server, that might limit us to 255 packets/sec.
82 # With noncompliant DNS servers it might reduce available bandwidth.