Commit | Line | Data |
---|---|---|
dc0d77d7 CE |
1 | The tinydns data.cdb format is subject to change. If you want to write |
2 | code that relies on something here, let me know. | |
3 | ||
4 | Keys starting with the two bytes \000\045 are locations. The rest of the | |
5 | key is an IP prefix, normally between 0 and 4 bytes long. The data is a | |
6 | 2-byte location. | |
7 | ||
8 | Other keys are owner names for DNS records. The data begins with a | |
9 | header in the following format: | |
10 | ||
11 | * a 2-byte type; | |
12 | * either \075, or \076 with a 2-byte location; | |
13 | * a 4-byte TTL; | |
14 | * an 8-byte timestamp. | |
15 | ||
16 | (Exception: Wildcard records replace \075 with \052 and \076 with \053; | |
17 | also, the owner name omits the wildcard.) The data continues in a | |
18 | type-specific format: | |
19 | ||
20 | * SOA: first domain name, second domain name, 20-byte miscellany. | |
21 | * NS or PTR or CNAME: domain name. | |
22 | * MX: 2-byte preference, domain name. | |
23 | * Other types: no special structure. | |
24 | ||
25 | Domain names, types, and numbers are in DNS packet format. |