(FILECREATED "12-Nov-85 23:27:01" {ERIS}<IRIS>KOTO>IRISNET.;6 11727 changes to: (FNS IRISBOOTPROCESS) previous date: "18-Oct-85 16:26:04" {ERIS}<IRIS>KOTO>IRISNET.;2) (PRETTYCOMPRINT IRISNETCOMS) (RPAQQ IRISNETCOMS ([DECLARE: EVAL@LOAD DONTCOPY (P (LOADCOMP (QUOTE LLETHER)) (LOADCOMP (QUOTE ETHERRECORDS] (FNS IRIS.RESET IRIS.TRACE IRISBOOTPROCESS SENDIRISPACKET IRISFILTER OPEN.IRISCONN IRISBOOTSERVER) (VARS \IRIS.VERBOSE (PRINTSPPDATAFLG T)) (VARS (IRIS.LOCK (CREATE.MONITORLOCK "iris boot lock"))) [INITVARS (IRISNSHOSTNUMBER NIL) (IRISNET 146) (IRISBOOTDIRECTORIES (QUOTE ({DSK} {ERIS}<IRIS>gl2>boot>] (CONSTANTS (IRISSOCKET 37) (IRIS.PACKETTYPE 32790) (IRIS.BOOT.STREAM.NAME (QUOTE IRIS% boot% SPP))) [DECLARE: EVAL@LOAD DONTCOPY (FILES ETHERRECORDS) (P (LOADCOMP (QUOTE LLETHER] [P (ACCESSFNS IRISENCAPSULATION [(IRISBASE (LOCF (FETCH (ETHERPACKET EPENCAPSULATION) OF DATUM] [BLOCKRECORD IRISBASE ((IRISLENGTH WORD) (IRISDESTHOSTO 3 WORD) (IRISSOURCEHOSTO 3 WORD) (IRISTYPE WORD) (IRISEXCHID WORD) (INFOCHAR1 BYTE) (INFOCHAR2 BYTE)) [ACCESSFNS IRISDESTHOSTO ((IRISDESTHOST (\LOADNSHOSTNUMBER (LOCF DATUM)) (\STORENSHOSTNUMBER (LOCF DATUM) NEWVALUE)) (IRISPACKETBASE (LOCF DATUM)) (IRISDESTHOSTBASE (LOCF DATUM] (ACCESSFNS IRISSOURCEHOSTO ((IRISSOURCEHOST (\LOADNSHOSTNUMBER (LOCF DATUM)) (\STORENSHOSTNUMBER (LOCF DATUM) NEWVALUE)) (IRISSOURCEHOSTBASE (LOCF DATUM] (TYPE? (type? ETHERPACKET DATUM] (MACROS BROADCASTP))) (DECLARE: EVAL@LOAD DONTCOPY (LOADCOMP (QUOTE LLETHER)) (LOADCOMP (QUOTE ETHERRECORDS)) ) (DEFINEQ (IRIS.RESET [LAMBDA NIL (* gbn "24-Jun-85 01:31") (PROG (PROC) (CLOSEF? (QUOTE {DSK}IRISBOOTFILE)) (if (SETQ PROC (FIND.PROCESS IRIS.BOOT.STREAM.NAME)) then (DEL.PROCESS PROC)) (if (SETQ PROC (FIND.PROCESS (QUOTE Iris% Terminal% SPP))) then (DEL.PROCESS PROC)) (if (SETQ PROC (FIND.PROCESS (QUOTE IRISBOOTPROCESS))) then (DEL.PROCESS PROC)) (PROCESS.STATUS.WINDOW (CREATEPOSITION 5 5]) (IRIS.TRACE [LAMBDA NIL (* gbn "27-Feb-85 14:48") (SETQ XIPIGNORETYPES (QUOTE (1 TRANS))) (XIPTRACE T]) (IRISBOOTPROCESS [LAMBDA (IRISPACKET) (* gbn "12-Nov-85 23:16") (DECLARE (GLOBALVARS IRISBOOTDIRECTORIES IRISNSADDRESS IRIS.LOCK IRISNET IRISNSHOSTNUMBER)) (COND ((OBTAIN.MONITORLOCK IRIS.LOCK T T) [PROG (DH CHAR NET IRISBOOTFILE INBOOTSTREAM OUTBOOTSTREAM IRISBOOTFILENAME BOOTFILENAME TEMP) (SETQ DH (fetch (IRISENCAPSULATION IRISSOURCEHOST) of IRISPACKET)) (SETQ CHAR (fetch (IRISENCAPSULATION INFOCHAR1) of IRISPACKET)) (replace (IRISENCAPSULATION IRISDESTHOST) of IRISPACKET with (SETQ IRISNSHOSTNUMBER (fetch (IRISENCAPSULATION IRISSOURCEHOST) of IRISPACKET))) (replace (IRISENCAPSULATION IRISSOURCEHOST) of IRISPACKET with \MY.NSHOSTNUMBER) [COND (\IRIS.VERBOSE (* inform the user that a boot attempt is being made) (FLASHWINDOW PROMPTWINDOW) (PROMPTPRINT (CONCAT "IRIS boot initiated to: " DH] (* "E" for "reply" to booting and "H" for "hostname" for spp connection) (SETQ NET (fetch (XIP XIPSOURCENET) of IRISPACKET)) (SETQ IRISNSADDRESS (create NSADDRESS NSNET ← IRISNET NSHOSTNUMBER ← IRISNSHOSTNUMBER)) (* this should be using the net from the iris, but it can't be trusted. SGI doesn't handle turning around packets properly) (COND ((EQ CHAR (CHARCODE C)) (* replace EPSOCKET of IRISPACKET with 41) (replace (IRISENCAPSULATION INFOCHAR1) of IRISPACKET with (CHARCODE E)) (SENDIRISPACKET IRISPACKET) (* just sends back an "E" packet with our host socket (41) filled in) (SETQ INBOOTSTREAM (SPP.OPEN NIL 41 NIL IRIS.BOOT.STREAM.NAME)) (SETQ OUTBOOTSTREAM (SPPOUTPUTSTREAM INBOOTSTREAM)) (SPP.DSTYPE INBOOTSTREAM 108) (* returns a connection which is not yet established) (BIN INBOOTSTREAM) [SETQ TEMP (CONCAT (PACKC (while (SPP.READP INBOOTSTREAM) collect (BIN INBOOTSTREAM] [SETQ BOOTFILENAME (L-CASE (SUBSTRING TEMP (STRPOS ":*:" TEMP 1 NIL NIL T) (SUB1 (STRPOS (CONCAT (CHARACTER 0)) TEMP] [COND ((STREQUAL BOOTFILENAME (CONSTANT "defaultboot")) (SETQ BOOTFILENAME (CONSTANT "iris"] (* This is a packet specifying the boot file name,) [SETQ IRISBOOTFILE (OPENSTREAM (SETQ IRISBOOTFILENAME (FINDFILE BOOTFILENAME NIL IRISBOOTDIRECTORIES)) (QUOTE INPUT) NIL (QUOTE ((TYPE BINARY] [COND (\IRIS.VERBOSE (* inform the user that a boot attempt is being made) (PROMPTPRINT (CONCAT "Booting IRIS from: " IRISBOOTFILENAME] (COPYBYTES IRISBOOTFILE OUTBOOTSTREAM NIL NIL) (FORCEOUTPUT OUTBOOTSTREAM) (CLOSEF IRISBOOTFILE) (PROMPTPRINT "IRIS boot server complete, closing boot file") (CLOSEF INBOOTSTREAM)) ((EQ CHAR (CHARCODE A)) (* replace EPSOCKET of IRISPACKET with 41) (replace (IRISENCAPSULATION INFOCHAR1) of IRISPACKET with (CHARCODE E)) (SENDIRISPACKET IRISPACKET) (* just sends back an "E" packet with our host socket (41) filled in) (SETQ INBOOTSTREAM (SPP.OPEN NIL 41 NIL IRIS.BOOT.STREAM.NAME)) (SETQ OUTBOOTSTREAM (SPPOUTPUTSTREAM INBOOTSTREAM)) (SPP.DSTYPE INBOOTSTREAM 108) (* returns a connection which is not yet established) (BIN INBOOTSTREAM) (while (SPP.READP INBOOTSTREAM) collect (BIN INBOOTSTREAM)) (SETQ BOOTFILENAME (CONSTANT "iris")) (* This is a packet specifying the boot file name,) [SETQ IRISBOOTFILE (OPENSTREAM (SETQ IRISBOOTFILENAME (FINDFILE BOOTFILENAME NIL IRISBOOTDIRECTORIES)) (QUOTE INPUT) NIL (QUOTE ((TYPE BINARY] [COND (\IRIS.VERBOSE (* inform the user that a boot attempt is being made) (PROMPTPRINT (CONCAT "Booting IRIS from: " IRISBOOTFILENAME] (COPYBYTES IRISBOOTFILE OUTBOOTSTREAM NIL NIL) (FORCEOUTPUT OUTBOOTSTREAM) (CLOSEF IRISBOOTFILE) (PROMPTPRINT "IRIS boot server complete, closing boot file") (CLOSEF INBOOTSTREAM)) ((EQ CHAR (CHARCODE H)) (* serv-hostname in SGIspeak) (PRINT "workstation server connection") (* replace EPSOCKET of IRISPACKET with 41) (replace (IRISENCAPSULATION INFOCHAR1) of IRISPACKET with (CHARCODE H)) (SETQ INBOOTSTREAM (SPP.OPEN NIL 37)) (SENDIRISPACKET IRISPACKET)) (T (PRINT "Iris connection") (* replace EPSOCKET of IRISPACKET with 41) (PRINTOUT PROMPTWINDOW CHAR "RECEIVED") (replace (IRISENCAPSULATION INFOCHAR1) of IRISPACKET with (CHARCODE H)) (SETQ INBOOTSTREAM (SPP.OPEN NIL 37)) (SENDIRISPACKET IRISPACKET] (RELEASE.MONITORLOCK IRIS.LOCK]) (SENDIRISPACKET [LAMBDA (IRISPACKET) (* gbn "10-Jun-85 16:05") (* * Sends a raw seething IRIS packet) (COND ((fetch (ETHERPACKET EPTRANSMITTING) of IRISPACKET) (QUOTE AlreadyQueued)) (T (* (\RCLK (LOCF (fetch (ETHERPACKET EPTIMESTAMP) of IRISPACKET)))) (TRANSMIT.ETHERPACKET (fetch (ETHERPACKET EPNETWORK) of IRISPACKET) IRISPACKET]) (IRISFILTER [LAMBDA (IRISPACKET) (* gbn " 3-Jun-85 22:49") (if (AND (EQ (fetch (ETHERPACKET EPTYPE) of IRISPACKET) IRIS.PACKETTYPE) (BROADCASTP IRISPACKET)) then (ADD.PROCESS (BQUOTE (IRISBOOTPROCESS , IRISPACKET))) T else (* not an iris packet) NIL]) (OPEN.IRISCONN [LAMBDA (NSADDRESS) (* gbn " 7-Jul-85 14:42") (SETQ IRISCONN (SPP.OPEN (OR NSADDRESS IRISNSADDRESS) IRISSOCKET T (QUOTE Iris% Terminal% SPP]) (IRISBOOTSERVER [LAMBDA (ON?) (* gbn " 7-Jul-85 14:54") (if ON? then (PROMPTPRINT "Enabling IRIS boot server") (\ADD.PACKET.FILTER (FUNCTION IRISFILTER)) else (PROMPTPRINT "Disabling IRIS boot server") (\DEL.PACKET.FILTER (FUNCTION IRISFILTER]) ) (RPAQQ \IRIS.VERBOSE T) (RPAQQ PRINTSPPDATAFLG T) (RPAQ IRIS.LOCK (CREATE.MONITORLOCK "iris boot lock")) (RPAQ? IRISNSHOSTNUMBER NIL) (RPAQ? IRISNET 146) (RPAQ? IRISBOOTDIRECTORIES (QUOTE ({DSK} {ERIS}<IRIS>gl2>boot>))) (DECLARE: EVAL@COMPILE (RPAQQ IRISSOCKET 37) (RPAQQ IRIS.PACKETTYPE 32790) (RPAQQ IRIS.BOOT.STREAM.NAME IRIS% boot% SPP) (CONSTANTS (IRISSOCKET 37) (IRIS.PACKETTYPE 32790) (IRIS.BOOT.STREAM.NAME (QUOTE IRIS% boot% SPP))) ) (DECLARE: EVAL@LOAD DONTCOPY (FILESLOAD ETHERRECORDS) (LOADCOMP (QUOTE LLETHER)) ) (ACCESSFNS IRISENCAPSULATION [(IRISBASE (LOCF (FETCH (ETHERPACKET EPENCAPSULATION) OF DATUM] [BLOCKRECORD IRISBASE ((IRISLENGTH WORD) (IRISDESTHOSTO 3 WORD) (IRISSOURCEHOSTO 3 WORD) (IRISTYPE WORD) (IRISEXCHID WORD) (INFOCHAR1 BYTE) (INFOCHAR2 BYTE)) [ACCESSFNS IRISDESTHOSTO ((IRISDESTHOST (\LOADNSHOSTNUMBER (LOCF DATUM)) (\STORENSHOSTNUMBER (LOCF DATUM) NEWVALUE)) (IRISPACKETBASE (LOCF DATUM)) (IRISDESTHOSTBASE (LOCF DATUM] (ACCESSFNS IRISSOURCEHOSTO ((IRISSOURCEHOST (\LOADNSHOSTNUMBER (LOCF DATUM)) (\STORENSHOSTNUMBER (LOCF DATUM) NEWVALUE)) (IRISSOURCEHOSTBASE (LOCF DATUM] (TYPE? (type? ETHERPACKET DATUM))) (DECLARE: EVAL@COMPILE [PUTPROPS BROADCASTP MACRO ((PACKET) ([LAMBDA (NDB) (AND NDB (APPLY* (fetch NDBBROADCASTP of NDB) PACKET NDB] (fetch EPNETWORK of PACKET] ) (DECLARE: DONTCOPY (FILEMAP (NIL (1934 10198 (IRIS.RESET 1944 . 2549) (IRIS.TRACE 2551 . 2731) (IRISBOOTPROCESS 2733 . 8648) (SENDIRISPACKET 8650 . 9178) (IRISFILTER 9180 . 9603) (OPEN.IRISCONN 9605 . 9838) ( IRISBOOTSERVER 9840 . 10196))))) STOP