;;;-*-MIDAS-*-;;; .TYO6 .IFNM1 .TYO 40 .TYO6 .IFNM2 PRINTX/ included in this assembly. / IFNDEF $$DQDB, $$DQDB==0 SUBTTL Domain Name Protocol Definitions DNPORT==53. ;UDP port number for Domain Name server. ;;; Fields in the Header section DP%ID== 777774,, ; 0 16 bit ID number DP%QR== 2,, ; 0 Query/Response bit DP%OP== 1,,300000 ; 0 Opcode DP%AA== 0,,040000 ; 0 Authoritative Answer DP%TC== 0,,020000 ; 0 TrunCation DP%RC== 0,,010000 ; 0 Recursion Desired DP%RA== 0,,004000 ; 0 Recursion Available DP%RCD== 0,,000160 ; 0 Response Code DP%QDC==777774,, ; 1 Question Count DP%ANC== 3,,777760 ; 1 Answer Count DP%NSC==777774,, ; 2 Authority Record Count DP%ARC== 3,,777760 ; 2 Additional Record Count DP$ID== <.BP DP%ID,0> DP$QR== <.BP DP%QR,0> DP$OP== <.BP DP%OP,0> ;Domain system opcodes: DO$QRY==0 ; Standard QUERY DO$YRQ==1 ; Inverse IQUERY DO$QCM==2 ; Multiple completion CQUERYM DO$QCU==3 ; Single completion CQUERYU DP$AA== <.BP DP%AA,0> DP$TC== <.BP DP%TC,0> DP$RC== <.BP DP%RC,0> DP$RA== <.BP DP%RA,0> DP$RCD==<.BP DP%RCD,0> ;Domain system response codes: DR$OK==0 ; No error condition DR$FMT==1 ; Format error DR$LOS==2 ; Server lossage DR$ERR==3 ; Name error DR$NI==4 ; Not implemented DR$RFS==5 ; Refused DP$QDC==<.BP DP%QDC,,1> DP$ANC==<.BP DP%ANC,,1> DP$NSC==<.BP DP%NSC,,2> DP$ARC==<.BP DP%ARC,,2> DQ$NAM==<441000,,3> ; ILDB ptr to variable length QNAME. ; Additional opcodes for DQ device only: DO$WRO==1000 ;NQUERY (ignore cache) DO$TAB==2000 ;HOSTS3 (use old host file) ;;; TYPEs DT$A==1. ;Host address DT$NS==2. ;Authoritative name server DT$MD==3. ;Mail destination DT$MF==4. ;Mail forwarder DT$CNA==5. ;Canonical name for an alias DT$SOA==6. ;Start of zone of authority DT$MB==7. ;Mailbox domain name DT$MG==8. ;Mail group member DT$MR==9. ;Mail rename domain name DT$NUL==10. ;NULL RR DT$WKS==11. ;Well known service description DT$PTR==12. ;Domain name pointer DT$HIN==13. ;Host information DT$MIN==14. ;Mailbox or list information ;;; QTYPEs(in addition to above TYPEs) DT$XFR==252. ;Request for xfer of entire zone DT$MLB==253. ;Request for mailbox-related RRs (MB,MG,MR) DT$MLA==254. ;Request for mail agent RRs (MD,MF) DT$ANY==255. ;Request for all records ;;; CLASSes DC$IN==1. ;DARPA Internet DC$CS==2. ;NSF CSnet DC$CH==3. ;CHAOS network (need a real number from Postel) ;;; QCLASSes (in addition to above CLASSes) DC$ANY==255. ;Any class SUBTTL DQDEV database definitions IFN $$DQDB,[ ; To read the database requires a non-exclusive read lock. To write the ; database requires a write lock which excludes all other processes from ; using the database in any way. Attempts to assert the lock will fail ; unless there are no readers. The lock is implemented using the ITS ; LOCKS facility in a particular disk file. LCKFN1: SIXBIT / DOMAN/ LCKFN2: SIXBIT / LOCK/ ; The database is kept in an NLISTS LSE file. This contains the Domain ; lists, which store all of the Resource Records. When the resolver ; queries a Domain Server, the results may be added to this LSE The ; Domain list is initialized from local host table files. All of the ; other information in the database is keyed into the Domain lists. DBDEV: SIXBIT /DSK/ DBFN1: SIXBIT / DOMAN/ DBFN2: SIXBIT /DATA/ DBDIR: SIXBIT /SRA/ TMPFN1: SIXBIT /_DQ_/ TMPFN2: SIXBIT /OUTPUT/ ; The MASTER-DOMAIN-LIST is the LSE database root, and points to ; the DOMAIN-NAME list. ; ; Each DOMAIN-NAME contains a VAL to the domain name string; ; the VAL points to a list of CLASSes for which domain data exists. ; ; Each Class contains a VAL to the Class; the VAL points to a ; list of RESORCE-RECORDS. ; Each RESOURCE-RECORD points to a VAL containing the Type; the ; VAL points to a list of nodes comprising the RR. ; ; The RR list has a RESOURCE-VALUE containing the Data and pointing ; at a list of the other information, including: ; ; o DISTRIBUTION information (which controls the authority ; and propogation of the RR); ; o TIME-TO-DIE (computed upon RR insertion from a TTL stamp) ; ; This means that each Domain takes up 4 CONSes, and in addition ; each Resource Record currently consumes another 5 CONSes. ;;; ATTRIB ,:,, DEFINE ATTRIB COD,SYMC,*NAME*,IRTN IF1 [IRPS SYM,,[SYMC] SYM==COD TERMIN IFE COD,.ERR Using attribute 0?! IFGE COD-ATRLIM,.FATAL Attribute code too large! ] %%S==. LOC ATTRTB+COD ? ASCNT [NAME] LOC ATTRIR+COD ? IRTN LOC %%S TERMIN ATRLIM==40. A$==,,-1 ; For bit-typeout mode ATTRTB: BLOCK ATRLIM ; Table indexed by , holds ASCNT ptr to name. ATTRIR: BLOCK ATRLIM ; Table to hold routine addr for xct'ing on input. ;; Low-level LNs. ;; (Note: A$VALs and A$ATTRs do not require each other.) ATTRIB 1.,A$ATTR:,|ATTRIBUTE| ;S Attrib name for succeeding A$AVAL ATTRIB 2.,A$VAL:,|ATTRIBVAL| ;* Holds value for preceding A$ATTR A$PAIR==A$VAL ;* For program clarity, A$PAIR ;; High level domain constructs. ATTRIB 5.,A$DB:,|MASTER-DOMAIN-LIST| ;L LSE root ATTRIB 6.,A$DOM:,|DOMAIN| ;S Name of a domain ATTRIB 7.,A$CLAS:,|CLASS| ;L Class tree for the domain ATTRIB 8.,A$RR:,|RESOURCE-RECORD| ;V Resource records for domain ;; Low level domain constructs. ATTRIB 20.,A$DIST:,|DISTRIBUTION| ;V RR Distribution info ATTRIB 21.,A$TTD:,|TIME-TO-DIE| ;V RR Discard time from TTL ATTRIB 22.,A$RRVAL:,|RESOURCE-VALUE| ;V RR Resource data ATTRIB 23.,A$RC:,|REFERENCE-COUNT| ;V RR Reference count ;; Attributes used for output descriptor lists. ATTRIB 30.,A$OUTL:,|OUTPUT-LIST| ;L CDR is for MAKOUT ATTRIB 31.,A$ANS:,|ANSWER-RECS| ;L Answer Section RRs ATTRIB 32.,A$AUT:,|AUTHORITY-RECS| ;L Authority Section RRs ATTRIB 33.,A$ADD:,|ADDITIONAL-RECS| ;L Additional Section RRs ;; Attributes for LNs living in the CAR of A$DB. ATTRIB 34.,A$SOA:,|START-OF-AUTHORITY| ;L CDR has other junk ; CAR has string A$VALs ;;; RH bits in the A$DIST word. %AUATH==1_0. ;This RR is authoritative. ;(Do not move this bit!) ; ; %AUAUS==1_1. ;We are the authority for this domain resource. ; %AUILL==1_2. ;Illicit RR which may be distributed only to hosts ;on our trust list. ];$$DQDB