Comparison

util/dnsregistry.lua @ 12238:57215267dd4f

util.dnsregistry: Regenerate from IANA registry Note the duplicate 9 and 16 entries, neither of which are especially relevant for our resolver usage.
author Kim Alvefur <zash@zash.se>
date Wed, 02 Feb 2022 17:31:39 +0100
parent 12236:d0dfd48806f9
child 12856:89bc598c7051
comparison
equal deleted inserted replaced
12237:b35714c57442 12238:57215267dd4f
1 1 -- Source: https://www.iana.org/assignments/dns-parameters/dns-parameters.xml
2 -- Converted from 2 -- Generated on 2022-02-02
3 -- http://www.iana.org/assignments/dns-parameters 3 return {
4 -- 2020-06-25 4 classes = {
5 5 ["IN"] = 1; [1] = "IN";
6 local classes = { 6 ["CH"] = 3; [3] = "CH";
7 IN = 1; "IN"; 7 ["HS"] = 4; [4] = "HS";
8 nil; 8 ["ANY"] = 255; [255] = "ANY";
9 CH = 3; "CH"; 9 };
10 HS = 4; "HS"; 10 types = {
11 ["A"] = 1; [1] = "A";
12 ["NS"] = 2; [2] = "NS";
13 ["MD"] = 3; [3] = "MD";
14 ["MF"] = 4; [4] = "MF";
15 ["CNAME"] = 5; [5] = "CNAME";
16 ["SOA"] = 6; [6] = "SOA";
17 ["MB"] = 7; [7] = "MB";
18 ["MG"] = 8; [8] = "MG";
19 ["MR"] = 9; [9] = "MR";
20 ["NULL"] = 10; [10] = "NULL";
21 ["WKS"] = 11; [11] = "WKS";
22 ["PTR"] = 12; [12] = "PTR";
23 ["HINFO"] = 13; [13] = "HINFO";
24 ["MINFO"] = 14; [14] = "MINFO";
25 ["MX"] = 15; [15] = "MX";
26 ["TXT"] = 16; [16] = "TXT";
27 ["RP"] = 17; [17] = "RP";
28 ["AFSDB"] = 18; [18] = "AFSDB";
29 ["X25"] = 19; [19] = "X25";
30 ["ISDN"] = 20; [20] = "ISDN";
31 ["RT"] = 21; [21] = "RT";
32 ["NSAP"] = 22; [22] = "NSAP";
33 ["NSAP-PTR"] = 23; [23] = "NSAP-PTR";
34 ["SIG"] = 24; [24] = "SIG";
35 ["KEY"] = 25; [25] = "KEY";
36 ["PX"] = 26; [26] = "PX";
37 ["GPOS"] = 27; [27] = "GPOS";
38 ["AAAA"] = 28; [28] = "AAAA";
39 ["LOC"] = 29; [29] = "LOC";
40 ["NXT"] = 30; [30] = "NXT";
41 ["EID"] = 31; [31] = "EID";
42 ["NIMLOC"] = 32; [32] = "NIMLOC";
43 ["SRV"] = 33; [33] = "SRV";
44 ["ATMA"] = 34; [34] = "ATMA";
45 ["NAPTR"] = 35; [35] = "NAPTR";
46 ["KX"] = 36; [36] = "KX";
47 ["CERT"] = 37; [37] = "CERT";
48 ["A6"] = 38; [38] = "A6";
49 ["DNAME"] = 39; [39] = "DNAME";
50 ["SINK"] = 40; [40] = "SINK";
51 ["OPT"] = 41; [41] = "OPT";
52 ["APL"] = 42; [42] = "APL";
53 ["DS"] = 43; [43] = "DS";
54 ["SSHFP"] = 44; [44] = "SSHFP";
55 ["IPSECKEY"] = 45; [45] = "IPSECKEY";
56 ["RRSIG"] = 46; [46] = "RRSIG";
57 ["NSEC"] = 47; [47] = "NSEC";
58 ["DNSKEY"] = 48; [48] = "DNSKEY";
59 ["DHCID"] = 49; [49] = "DHCID";
60 ["NSEC3"] = 50; [50] = "NSEC3";
61 ["NSEC3PARAM"] = 51; [51] = "NSEC3PARAM";
62 ["TLSA"] = 52; [52] = "TLSA";
63 ["SMIMEA"] = 53; [53] = "SMIMEA";
64 ["Unassigned"] = 54; [54] = "Unassigned";
65 ["HIP"] = 55; [55] = "HIP";
66 ["NINFO"] = 56; [56] = "NINFO";
67 ["RKEY"] = 57; [57] = "RKEY";
68 ["TALINK"] = 58; [58] = "TALINK";
69 ["CDS"] = 59; [59] = "CDS";
70 ["CDNSKEY"] = 60; [60] = "CDNSKEY";
71 ["OPENPGPKEY"] = 61; [61] = "OPENPGPKEY";
72 ["CSYNC"] = 62; [62] = "CSYNC";
73 ["ZONEMD"] = 63; [63] = "ZONEMD";
74 ["SVCB"] = 64; [64] = "SVCB";
75 ["HTTPS"] = 65; [65] = "HTTPS";
76 ["SPF"] = 99; [99] = "SPF";
77 ["NID"] = 104; [104] = "NID";
78 ["L32"] = 105; [105] = "L32";
79 ["L64"] = 106; [106] = "L64";
80 ["LP"] = 107; [107] = "LP";
81 ["EUI48"] = 108; [108] = "EUI48";
82 ["EUI64"] = 109; [109] = "EUI64";
83 ["TKEY"] = 249; [249] = "TKEY";
84 ["TSIG"] = 250; [250] = "TSIG";
85 ["IXFR"] = 251; [251] = "IXFR";
86 ["AXFR"] = 252; [252] = "AXFR";
87 ["MAILB"] = 253; [253] = "MAILB";
88 ["MAILA"] = 254; [254] = "MAILA";
89 ["*"] = 255; [255] = "*";
90 ["URI"] = 256; [256] = "URI";
91 ["CAA"] = 257; [257] = "CAA";
92 ["AVC"] = 258; [258] = "AVC";
93 ["DOA"] = 259; [259] = "DOA";
94 ["AMTRELAY"] = 260; [260] = "AMTRELAY";
95 ["TA"] = 32768; [32768] = "TA";
96 ["DLV"] = 32769; [32769] = "DLV";
97 };
98 errors = {
99 [0] = "NoError"; ["NoError"] = "No Error";
100 [1] = "FormErr"; ["FormErr"] = "Format Error";
101 [2] = "ServFail"; ["ServFail"] = "Server Failure";
102 [3] = "NXDomain"; ["NXDomain"] = "Non-Existent Domain";
103 [4] = "NotImp"; ["NotImp"] = "Not Implemented";
104 [5] = "Refused"; ["Refused"] = "Query Refused";
105 [6] = "YXDomain"; ["YXDomain"] = "Name Exists when it should not";
106 [7] = "YXRRSet"; ["YXRRSet"] = "RR Set Exists when it should not";
107 [8] = "NXRRSet"; ["NXRRSet"] = "RR Set that should exist does not";
108 [9] = "NotAuth"; ["NotAuth"] = "Server Not Authoritative for zone";
109 -- [9] = "NotAuth"; ["NotAuth"] = "Not Authorized";
110 [10] = "NotZone"; ["NotZone"] = "Name not contained in zone";
111 [11] = "DSOTYPENI"; ["DSOTYPENI"] = "DSO-TYPE Not Implemented";
112 [16] = "BADVERS"; ["BADVERS"] = "Bad OPT Version";
113 -- [16] = "BADSIG"; ["BADSIG"] = "TSIG Signature Failure";
114 [17] = "BADKEY"; ["BADKEY"] = "Key not recognized";
115 [18] = "BADTIME"; ["BADTIME"] = "Signature out of time window";
116 [19] = "BADMODE"; ["BADMODE"] = "Bad TKEY Mode";
117 [20] = "BADNAME"; ["BADNAME"] = "Duplicate key name";
118 [21] = "BADALG"; ["BADALG"] = "Algorithm not supported";
119 [22] = "BADTRUNC"; ["BADTRUNC"] = "Bad Truncation";
120 [23] = "BADCOOKIE"; ["BADCOOKIE"] = "Bad/missing Server Cookie";
121 };
11 }; 122 };
12
13 local types = {
14 "A";"NS";"MD";"MF";"CNAME";"SOA";"MB";"MG";"MR";"NULL";"WKS";"PTR";"HINFO";
15 "MINFO";"MX";"TXT";"RP";"AFSDB";"X25";"ISDN";"RT";"NSAP";"NSAP-PTR";"SIG";
16 "KEY";"PX";"GPOS";"AAAA";"LOC";"NXT";"EID";"NIMLOC";"SRV";"ATMA";"NAPTR";
17 "KX";"CERT";"A6";"DNAME";"SINK";"OPT";"APL";"DS";"SSHFP";"IPSECKEY";"RRSIG";
18 "NSEC";"DNSKEY";"DHCID";"NSEC3";"NSEC3PARAM";"TLSA";"SMIMEA";[55]="HIP";
19 [56]="NINFO";[57]="RKEY";[58]="TALINK";[59]="CDS";[60]="CDNSKEY";[61]="OPENPGPKEY";
20 [62]="CSYNC";[63]="ZONEMD";[99]="SPF";[100]="UINFO";[101]="UID";[102]="GID";
21 [103]="UNSPEC";[104]="NID";[105]="L32";[106]="L64";[107]="LP";[108]="EUI48";
22 [109]="EUI64";["CSYNC"]=62;["TXT"]=16;["NAPTR"]=35;["A6"]=38;["RP"]=17;
23 ["TALINK"]=58;["NXT"]=30;["MR"]=9;["UINFO"]=100;["X25"]=19;["TKEY"]=249;
24 ["CERT"]=37;["SMIMEA"]=53;[252]="AXFR";[253]="MAILB";["CDS"]=59;[32769]="DLV";
25 ["RT"]=21;["WKS"]=11;[249]="TKEY";["LP"]=107;[250]="TSIG";["SSHFP"]=44;["DS"]=43;
26 ["ISDN"]=20;["ATMA"]=34;["NS"]=2;[257]="CAA";["PX"]=26;["MX"]=15;["TSIG"]=250;
27 ["EID"]=31;["TLSA"]=52;["GID"]=102;["KX"]=36;["SPF"]=99;["DOA"]=259;["GPOS"]=27;
28 ["IPSECKEY"]=45;["NIMLOC"]=32;["RRSIG"]=46;["UID"]=101;["DNAME"]=39;["NSAP"]=22;
29 ["DNSKEY"]=48;["SINK"]=40;["DHCID"]=49;[32768]="TA";["NSAP-PTR"]=23;["AAAA"]=28;
30 ["PTR"]=12;["MINFO"]=14;["TA"]=32768;["EUI64"]=109;[260]="AMTRELAY";
31 ["AMTRELAY"]=260;["CDNSKEY"]=60;[259]="DOA";["LOC"]=29;[258]="AVC";["AVC"]=258;
32 ["CAA"]=257;["MB"]=7;["*"]=255;[256]="URI";["URI"]=256;["SRV"]=33;["EUI48"]=108;
33 [255]="*";[254]="MAILA";["MAILA"]=254;["MAILB"]=253;["CNAME"]=5;[251]="IXFR";
34 ["APL"]=42;["OPENPGPKEY"]=61;["MD"]=3;["NINFO"]=56;["ZONEMD"]=63;["RKEY"]=57;
35 ["L32"]=105;["NID"]=104;["HIP"]=55;["NSEC"]=47;["DLV"]=32769;["UNSPEC"]=103;
36 ["NSEC3PARAM"]=51;["MF"]=4;["MG"]=8;["AFSDB"]=18;["A"]=1;["SIG"]=24;["NSEC3"]=50;
37 ["HINFO"]=13;["IXFR"]=251;["NULL"]=10;["AXFR"]=252;["KEY"]=25;["OPT"]=41;
38 ["SOA"]=6;["L64"]=106;
39 }
40
41 local errors = {
42 NoError = "No Error"; [0] = "NoError";
43 FormErr = "Format Error"; "FormErr";
44 ServFail = "Server Failure"; "ServFail";
45 NXDomain = "Non-Existent Domain"; "NXDomain";
46 NotImp = "Not Implemented"; "NotImp";
47 Refused = "Query Refused"; "Refused";
48 YXDomain = "Name Exists when it should not"; "YXDomain";
49 YXRRSet = "RR Set Exists when it should not"; "YXRRSet";
50 NXRRSet = "RR Set that should exist does not"; "NXRRSet";
51 NotAuth = "Server Not Authoritative for zone"; "NotAuth";
52 NotZone = "Name not contained in zone"; "NotZone";
53 };
54
55 return {
56 classes = classes;
57 types = types;
58 errors = errors;
59 };