Comparison

util/dnsregistry.lua @ 12236:d0dfd48806f9

util.dns: Move DNS parameters details into util.dnsregistry Goal is to regenerate this file from the IANA registry using a tool. Having it in a separate file will reduce vcs noise in util.dns
author Kim Alvefur <zash@zash.se>
date Sun, 04 Oct 2020 19:23:16 +0200
parent 10972:util/dns.lua@b3773b1b90a1
child 12238:57215267dd4f
comparison
equal deleted inserted replaced
12235:c98527220564 12236:d0dfd48806f9
1
2 -- Converted from
3 -- http://www.iana.org/assignments/dns-parameters
4 -- 2020-06-25
5
6 local classes = {
7 IN = 1; "IN";
8 nil;
9 CH = 3; "CH";
10 HS = 4; "HS";
11 };
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 };