This patch adds all not included result messages, rr types and opcodes from http://www.iana.org/assignments/dns-parameters to the DNS server in Plan 9. Notes: Thu Sep 22 08:37:32 EDT 2005 rsc Thanks. Reference: /n/sources/patch/applied/dns.h-update Date: Wed Sep 21 20:17:13 CES 2005 Reviewed-by: rsc --- /sys/src/cmd/ndb/dns.h Wed Sep 21 20:16:31 2005 +++ /sys/src/cmd/ndb/dns.h Wed Sep 21 20:16:26 2005 @@ -2,33 +2,69 @@ enum { - /* RR types */ - Ta= 1, - Tns= 2, - Tmd= 3, - Tmf= 4, - Tcname= 5, - Tsoa= 6, - Tmb= 7, - Tmg= 8, - Tmr= 9, - Tnull= 10, - Twks= 11, - Tptr= 12, - Thinfo= 13, - Tminfo= 14, - Tmx= 15, - Ttxt= 16, - Trp= 17, - Tsig= 24, - Tkey= 25, - Taaaa= 28, - Tcert= 37, + /* RR types; see: http://www.iana.org/assignments/dns-parameters */ + Ta= 1, + Tns= 2, + Tmd= 3, + Tmf= 4, + Tcname= 5, + Tsoa= 6, + Tmb= 7, + Tmg= 8, + Tmr= 9, + Tnull= 10, + Twks= 11, + Tptr= 12, + Thinfo= 13, + Tminfo= 14, + Tmx= 15, + Ttxt= 16, + Trp= 17, + Tafsdb= 18, + Tx25= 19, + Tisdn= 20, + Trt= 21, + Tnsap= 22, + Tnsapptr= 23, + Tsig= 24, + Tkey= 25, + Tpx= 26, + Tgpos= 27, + Taaaa= 28, + Tloc= 29, + Tnxt= 30, + Teid= 31, + Tnimloc= 32, + Tsrv= 33, + Tatma= 34, + Tnaptr= 35, + Tkx= 36, + Tcert= 37, + Ta6= 38, + Tdname= 39, + Tsink= 40, + Topt= 41, + Tapl= 42, + Tds= 43, + Tsshfp= 44, + Tipseckey= 45, + Trrsig= 46, + Tnsec= 47, + Tdnskey= 48, + + Tspf= 99, + Tuinfo= 100, + Tuid= 101, + Tgid= 102, + Tunspec= 103, /* query types (all RR types are also queries) */ + Ttkey= 249, /* transaction key */ + Ttsig= 250, /* transaction signature */ Tixfr= 251, /* incremental zone transfer */ Taxfr= 252, /* zone transfer */ Tmailb= 253, /* { Tmb, Tmg, Tmr } */ + Tmaila= 254, /* obsolete */ Tall= 255, /* all records */ /* classes */ @@ -43,9 +79,10 @@ /* opcodes */ Oquery= 0<<11, /* normal query */ - Oinverse= 1<<11, /* inverse query */ + Oretired= 1<<11, /* opcode retired */ Ostatus= 2<<11, /* status request */ Onotify= 4<<11, /* notify slaves of updates */ + Oupdate= 5<<11, Omask= 0xf<<11, /* mask for opcode */ /* response codes */ @@ -55,7 +92,19 @@ Rname= 3, /* bad name */ Runimplimented= 4, /* unimplemented */ Rrefused= 5, /* we don't like you */ - Rmask= 0xf, /* mask for response */ + Ryxdomain= 6, /* name exists when it should not */ + Ryxrrset= 7, /* rr set exists when it should not */ + Rnxrrset= 8, /* rr set that should exist does not */ + Rnotauth= 9, /* not authoritative */ + Rnotzone= 10, /* name not in zone */ + Rbadvers= 16, /* bad opt version */ +/* Rbadsig= 16, */ /* tsig signature failure */ + Rbadkey= 17, /* key not recognized */ + Rbadtime= 18, /* signature out of time window */ + Rbadmode= 19, /* bad tkey mode */ + Rbadname= 20, /* duplicate key name */ + Rbadalg= 21, /* algorithm not supported */ + Rmask= 0x1f, /* mask for response */ Rtimeout= 0x10, /* timeout sending (for internal use only) */ /* bits in flag word (other than opcode and response) */ --- /sys/src/cmd/ndb/dn.c Wed Sep 21 20:16:55 2005 +++ /sys/src/cmd/ndb/dn.c Wed Sep 21 20:16:48 2005 @@ -42,12 +42,48 @@ [Tmx] "mx", [Ttxt] "txt", [Trp] "rp", -[Tkey] "key", -[Tcert] "cert", +[Tafsdb] "afsdb", +[Tx25] "x.25", +[Tisdn] "isdn", +[Trt] "rt", +[Tnsap] "nsap", +[Tnsapptr] "nsap-ptr", [Tsig] "sig", +[Tkey] "key", +[Tpx] "px", +[Tgpos] "gpos", [Taaaa] "ipv6", +[Tloc] "loc", +[Tnxt] "nxt", +[Teid] "eid", +[Tnimloc] "nimrod", +[Tsrv] "srv", +[Tatma] "atma", +[Tnaptr] "naptr", +[Tkx] "kx", +[Tcert] "cert", +[Ta6] "a6", +[Tdname] "dname", +[Tsink] "sink", +[Topt] "opt", +[Tapl] "apl", +[Tds] "ds", +[Tsshfp] "sshfp", +[Tipseckey] "ipseckey", +[Trrsig] "rrsig", +[Tnsec] "nsec", +[Tdnskey] "dnskey", +[Tspf] "spf", +[Tuinfo] "uinfo", +[Tuid] "uid", +[Tgid] "gid", +[Tunspec] "unspec", +[Ttkey] "tkey", +[Ttsig] "tsig", [Tixfr] "ixfr", [Taxfr] "axfr", +[Tmailb] "mailb", +[Tmaila] "maila", [Tall] "all", 0, }; @@ -61,14 +97,27 @@ [Rname] "bad name", [Runimplimented] "unimplemented", [Rrefused] "we don't like you", +[Ryxdomain] "name should not exist", +[Ryxrrset] "rr set should not exist", +[Rnxrrset] "rr set should exist", +[Rnotauth] "not authorative", +[Rnotzone] "not in zone", +[Rbadvers] "bad opt version", +/* [Rbadsig] "bad signature", */ +[Rbadkey] "bad key", +[Rbadtime] "bad signature time", +[Rbadmode] "bad mode", +[Rbadname] "duplicate key name", +[Rbadalg] "bad algorithm", }; /* names of op codes */ char *opname[] = { [Oquery] "query", -[Oinverse] "inverse", +[Oretired] "retired", [Ostatus] "status", +[Oupdate] "update", }; Lock dnlock;