.TITLE ADDTBL .IDENT /V01-002/ ; ; © 2000 P. Beaudoin ; This software is supplied as is and the usual warranty ; is implied - none. You may use, abuse, modify or ; or ignore this software as you see fit but are ; encouraged to give credit, as is good practice ; when stealing with permission ; ; One off to init paramtbl.dat with table entries. .LIBRARY /EMU5_LIB:EMU5.MLB/ $RMSDEF $TRMDEF ; Terminal Modifiers $DSCDEF ; Declare DSC sysmbols $SMGDEF ; Declare SMG symbols $IODEF $SSDEF EMUCTRLDEF EMUSYSDEF EMUDBDEF EMUSNMPDEF ; .PSECT ADDTBL_DATA,WRT,NOEXE,QUAD,pic KEY_BUF: .QUAD 0 .ALIGN LONG MAPPERFAB: $FAB FAC = ,- ; Access SHR = ,- ; Share with ... FOP = CIF,- ; Create if doesn't exist ORG = IDX,- ; Keyed file (Finally) MRS = 128,- ; Largest rec GBC = 10,- ; Use global buffers DNM = ,- ; Default Filename FNM = ,- ; Filename XAB = MAPPERXAB0 ; Keys MAPPERRAB: $RAB FAB = MAPPERFAB,- ; pointer to FAB RBF = MAPPERREC_BUF,- ; i/o buffer RSZ = MAPPERREC_SIZE,- ; Write this many bytes UBF = MAPPERREC_BUF,- ; i/o buffer USZ = MAPPERREC_SIZE,- ; RAC = KEY,- ; Keyed file KBF = KEY_BUF,- ; Key location KSZ = 8 MAPPERXAB0: $XABKEY REF = 0,- ; TBL,PARAM DTP = BN8,- ; Key = 4 bytes binary (ascending) POS = 0,- ; Key position SIZ = 8,- ; Key len (dups not allowed) NXT = MAPPERXAB1 MAPPERXAB1: $XABKEY REF = 1,- ; TBL DTP = BN4,- ; Key = 4 bytes binary (ascending) POS = 0,- ; Key position SIZ = 4,- ; Key len (dups allowed) FLG = DUP ; MAPPERREC_BUF: MAPPER_KEY: MAPPER_TBL: .LONG 0 ; Table MAPPER_PARAM: .LONG 0 ; Paramater MAPPER_SEC: .QUAD 0 ; Prives req'ed to detect. VMS sec MAPPER_KEYWLEN: .LONG 0 ; Len of following string MAPPER_KEYW: .BLKB 32 ; Standard keyword this param MAPPER_FMTTYP: .LONG 0 ; Either len of following or rtn num. MAPPER_FMTSTR: .BLKB 72 ; FAO directive str MAPPERREC_SIZE = .-MAPPERREC_BUF ; = 128 LVL1TBL: .LONG ^X01000000 Tables1: .LONG 65537 .ADDRESS ETH .LONG 65538 .ADDRESS SCS .LONG 65539 .ADDRESS MOP .LONG 65544 .ADDRESS IPX .LONG 65545 .ADDRESS BRD .LONG ^X02000002 .ADDRESS DN4 .LONG ^X02000003 .ADDRESS DN5 .LONG ^X02000005 .ADDRESS LAT .LONG ^X02000007 .ADDRESS IP .LONG 0 tables2: .LONG ^X02000003 .LONG 65536+10 .ADDRESS NODE .LONG ^X02000003 .LONG 65536+11 .ADDRESS ALIAS .LONG ^X02000003 .LONG 65536+12 .ADDRESS ALIASPORT .LONG ^X02000003 .LONG 65536+13 .ADDRESS CSMACD .LONG ^X02000003 .LONG 65536+14 .ADDRESS CSMACDPORT .LONG ^X02000003 .LONG 65536+15 .ADDRESS CSMACDSTN .LONG ^X02000003 .LONG 65536+16 .ADDRESS DDCMP .LONG ^X02000003 .LONG 65536+17 .ADDRESS DDCMP_LNK .LONG ^X02000003 .LONG 65536+18 .ADDRESS DDCMP_LNKSTN .LONG ^X02000003 .LONG 65536+19 .ADDRESS DDCMP_PORT .LONG ^X02000003 .LONG 65536+20 .ADDRESS DEVICE .LONG ^X02000003 .LONG 65536+21 .ADDRESS DEVICE_UNIT .LONG ^X02000003 .LONG 65536+22 .ADDRESS DNS .LONG ^X02000003 .LONG 65536+23 .ADDRESS DNS_SERV .LONG ^X02000003 .LONG 65536+24 .ADDRESS DNS_SERV_CH .LONG ^X02000003 .LONG 65536+25 .ADDRESS DNS_CLRK .LONG ^X02000003 .LONG 65536+26 .ADDRESS DNS_CLRK_KNS .LONG ^X02000003 .LONG 65536+27 .ADDRESS DNS_CLRK_RCH .LONG ^X02000003 .LONG 65536+28 .ADDRESS DNS_CLRK_MNS .LONG ^X02000003 .LONG 65536+29 .ADDRESS DTS .LONG ^X02000003 .LONG 65536+30 .ADDRESS DTS_GBLSRV .LONG ^X02000003 .LONG 65536+31 .ADDRESS DTS_LOCSRV .LONG ^X02000003 .LONG 65536+32 .ADDRESS EVD .LONG ^X02000003 .LONG 65536+33 .ADDRESS EVD_OS .LONG ^X02000003 .LONG 65536+34 .ADDRESS EVD_REL .LONG ^X02000003 .LONG 65536+35 .ADDRESS EVD_RECLOG .LONG ^X02000003 .LONG 65536+36 .ADDRESS EVD_SNK .LONG ^X02000003 .LONG 65536+37 .ADDRESS EVD_SNKIS .LONG ^X02000003 .LONG 65536+38 .ADDRESS FRAME .LONG ^X02000003 .LONG 65536+39 .ADDRESS FRAME_LINK .LONG ^X02000003 .LONG 65536+40 .ADDRESS FRAME_PORT .LONG ^X02000003 .LONG 65536+41 .ADDRESS HDLC .LONG ^X02000003 .LONG 65536+42 .ADDRESS HDCL_LNK .LONG ^X02000003 .LONG 65536+43 .ADDRESS HDLC_LNKLS .LONG ^X02000003 .LONG 65536+44 .ADDRESS HDLC_PORT .LONG ^X02000003 .LONG 65536+45 .ADDRESS LAPB .LONG ^X02000003 .LONG 65536+46 .ADDRESS LAPB_LINK .LONG ^X02000003 .LONG 65536+47 .ADDRESS LAPB_PORT .LONG ^X02000003 .LONG 65536+48 .ADDRESS LLC2 .LONG ^X02000003 .LONG 65536+49 .ADDRESS LLC2_PORT .LONG ^X02000003 .LONG 65536+50 .ADDRESS LLC2_SAP .LONG ^X02000003 .LONG 65536+51 .ADDRESS LLC2_SAPLNK .LONG ^X02000003 .LONG 65536+52 .ADDRESS LOOPBACK .LONG ^X02000003 .LONG 65536+53 .ADDRESS MODEM .LONG ^X02000003 .LONG 65536+54 .ADDRESS MODEM_PORT .LONG ^X02000003 .LONG 65536+55 .ADDRESS MODEM_LINE .LONG ^X02000003 .LONG 65536+56 .ADDRESS MOP .LONG ^X02000003 .LONG 65536+57 .ADDRESS MOP_CIRC .LONG ^X02000003 .LONG 65536+58 .ADDRESS MOP_CIRCOP .LONG ^X02000003 .LONG 65536+59 .ADDRESS MOP_CIRCSTN .LONG ^X02000003 .LONG 65536+60 .ADDRESS MOP_CLIENT .LONG ^X02000003 .LONG 65536+61 .ADDRESS NSP .LONG ^X02000003 .LONG 65536+62 .ADDRESS NSP_LNSAP .LONG ^X02000003 .LONG 65536+63 .ADDRESS NSP_RNSAP .LONG ^X02000003 .LONG 65536+64 .ADDRESS NSP_PORT .LONG ^X02000003 .LONG 65536+65 .ADDRESS OSIT .LONG ^X02000003 .LONG 65536+66 .ADDRESS OSIT_APP .LONG ^X02000003 .LONG 65536+67 .ADDRESS OSIT_LNSAP .LONG ^X02000003 .LONG 65536+68 .ADDRESS OSIT_RNSAP .LONG ^X02000003 .LONG 65536+69 .ADDRESS OSIT_PORT .LONG ^X02000003 .LONG 65536+70 .ADDRESS TEMPL .LONG ^X02000003 .LONG 65536+71 .ADDRESS RTN .LONG ^X02000003 .LONG 65536+72 .ADDRESS RTN_CIRC .LONG ^X02000003 .LONG 65536+73 .ADDRESS RTN_CRICADJ .LONG ^X02000003 .LONG 65536+74 .ADDRESS RTN_CIRCIPAT .LONG ^X02000003 .LONG 65536+75 .ADDRESS RTN_CIRCIPAJ .LONG ^X02000003 .LONG 65536+76 .ADDRESS RTN_CIRCIPRA .LONG ^X02000003 .LONG 65536+77 .ADDRESS RTN_CIRCRA .LONG ^X02000003 .LONG 65536+78 .ADDRESS RTN_DESTAREA .LONG ^X02000003 .LONG 65536+79 .ADDRESS RTN_DESNNODE .LONG ^X02000003 .LONG 65536+80 .ADDRESS RTN_EGPGRP .LONG ^X02000003 .LONG 65536+81 .ADDRESS RTN_EGPNEI .LONG ^X02000003 .LONG 65536+82 .ADDRESS RTN_IPDA .LONG ^X02000003 .LONG 65536+83 .ADDRESS RTN_PERNEI .LONG ^X02000003 .LONG 65536+84 .ADDRESS RTN_PORT .LONG ^X02000003 .LONG 65536+85 .ADDRESS SC .LONG ^X02000003 .LONG 65536+86 .ADDRESS SC_APP .LONG ^X02000003 .LONG 65536+87 .ADDRESS SC_PORT .LONG ^X02000003 .LONG 65536+88 .ADDRESS SC_TOWMAINT .LONG ^X02000003 .LONG 65536+89 .ADDRESS SC_TRASVC .LONG ^X02000003 .LONG 65536+90 .ADDRESS X25A .LONG ^X02000003 .LONG 65536+91 .ADDRESS X25A_APP .LONG ^X02000003 .LONG 65536+92 .ADDRESS X25A_DTECLASS .LONG ^X02000003 .LONG 65536+93 .ADDRESS X25A_FILT .LONG ^X02000003 .LONG 65536+94 .ADDRESS X25A_PORT .LONG ^X02000003 .LONG 65536+95 .ADDRESS X25A_SECDTE .LONG ^X02000003 .LONG 65536+96 .ADDRESS X25A_REMDTE .LONG ^X02000003 .LONG 65536+97 .ADDRESS X25A_RA .LONG ^X02000003 .LONG 65536+98 .ADDRESS X25A_SECFILT .LONG ^X02000003 .LONG 65536+99 .ADDRESS X25A_TEMPL .LONG ^X02000003 .LONG 65536+100 .ADDRESS X25C .LONG ^X02000003 .LONG 65536+101 .ADDRESS X25P .LONG ^X02000003 .LONG 65536+102 .ADDRESS X25P_DTE .LONG ^X02000003 .LONG 65536+103 .ADDRESS X25P_DTEPVC .LONG ^X02000003 .LONG 65536+104 .ADDRESS X25P_GRP ; DECnet IV tables .LONG ^X02000002 .LONG 65536+200 .ADDRESS DN4EXEC .LONG ^X02000002 .LONG 65536+201 .ADDRESS DN4CIRC .LONG ^X02000002 .LONG 65536+202 .ADDRESS DN4LINE .LONG ^X02000002 .LONG 65536+203 .ADDRESS DN4LOGGING .LONG ^X02000002 .LONG 65536+204 .ADDRESS DN4X25A .LONG ^X02000002 .LONG 65536+205 .ADDRESS DN4X25P .LONG ^X02000002 .LONG 65536+206 .ADDRESS DN4X25S .LONG ^X02000002 .LONG 65536+207 .ADDRESS DN4OBJ .LONG ^X02000002 .LONG 65536+208 ; Known DTE char .ADDRESS DN4X25DTE .LONG ^X02000002 .LONG 65536+209 ; Known Destinations .ADDRESS DN4X25DEST .LONG ^X02000002 .LONG 65536+210 ; Known Networks .ADDRESS DN4X25NET .LONG ^X02000005 .LONG 65536+300 .ADDRESS LATNODE .LONG ^X02000005 .LONG 65536+301 .ADDRESS LATSVC .LONG ^X02000005 .LONG 65536+302 .ADDRESS LATLINK .long 0 BRD: .ASCID /Bridge/ DN4: .ASCID /DECnet IV/ DN5: .ASCID /OSI/ ETH: .ASCID /LAN/ IP: .ASCID /Internet/ IPX: .ASCID /Netware/ LAT: .ASCID /LAT/ SCS: .ASCID /VMSCluster/ DN4EXEC: .ASCID /EXEC/ DN4CIRC: .ASCID /CIRCUIT/ DN4LINE: .ASCID /LINE/ DN4LOGGING: .ASCID /LOGGING/ DN4X25A: .ASCID /X25A/ DN4X25P: .ASCID /X25P/ DN4X25S: .ASCID /X25S/ DN4OBJ: .ASCID /OBJECT/ DN4X25DTE: .ASCID /X25 DTE/ DN4X25DEST: .ASCID /X25 Destination/ DN4X25NET: .ASCID /X25 Network/ LATNODE: .ASCID /NODE/ LATSVC: .ASCID /SERVICE/ LATLINK: .ASCID /LINK/ NODE: .ASCID /NODE/ ALIAS: .ASCID /ALIAS/ ALIASPORT: .ASCID /ALIASPORT/ CSMACD: .ASCID /CSMACD/ CSMACDPORT: .ASCID /CSMACDPORT/ CSMACDSTN: .ASCID /CSMACDSTN/ DDCMP: .ASCID /DDCMP/ DDCMP_LNK: .ASCID /DDCMP_LNK/ DDCMP_LNKSTN: .ASCID /DDCMP_LNKSTN/ DDCMP_PORT: .ASCID /DDCMP_PORT/ DEVICE: .ASCID /DEVICE/ DEVICE_UNIT: .ASCID /DEVICE_UNIT/ DNS: .ASCID /DNS/ DNS_SERV: .ASCID /DNS_SERV/ DNS_SERV_CH: .ASCID /DNS_SERV_CH/ DNS_CLRK: .ASCID /DNS_CLRK/ DNS_CLRK_KNS: .ASCID /DNS_CLRK_KNS/ DNS_CLRK_RCH: .ASCID /DNS_CLRK_RCH/ DNS_CLRK_MNS: .ASCID /DNS_CLRK_MNS/ DTS: .ASCID /DTS/ DTS_GBLSRV: .ASCID /DTS_GBLSRV/ DTS_LOCSRV: .ASCID /DTS_LOCSRV/ EVD: .ASCID /EVD/ EVD_OS: .ASCID /EVD_OS/ EVD_REL: .ASCID /EVD_REL/ EVD_RECLOG: .ASCID /EVD_RECLOG/ EVD_SNK: .ASCID /EVD_SNK/ EVD_SNKIS: .ASCID /EVD_SNKIS/ FRAME: .ASCID /FRAME/ FRAME_LINK: .ASCID /FRAME_LINK/ FRAME_PORT: .ASCID /FRAME_PORT/ HDLC: .ASCID /HDLC/ HDCL_LNK: .ASCID /HDCL_LNK/ HDLC_LNKLS: .ASCID /HDLC_LNKLS/ HDLC_PORT: .ASCID /HDLC_PORT/ LAPB: .ASCID /LAPB/ LAPB_LINK: .ASCID /LAPB_LINK/ LAPB_PORT: .ASCID /LAPB_PORT/ LLC2: .ASCID /LLC2/ LLC2_PORT: .ASCID /LLC2_PORT/ LLC2_SAP: .ASCID /LLC2_SAP/ LLC2_SAPLNK: .ASCID /LLC2_SAPLNK/ LOOPBACK: .ASCID /LOOPBACK/ MODEM: .ASCID /MODEM/ MODEM_PORT: .ASCID /MODEM_PORT/ MODEM_LINE: .ASCID /MODEM_LINE/ MOP: .ASCID /MOP/ MOP_CIRC: .ASCID /MOP_CIRC/ MOP_CIRCOP: .ASCID /MOP_CIRCOP/ MOP_CIRCSTN: .ASCID /MOP_CIRCSTN/ MOP_CLIENT: .ASCID /MOP_CLIENT/ NSP: .ASCID /NSP/ NSP_LNSAP: .ASCID /NSP_LNSAP/ NSP_RNSAP: .ASCID /NSP_RNSAP/ NSP_PORT: .ASCID /NSP_PORT/ OSIT: .ASCID /OSIT/ OSIT_APP: .ASCID /OSIT_APP/ OSIT_LNSAP: .ASCID /OSIT_LNSAP/ OSIT_RNSAP: .ASCID /OSIT_RNSAP/ OSIT_PORT: .ASCID /OSIT_PORT/ TEMPL: .ASCID /TEMPL/ RTN: .ASCID /RTN/ RTN_CIRC: .ASCID /RTN_CIRC/ RTN_CRICADJ: .ASCID /RTN_CRICADJ/ RTN_CIRCIPAT: .ASCID /RTN_CIRCIPAT/ RTN_CIRCIPAJ: .ASCID /RTN_CIRCIPAJ/ RTN_CIRCIPRA: .ASCID /RTN_CIRCIPRA/ RTN_CIRCRA: .ASCID /RTN_CIRCRA/ RTN_DESTAREA: .ASCID /RTN_DESTAREA/ RTN_DESNNODE: .ASCID /RTN_DESNNODE/ RTN_EGPGRP: .ASCID /RTN_EGPGRP/ RTN_EGPNEI: .ASCID /RTN_EGPNEI/ RTN_IPDA: .ASCID /RTN_IPDA/ RTN_PERNEI: .ASCID /RTN_PERNEI/ RTN_PORT: .ASCID /RTN_PORT/ SC: .ASCID /SC/ SC_APP: .ASCID /SC_APP/ SC_PORT: .ASCID /SC_PORT/ SC_TOWMAINT: .ASCID /SC_TOWMAINT/ SC_TRASVC: .ASCID /SC_TRASVC/ X25A: .ASCID /X25A/ X25A_APP: .ASCID /X25A_APP/ X25A_DTECLASS: .ASCID /X25A_DTECLASS/ X25A_FILT: .ASCID /X25A_FILT/ X25A_PORT: .ASCID /X25A_PORT/ X25A_SECDTE: .ASCID /X25A_SECDTE/ X25A_REMDTE: .ASCID /X25A_REMDTE/ X25A_RA: .ASCID /X25A_RA/ X25A_SECFILT: .ASCID /X25A_SECFILT/ X25A_TEMPL: .ASCID /X25A_TEMPL/ X25C: .ASCID /X25C/ X25P: .ASCID /X25P/ X25P_DTE: .ASCID /X25P_DTE/ X25P_DTEPVC: .ASCID /X25P_DTEPVC/ X25P_GRP: .ASCID /X25P_GRP/ ; .End data definitions ; .PSECT ADDTBL_CODE,EXE,pic .CALL_ENTRY MAX_ARGS=0, HOME_ARGS=TRUE, - INPUT=, - PRESERVE=, - LABEL=ADDTBL $OPEN FAB = MAPPERFAB ;Open input file BSBW ERROR_CHK $CONNECT RAB = MAPPERRAB ;Connect input stream BSBW ERROR_CHK ; top level tables MOVAL TABLES1,R6 100$: TSTL (R6) BEQL 200$ MOVL LVL1TBL,MAPPER_TBL MOVL (R6),MAPPER_PARAM MOVQ @4(R6),R7 MOVZWL R7,R7 MOVL R7,MAPPER_KEYWLEN MOVC3 R7,(R8),MAPPER_KEYW $PUT RAB=MAPPERRAB BSBW ERROR_CHK ADDL #8,R6 BRW 100$ 200$: MOVAL TABLES2,R6 210$: TSTL (R6) BEQL 300$ MOVL (R6),MAPPER_TBL MOVL 4(R6),MAPPER_PARAM MOVQ @8(R6),R7 MOVZWL R7,R7 MOVL R7,MAPPER_KEYWLEN MOVC3 R7,(R8),MAPPER_KEYW $PUT RAB=MAPPERRAB BSBW ERROR_CHK ADDL #12,R6 BRW 210$ 300$: $CLOSE FAB=MAPPERFAB RET ERROR_CHK: .JSB_ENTRY INPUT=, OUTPUT= BLBC R0,10$ RSB 10$: RET .END ADDTBL