perm filename NETWRK.DIF[S,NET] blob
sn#696049 filedate 1983-01-12 generic text, type T, neo UTF8
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 2,2
**** File 1) NETWRK.MID[NET,MRC]/2P/11L
1) ; This is the MIDAS version which lives in NETWRK.MID[NET,MRC]. The FAIL version
1) ; lives in NETWRK.FAI[SUB,SYS].
1) ; Assembly switches
**** File 2) NETWRK.MID[S,NET]/2P/11L
2) ; This package can also be used with the Ethernet as well, but data connections
2) ; are not implemented. Also, Ethernet does not have equivalent to INTINR, and
2) ; simply sends an INTINS. Host down messages are bogus. (TVR/Dec81)
2) ; This is the MIDAS version which lives in NETWRK.MID[NET,MRC]. The FAIL version
2) ; lives in NETWRK.FAI[SUB,SYS]. [And does not have Ethernet changes]
2) ; Assembly switches
***************
**** File 1) NETWRK.MID[NET,MRC]/2P/18L
1) IFNDEF ERRHAN,ERRHAN==0 ; ≠ 0 → automagic error reporting in NIORTS
**** File 2) NETWRK.MID[S,NET]/2P/22L
2) IFNDEF MRKCHR,MRKCHR==0 ; ≠ 0 → pass BSP mark bytes as characters
2) IFNDEF ERRHAN,ERRHAN==0 ; ≠ 0 → automagic error reporting in NIORTS
***************
**** File 1) NETWRK.MID[NET,MRC]/2P/33L
1) ; Macro definitions
**** File 2) NETWRK.MID[S,NET]/2P/37L
2) IFE NIORTS,IFN MRKCHR,.FATAL MRKCHR Illegal switch setting
2) ; Macro definitions
***************
**** File 1) NETWRK.MID[NET,MRC]/4P/1L
1) ;NWKDBG HSTADR HSTTOP HDBPTR CONBLK CONSTS CONLSK CONWAT CONBYT ICPSKT CONFSK HOST CONHST LSNBLK LSNSTS LSNSKT LSNWAT LSNBYT LSNFSK LSNHST
1) ; Data area
**** File 2) NETWRK.MID[S,NET]/3P/53L
2) IFE HSTTAB,[ ;If not defined later.
2) ; Network numbers (for distinguishing IMP from local Ethernet)
2) NW%SU==:44 ;SUnet
2) NW%ARP==:12 ;Arpa net
2) NW$BYT==:331100 ;Byte pointer to network number
2) ];End IFE HSTTAB
2) ;NWKDBG HSTADR HSTTOP HDBPTR CONBLK CONSTS CONLSK CONWAT CONBYT ICPSKT CONFSK HOST CONHST LSNBLK LSNSTS LSNSKT LSNWAT LSNBYT LSNFSK LSNHST OPNBLK NETDEV
2) ; Data area
***************
**** File 1) NETWRK.MID[NET,MRC]/5P/1L
1) ;WATBLK WATSTS WATSKT INRBLK INRSTS INRSKT INSBLK INSSTS INSSKT WHYWHY NTIBF NTOBF DTIBF DTOBF FSOCKT LSOCKT
**** File 2) NETWRK.MID[S,NET]/4P/47L
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 5,4
2) IFN NIORTS!SVRRTS,[
2) OPNBLK: 0
2) .U"NETDEV: 'IMP,,0 ; device name
2) NTOBF,,NTIBF ; buffers
2)
2) ]; End IFN NIORTS!SVRRTS
2) ;WATBLK WATSTS WATSKT INRBLK INRSTS INRSKT INSBLK INSSTS INSSKT WHYWHY NTIBF NTOBF DTIBF DTOBF FSOCKT LSOCKT
***************
**** File 1) NETWRK.MID[NET,MRC]/5P/35L
1) ; Base sockets, set up by CONECT and LISTEN
**** File 2) NETWRK.MID[S,NET]/5P/35L
2) IFN MRKCHR,[
2) RMKBLK: 26 ; READ MARK
2) RMKSTS: BLOCK 1
2) RMKDAT: BLOCK 1 ; mark byte returned here
2) ]; End IFN MRKCHR
2) ; Base sockets, set up by CONECT and LISTEN
***************
**** File 1) NETWRK.MID[NET,MRC]/6P/1L
1) ;CONECT .CONEC
1) ; CONECT -- Connect to foreign host
**** File 2) NETWRK.MID[S,NET]/6P/1L
2) ;.CONEC .CONC1 .CONC2 .CONC3
2) ; CONECT -- Connect to foreign host
***************
**** File 1) NETWRK.MID[NET,MRC]/6P/25L
1) .CONEC: INIT ICP,17 ; open ICP in dump mode
1) 'IMP,, ; device IMP:
**** File 2) NETWRK.MID[S,NET]/6P/25L
2) .CONEC: LDB [NW$BYT,,HOST] ; check network type
2) SETZ 1,
2) CAIN NW%SU ; Ethernet?
2) MOVEI 1,'PUP
2) SKIPE 0 ; No net specified => ARPANet
2) CAIN NW%ARP ; ARPANet?
2) MOVEI 1,'IMP ; yes, use IMP
2) JUMPE 1,[MOVE [360,,HDEAD] ; if unknown name, fake an IMP code
2) MOVEM WHYWHY ; to indicate inaccessibility.
2) JRST CPOPJ1]
2) MOVSM 1,NETDEV ; specify device for OPEN
2) SETZ
2) DPB [NW$BYT,,HOST] ; don't confuse PUPSER with network ID
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 6,6
2) OPEN NET,OPNBLK ; open NET in ASCII mode
2) FATAL Network device INIT failure
2) MTAPE NET,[17 ? TNTIMO]
2) CAIN 1,'PUP ; Ethernet?
2) JRST .CONC3 ; yes, ICP done in system
2) INIT ICP,17 ; open ICP in dump mode
2) 'IMP,, ; device IMP:
***************
**** File 1) NETWRK.MID[NET,MRC]/6P/30L
1) INIT NET,0 ; open NET in ASCII mode
1) 'IMP,,
1) NTOBF,,NTIBF ; buffers
1) FATAL IMP INIT failure
1) MTAPE NET,[17 ? TNTIMO]
1) SETOM CONLSK ; gensym local socket
1) SETOM CONWAT ; do wait until timeout
1) MTAPE ICP,CONBLK ; connect → foreign logger
1) MOVE CONLSK ; get gensymmed socket
**** File 2) NETWRK.MID[S,NET]/6P/48L
2) .CONC3: SETOM CONLSK ; gensym local socket
2) SETOM CONWAT ; do wait until timeout
2) CAIE 1,'PUP ; ARPANet?
2) MTAPE ICP,CONBLK ; connect → foreign logger
2) CAIN 1,'PUP ; Ethernet
2) MTAPE NET,CONBLK ; connect → foreign server
2) MOVE CONLSK ; get gensymmed socket
***************
**** File 1) NETWRK.MID[NET,MRC]/6P/44L
1) GETSTS ICP, ; check for I/O error
1) TRNE ERRBTS
**** File 2) NETWRK.MID[S,NET]/6P/60L
2) CAIE 1,'PUP ; ARPANet?
2) GETSTS ICP, ; check for I/O error on proper channel
2) CAIN 1,'PUP ; Ethernet?
2) GETSTS NET,
2) TRNE ERRBTS
***************
**** File 1) NETWRK.MID[NET,MRC]/6P/51L
1) HRROI CONFSK-1 ; get ready to get a socket
**** File 2) NETWRK.MID[S,NET]/6P/70L
2) CAIN 1,'PUP ; Ethernet?
2) JRST GOTSK2 ; Already have connection open now!
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 6,6
2) HRROI CONFSK-1 ; get ready to get a socket
***************
**** File 1) NETWRK.MID[NET,MRC]/7P/1L
1) ;GOTSKT
1) GOTSKT: LDB [044000,,CONFSK] ; get socket we got
**** File 2) NETWRK.MID[S,NET]/7P/1L
2) ;GOTSKT GOTSK2 GOTSK3
2) GOTSKT: LDB [044000,,CONFSK] ; get socket we got
***************
**** File 1) NETWRK.MID[NET,MRC]/7P/51L
1) MOVEI 8. ; change byte size in buffer header
1) DPB [300600,,NTIBF+1]
**** File 2) NETWRK.MID[S,NET]/7P/51L
2) JRST GOTSK3 ; skip over Ethernet stuff
2) ; finish setting up Ethernet connection
2) GOTSK2: MOVE CONFSK ; get socket we got
2) MOVEM CONFSK ; and save it back
2) MOVEM FSOCKT ; save foreign socket for later
2) MOVE CONLSK ; for completeness and compatibilty
2) MOVEM INSSKT
2) ; both networks rejoin here
2) GOTSK3: MOVEI 8. ; change byte size in buffer header
2) DPB [300600,,NTIBF+1]
***************
**** File 1) NETWRK.MID[NET,MRC]/8P/1L
1) ;LISTEN .LISTE
1) ; LISTEN -- Listen for an ICP from a foreign host
1) ; Call: MOVEM <ICP socket number>,LSNSKT
1) ; PUSHJ 17,LISTEN
**** File 2) NETWRK.MID[S,NET]/8P/1L
2) ;LISTEN .LISTE .LSTN2
2) ; LISTEN -- Listen for an ICP from a foreign host
2) ; Call: MOVEM <ICP socket number>,LSNSKT
2) ; MOVEM <device name>,NETDEV ;If omitted, then use IMP
2) ; PUSHJ 17,LISTEN
***************
**** File 1) NETWRK.MID[NET,MRC]/8P/22L
1) .LISTE: INIT ICP,17 ; open ICP in dump mode
1) 'IMP,, ; device IMP:
**** File 2) NETWRK.MID[S,NET]/8P/23L
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 8,8
2) .LISTE: OPEN NET,OPNBLK ; open NET in ASCII mode
2) FATAL Network device INIT failure
2) MOVS 1,NETDEV
2) CAIN 1,'PUP ; Ethernet?
2) JRST .LSTN2
2) MTAPE NET,[17 ? TNTIMO]
2) INIT ICP,17 ; open ICP in dump mode
2) 'IMP,, ; device IMP:
***************
**** File 1) NETWRK.MID[NET,MRC]/8P/27L
1) INIT NET,0 ; open NET in ASCII mode
1) 'IMP,,
1) NTOBF,,NTIBF ; buffers
1) FATAL IMP INIT failure
1) MTAPE NET,[17 ? TNTIMO]
1) MOVEI 32. ; ICP byte size
1) MOVEM LSNBYT
1) SETOM LSNWAT ; do wait until timeout
1) MTAPE ICP,LSNBLK
1) MOVE LSNSTS ; check for MTAPE error
**** File 2) NETWRK.MID[S,NET]/8P/34L
2) MOVEI 32. ; ICP byte size
2) MOVEM LSNBYT
2) .LSTN2: SETOM LSNWAT ; do wait until timeout
2) CAIE 1,'PUP ; select channel according to network
2) MTAPE ICP,LSNBLK
2) CAIN 1,'PUP
2) MTAPE NET,LSNBLK
2) MOVE LSNSTS ; check for MTAPE error
***************
**** File 1) NETWRK.MID[NET,MRC]/8P/40L
1) GETSTS ICP, ; check for I/O error
1) TRNE ERRBTS
**** File 2) NETWRK.MID[S,NET]/8P/45L
2) CAIE 1,'PUP ; ARPANet?
2) GETSTS ICP, ; check for I/O error
2) CAIN 1,'PUP ; Ethernet?
2) GETSTS NET,
2) TRNE ERRBTS
***************
**** File 1) NETWRK.MID[NET,MRC]/8P/51L
1) ADDI 3
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 8,8
**** File 2) NETWRK.MID[S,NET]/8P/59L
2) CAIN 1,'PUP ; Ethernet?
2) JRST SNTSK2 ; connection already complete
2) ADDI 3
***************
**** File 1) NETWRK.MID[NET,MRC]/9P/1L
1) ;SNTSKT
1) SNTSKT: CLOSE ICP,
**** File 2) NETWRK.MID[S,NET]/9P/1L
2) ;SNTSKT SNTSK2 SNTSK3
2) SNTSKT: CLOSE ICP,
***************
**** File 1) NETWRK.MID[NET,MRC]/9P/44L
1) MOVEI 8. ; change byte size in buffer header
1) DPB [300600,,NTIBF+1]
**** File 2) NETWRK.MID[S,NET]/9P/44L
2) JRST SNTSK3 ; skip over Ethernet stuff
2) ; finish setting up Ethernet connection
2) SNTSK2: MOVE LSNSKT ; remember local socket
2) MOVEM LSOCKT
2) MOVEM INSSKT ; for completeness, set this as well
2) ; both networks join here
2) SNTSK3: MOVEI 8. ; change byte size in buffer header
2) DPB [300600,,NTIBF+1]
***************
**** File 1) NETWRK.MID[NET,MRC]/12P/32L
1) POPJ 17, ; I/O error return
1) NTICH3: IBP NTIBF+1 ; increment pointer to hack
**** File 2) NETWRK.MID[S,NET]/12P/32L
2) IFN MRKCHR,[
2) TRNN 0,IOBKTL ; mark seen?
2) ]; End IFN MRKCHR
2) POPJ 17, ; I/O error return
2) IFN MRKCHR,[
2) MTAPE NET,RMKBLK ; read mark byte
2) POPJ P, ; failed
2) MOVE 0,RMKDAT
2) TRO 0,400 ; send it in specially marked package
2) JRST CPOPJ2 ; good return
2) ]; End IFN MRKCHR
2) NTICH3: IBP NTIBF+1 ; increment pointer to hack
***************
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 12,12
**** File 1) NETWRK.MID[NET,MRC]/12P/43L
1) ; Have to flush nulls here.
1) NTICH1: MOVNI 1,-44(1) ; get -1,,# of padding characters
**** File 2) NETWRK.MID[S,NET]/12P/53L
2) ; Have to flush nulls here. Note: They had better really be nulls or we fail.
2) NTICH1: MOVNI 1,-44(1) ; get -1,,# of padding characters
***************
**** File 1) NETWRK.MID[NET,MRC]/22P/16L
1) TMSG [Communication prohibited!
**** File 2) NETWRK.MID[S,NET]/22P/16L
2) cain 17 ; Funny code from CONECT for bad net?
2) JRST [ TMSG [Host net is inaccessible
2) ]
2) POPJ 17,]
2) TMSG [Communication prohibited!
***************
**** File 1) NETWRK.MID[NET,MRC]/24P/1L
1) ; Host table routines
1) IFN HSTTAB,[
1) COMMENT ⊗
1) The format of the host table binary file is:
1) word 0 SIXBIT /HOSTS1/
1) word 1 SIXBIT /HOSTS/
1) word 2 version HOSTS file which this was compiled from.
1) word 3 user name of person who compiled this generation of the host table
1) word 4 Date of compilation as sixbit YYMMDD
1) word 5 Time of compilation as sixbit HHMMSS
1) word 6 Address in file of NAME table.
1) word 7 Address in file of NUMBER table.
1) NUMBERS table:
1) word 0 Number of entries in this table.
1) word 1 Number of words per entry (currently 3).
1) followed by entries, in order by host number.
1) Each entry looks like this:
1) word 0 host number
1) word 1 LH pointer to system name (ITS, TIP, TENEX, etc.)
1) May be 0 → not known.
1) word 1 RH pointer to official name of host.
1) word 2 LH flags:
1) 4.9 1 → server site.
1) word 2 RH pointer to machine name (PDP10, etc).
1) May be 0 → not known.
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 24,24
1) ...
1) NAMES table:
1) word 0 Number of entries
1) followed by one word entries, sorted by the host name treated as a vector of
1) signed integers, looking like:
1) word 0 LH address in file of NUMBERS table entry for this host.
1) RH pointer to host name
1) ...
1) Host, system and machine names are ASCIZ strings, all letters upper case.
1) The strings are stored before, after and between the NAME and NUMBER tables.
1) ⊗
1) ;HSTSID HSTFN1 HSTVRS HSTWHO HSTDAT HSTTIM NAMPTR NUMPTR NUMNUM NUMSYS NUMNAM NUMBTS NUMSRV NUMMCH NAMNAM
1) ; Host table definitions
1) ; Table header
1) HSTSID==0 ; SIXBIT /HOSTS1/
1) HSTFN1==1 ; SIXBIT /HOSTS/
1) HSTVRS==2 ; FN2 of HOSTS file (if compiled at MIT)
1) HSTWHO==3 ; User name of person who compiled
1) HSTDAT==4 ; Date of compilation as sixbit YYMMDD
1) HSTTIM==5 ; Time of compilation as sixbit HHMMSS
1) NAMPTR==6 ; Address in file of NAMES table.
1) NUMPTR==7 ; Address in file of NUMBERS table.
1) ; NUMBERS table
1) NUMNUM==0 ; host number
1) NUMSYS==1 ; LH pointer to system name
1) NUMNAM==1 ; RH pointer to official name of host.
1) NUMBTS==2 ; LH flags:
1) NUMSRV==400000 ; 4.9 → server site.
1) NUMMCH==2 ; RH pointer to machine name
1) ; NAMES table
1) NAMNAM==0 ; <numbers pointer,,host name pointer>
1) ;MAPHST
**** File 2) NETWRK.MID[S,NET]/24P/1L
2) ; Host table routines (HOSTS2)
2) IFN HSTTAB,[
2) ;The format of the compiled HOSTS2 file is:
2) HSTSID==:0 ; wd 0 SIXBIT /HOSTS2/
2) HSTFN1==:1 ; wd 1 SIXBIT /HOSTS/ usually
2) HSTVRS==:2 ; wd 2 FN2 of HOSTS file which this was compiled from.
2) HSTDIR==:3 ; wd 3 SIXBIT /SYSENG/ usually, directory name of source file
2) HSTMCH==:4 ; wd 4 SIXBIT /AI/ (e.g.), device name of source file
2) HSTWHO==:5 ; wd 5 UNAME of person who compiled this
2) HSTDAT==:6 ; wd 6 Date of compilation as sixbit YYMMDD
2) HSTTIM==:7 ; wd 7 Time of compilation as sixbit HHMMSS
2) NAMPTR==:10 ; wd 10 Address in file of NAME table.
2) SITPTR==:11 ; wd 11 Address in file of SITE table.
2) NETPTR==:12 ; wd 12 Address in file of NETWORK table.
2) ;....expandable....
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 24,24
2) ;NETWORK table
2) ; wd 0 Number of entries in table.
2) ; wd 1 Number of words per entry. (2)
2) ;This table contains one entry for each network known about, sorted
2) ;alphabetically. A network number is bits 4.8-4.1 of a network
2) ;address; these numbers are assigned by Jon Postel. See symbols below.
2) ;The reason for keeping track of different networks is that the user
2) ;program must make different system calls to use each network.
2) ;Each entry contains:
2) NETNUM==:0 ; wd 0 network number
2) NTLNAM==:1 ; wd 1 LH - address in file of name of network
2) NTRTAB==:1 ; wd 1 RH - address in file of network's address table
2) NETLEN==:2
2) ;ADDRESS table(s)
2) ; wd 0 Number of entries in table.
2) ; wd 1 Number of words per entry. (2)
2) ;There is one of these tables for each network. It contains entries
2) ;for each site attached to that network, sorted by network address.
2) ;These tables are used to convert a numeric address into a host name.
2) ;Also, the list of network addresses for a site is stored
2) ;within these tables.
2) ;Each entry contains:
2) ADDADR==:0 ; wd 0 Network address of this entry (including network number).
2) ADLSIT==:1 ; wd 1 LH - address in file of SITE table entry
2) ADRCDR==:1 ; wd 1 RH - address in file of next ADDRESS entry for this site
2) ; 0 = end of list
2) ADDLEN==:2
2) ;SITE table
2) ; wd 0 Number of entries in table.
2) ; wd 1 Number of words per entry. (3)
2) ;This table contains entries for each network site,
2) ;not sorted by anything in particular. A site can have more
2) ;than one network address, usually on different networks.
2) ;This is the main, central table.
2) ;Each entry looks like:
2) STLNAM==:0 ; wd 0 LH - address in file of official host name
2) STRADR==:0 ; wd 0 RH - address in file of first ADDRESS table entry for this
2) ; site. Successive entries are threaded together
2) ; through ADRCDR.
2) STLSYS==:1 ; wd 1 LH - address in file of system name (ITS, TIP, TENEX, etc.)
2) ; May be 0 => not known.
2) STRMCH==:1 ; wd 1 RH - address in file of machine name (PDP10, etc.)
2) ; May be 0 => not known.
2) STLFLG==:2 ; wd 2 LH - flags:
2) STFSRV==:400000 ; 4.9 1 => server site (according to NIC)
2) ; wd 2 RH - not used
2) SITLEN==:3
2) ;NAMES table:
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 24,24
2) ; wd 0 Number of entries
2) ; wd 1 Number of words per entry. (1)
2) ;This table is used to convert host names into network addresses. It
2) ;contains entries sorted alphabetically by host name.
2) NMLSIT==:0 ; lh address in file of SITE table entry for this host.
2) NMRNAM==:0 ; rh address in file of host name
2) ;This name is official if NMRNAM = STLNAM of NMLSIT.
2) NAMLEN==:1
2) ; All names are ASCIZ strings, all letters upper case.
2) ; The strings are stored before, after and between the tables.
2) ; All strings are word-aligned, and fully zero-filled in the last word.
2) ;Network addresses are defined as follows, for purposes of this table:
2) ; 4.9 0
2) ; 4.8-4.1 network number
2) ; Chaos net (number 7):
2) ; 3.9-2.8 0
2) ; 2.7-1.1 address (2.7-1.9 subnet, 1.8-1.1 host)
2) ; Arpa net (number 12): (note, old-format Arpanet addresses
2) ; & BBN-RCCnet (number 3): never appear in the host table.)
2) ; 3.9-3.8 0
2) ; 3.7-2.1 Imp
2) ; 1.9 0
2) ; 1.8-1.1 Host
2) ; Dialnet (number 26):
2) ; 3.9-3.1 0
2) ; 2.9-1.1 address in file of ASCIZ string of phone number
2) ; LCSnet (number 22):
2) ; 3.9 0
2) ; 3.8-3.1 Subnet
2) ; 2.9-1.9 0
2) ; 1.8-1.1 Host
2) ; SU net (number 44):
2) ; 3.9-2.8 0
2) ; 2.7-1.1 address (2.7-1.9 subnet, 1.8-1.1 host)
2) NW%CHS==:7 ;Chaos net
2) NW%ARP==:12 ;Arpa net
2) NW%RCC==:3 ;BBN-RCCnet
2) NW%DLN==:26 ;Dialnet
2) NW%DSK==:777 ;DSKnet
2) NW%LCS==:22 ;LCSnet
2) NW%SU==:44 ;SUnet
2) NW$BYT==:331100 ;Byte pointer to network number
2) ;Other network address formats accepted elsewhere:
2) ;A network number of 0 defaults the network according to context. "Old
2) ;format" Arpanet addresses, of the form 1.8-1.7 host, 1.6-1.1 IMP
2) ;The host-table compiler assumes Arpanet if the network number is
2) ;zero, and converts old format Arpanet addresses to new format. The
2) ;NETWRK routines for accessing this table assume a network (for number
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 24,24
2) ;zero) which depends on a program switch, and convert old format Arpa
2) ;net addresses to new format. There will also be a program switch for
2) ;which networks are allowed to be returned from a host name lookup.
2) ;The ITS Arpanet software accepts addresses with or without the network
2) ;number; if the network number is non-zero it must be 12(octal). The
2) ;network number is not returned by the system. ITS accepts either old
2) ;or new format addresses, and returns the old format whenever possible.
2) ;The ITS CHAOS net software always inputs and outputs addresses in
2) ;16-bit bytes, so the network number issue does not arise.
2) ;Dialnet addresses are always ASCIZ strings.
2) ;LCSnet addresses are in the form subnet/host, in octal.
2) ;MAPHST
***************
**** File 1) NETWRK.MID[NET,MRC]/26P/16L
1) DMOVE [SIXBIT/HOSTS1BIN/]
1) MOVE 3,['NETMRC]
1) LOOKUP ; find file HOSTS1.BIN[NET,MRC]
1) JRST [ TMSG [Host table LOOKUP failure (]
**** File 2) NETWRK.MID[S,NET]/25P/16L
2) DMOVE [SIXBIT/HOSTS2BIN/]
2) MOVE 3,['NETMRC]
2) LOOKUP ; find file HOSTS2.BIN[NET,MRC]
2) JRST [ TMSG [Host table LOOKUP failure (]
***************
**** File 1) NETWRK.MID[NET,MRC]/26P/34L
1) CAME ['HOSTS1]
1) FATAL Bad host table
**** File 2) NETWRK.MID[S,NET]/25P/34L
2) CAME ['HOSTS2]
2) FATAL Bad host table
***************
**** File 1) NETWRK.MID[NET,MRC]/27P/13L
1) CAME ['HOSTS1]
1) FATAL Bad host table
**** File 2) NETWRK.MID[S,NET]/26P/13L
2) CAME ['HOSTS2]
2) FATAL Bad host table
***************
**** File 1) NETWRK.MID[NET,MRC]/28P/14L
1) CAME 2,['HOSTS1]
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 28,27
1) FATAL Bad host table
**** File 2) NETWRK.MID[S,NET]/27P/14L
2) CAME 2,['HOSTS2]
2) FATAL Bad host table
***************
**** File 1) NETWRK.MID[NET,MRC]/28P/20L
1) HSTNU0: MOVE 1,NUMPTR(1)
1) ADD 1,HSTADR ; address of NUMBERS table
1) MOVE 2,(1) ; get # of entries
**** File 2) NETWRK.MID[S,NET]/27P/20L
2) HSTNU0: LDB 4,[NW$BYT,,0] ; get network number
2) SKIPN 4 ; if none given, assume ARPANet
2) MOVEI 4,NW%ARP
2) DPB 4,[NW$BYT,,0] ; set network number if none
2) MOVE 1,NETPTR(1)
2) PUSHJ P,HSTNUS ; lookup network number
2) POPJ P,
2) MOVE 1,NTRTAB(1) ; get address table for network
2) MOVEM 4 ; thing to search for
2) PUSHJ P,HSTNUS ; lookup address
2) POPJ P,
2) HLRZ 1,ADLSIT(1) ; Get site table entry
2) ADD 1,HSTADR
2) JRST GETHDB
2) HSTNUS: ADD 1,HSTADR ; relocate table
2) MOVE 2,(1) ; get # of entries
***************
**** File 1) NETWRK.MID[NET,MRC]/28P/25L
1) HSTNU1: MOVE 4,(1)
1) CAILE 4,377 ; old style host?
1) JRST HSTNU2
1) DPB 4,[170600,,4] ; convert to new style
1) LSH 4,-6
1) HSTNU2: CAMN 4 ; found host?
1) JRST [ AOS (17) ; yes, set up skip return
1) JRST GETHDB] ; and set up the block
1) ADD 1,3 ; point at next entry
**** File 2) NETWRK.MID[S,NET]/27P/39L
2) HSTNU1: CAMN 4,(1) ; found it?
2) JRST CPOPJ1 ; yes, skip return for success
2) ADD 1,3 ; point at next entry
***************
1) NETWRK.MID[NET,MRC] and 2) NETWRK.MID[S,NET] 1-12-83 15:10 pages 28,27
**** File 1) NETWRK.MID[NET,MRC]/28P/37L
1) SETZ 2,
1) POPJ 17, ; failure
**** File 2) NETWRK.MID[S,NET]/27P/45L
2) SETZB 2,3
2) POPJ 17, ; failure
***************
**** File 1) NETWRK.MID[NET,MRC]/29P/8L
1) ; <return--absolute NAMNUM in 0, NUMSYS,,NUMNAM in 1, NUMBTS,,NUMMCH in 2>
1) ; Smashes 0 → 10 (!!!).
**** File 2) NETWRK.MID[S,NET]/28P/8L
2) ; <return--absolute NAMNUM in 0, NUMSYS,,NUMNAM in 1, NUMBTS,,NUMMCH in 2
2) ; next address block in 3>
2) ; Smashes 0 → 10 (!!!).
***************
**** File 1) NETWRK.MID[NET,MRC]/29P/15L
1) CAME 2,['HOSTS1]
1) FATAL Bad host table
**** File 2) NETWRK.MID[S,NET]/28P/16L
2) CAME 2,['HOSTS2]
2) FATAL Bad host table
***************
**** File 1) NETWRK.MID[NET,MRC]/30P/35L
1) TLNE 6,NUMSRV ; server?
1) JRST [ CAMN 3,5 ; all self-matches win
**** File 2) NETWRK.MID[S,NET]/29P/35L
2) TLNE 6,STFSRV ; server?
2) JRST [ CAMN 3,5 ; all self-matches win
***************
**** File 1) NETWRK.MID[NET,MRC]/30P/61L
1) MOVE (1) ; host number
1) CAILE 377 ; old style host?
**** File 2) NETWRK.MID[S,NET]/29P/61L
2) HRRZ 3,STRADR(1) ; get address block
2) ADD 3,HSTADR
2) MOVE ADDADR(3) ; host number
2) HRRZ 3,ADRCDR(3) ; get other address(es), if any
2) ldb 2,[nw$byt,,0]
2) cain 2,nw%su ; *** Screwed up HOSTS2?
2) jrst [ ldb 2,[101100,,0] ; *** Perhaps
2) caile 2,77 ; *** Too big?
2) lsh 2,-1 ; *** Sigh, patch it up!
2) dpb 2,[101100,,0]
2) jrst gethdb ]
2) CAILE 377 ; old style host?
***************
**** File 1) NETWRK.MID[NET,MRC]/30P/66L
1) GETHDB: MOVE 2,2(1) ; NUMBTS,,NUMMCH
1) TRNE 2,-1
**** File 2) NETWRK.MID[S,NET]/29P/76L
2) GETHDB: MOVE 2,STRMCH(1) ; NUMBTS,,NUMMCH
2) HLL 2,STLFLG(1)
2) TRNE 2,-1
***************
**** File 1) NETWRK.MID[NET,MRC]/30P/72L
1) MOVE 1,1(1) ; NUMSYS,,NUMNAM
1) TLNN 1,-1
**** File 2) NETWRK.MID[S,NET]/29P/83L
2) HLL 1,STLSYS(1)
2) HLR 1,STLNAM(1) ; NUMSYS,,NUMNAM
2) TLNN 1,-1
***************
**** File 1) NETWRK.MID[NET,MRC]/31P/1L
1) ;SETANM SETAN1 SETAN0 SETAN2 SETAN4 SETAN5 SETAN6 SETAN7 SETAN8
**** File 2) NETWRK.MID[S,NET]/30P/1L
2) ;HSTNXA HSTNU0 HSTNU1 HSTNU2
2) ; HSTNXA -- Return descriptor block for a host
2) ; Call: MOVE 3,<number return by HSTNAM as next address block>
2) ; PUSHJ 17,HSTNXA
2) ; <error return--no other addresses
2) ; <return--absolute NAMNUM in 0, next address block in 3>
2) ; Does not disturb 1,2
2) .U"HSTNXA:
2) SKIPN HSTADR ; fail if host table not mapped
2) FATAL Host table not mapped
2) MOVE 0,@HSTADR
2) CAME 0,['HOSTS2]
2) FATAL Bad host table
2) JUMPE 3,[ SETZ 0, ; if no addresses left, fail
2) POPJ 17,]
2) ADD 3,HSTADR
2) MOVE 0,ADDADR(3) ; get this address
2) HRRZ 3,ADRCDR(3) ; get other address(es), if any
2) AOS (17)
2) POPJ 17, ; failure
2) ;SETANM SETAN1 SETAN0 SETAN2 SETAN4 SETAN5 SETAN6 SETAN7 SETAN8
***************
**** File 1) NETWRK.MID[NET,MRC]/31P/47L
1) HRRZ 5,NUMNAM(5)
1) ADD 5,HSTADR ; pointer to name
**** File 2) NETWRK.MID[S,NET]/31P/47L
2) HRRZ 5,STLNAM(5)
2) ADD 5,HSTADR ; pointer to name
***************