(FILECREATED "13-NOV-83 00:00:20" {PHYLUM}<LISPCORE>LIBRARY>ETHERRECORDS.;1 7757 changes to: (RECORDS ETHERPACKET QABLEITEM) previous date: "12-JUL-83 18:45:46" {PHYLUM}<LISP>LIBRARY>ETHERRECORDS.;1) (* Copyright (c) 1983 by Xerox Corporation) (PRETTYCOMPRINT ETHERRECORDSCOMS) (RPAQQ ETHERRECORDSCOMS ((RECORDS * ETHERRECORDS))) (RPAQQ ETHERRECORDS (ETHERPACKET PUP PUPADDRESS XIP NSHOSTNUMBER SYSQUEUE QABLEITEM)) [DECLARE: EVAL@COMPILE (DATATYPE ETHERPACKET ((NIL BYTE) (EPLINK POINTER) (* For queue maintenence) (EPFLAGS BYTE) (* optional flags for some applications) (EPUSERFIELD POINTER) (* Arbitrary pointer for applications) (NIL BYTE) (EPPLIST POINTER) (* Extra field for use as an A-list for properties) (EPTRANSMITTING FLAG) (* True while packet is being transmitted and hence cannot be reused) (NIL BITS 7) (EPREQUEUE POINTER) (* Where to requeue this packet after transmission) (NIL BYTE) (EPSOCKET POINTER) (NIL BYTE) (EPNETWORK POINTER) (EPTYPE WORD) (* Type of packet to be encapsulated (PUP or XIP or 10TO3)) (NIL WORD) (EPTIMESTAMP FIXP) (* Gets RCLK value when transmitted/received) (EPREQUEUEFN POINTER) (* FN to perform requeueing) (NIL 4 WORD) (* Space for expansion) (* Note: This next field wants to be quad+2 aligned so that the 10mb packet is quad+3 aligned) (EPENCAPSULATION 8 WORD) (* 10mb encapsulation, or 3mb encapsulation with padding) (EPBODY 289 WORD) (* Body of packet, header up to 16 words plus data up to 546 bytes) )) (ACCESSFNS PUP [(PUPBASE (LOCF (fetch (ETHERPACKET EPBODY) of DATUM] [BLOCKRECORD PUPBASE ((PUPLENGTH WORD) (PUPTCONTROL BYTE) (PUPTYPE BYTE) (PUPID FIXP) (PUPDEST WORD) (PUPDESTSOCKET FIXP) (PUPSOURCE WORD) (PUPSOURCESOCKET FIXP) (PUPDATASTART 266 WORD)) (BLOCKRECORD PUPBASE ((NIL WORD) (TYPEWORD WORD) (PUPIDHI WORD) (PUPIDLO WORD) (PUPDESTNET BYTE) (PUPDESTHOST BYTE) (PUPDESTSOCKETHI WORD) (PUPDESTSOCKETLO WORD) (PUPSOURCENET BYTE) (PUPSOURCEHOST BYTE) (PUPSOURCESOCKETHI WORD) (PUPSOURCESOCKETLO WORD)) (* Temporary extra synonyms) (SYNONYM PUPDESTNET (DESTNET)) (SYNONYM PUPDESTHOST (DESTHOST)) (SYNONYM PUPDESTSOCKETHI (DESTSKTHI)) (SYNONYM PUPDESTSOCKETLO (DESTSKTLO)) (SYNONYM PUPSOURCENET (SOURCENET)) (SYNONYM PUPSOURCEHOST (SOURCEHOST)) (SYNONYM PUPSOURCESOCKETHI (SOURCESKTHI)) (SYNONYM PUPSOURCESOCKETLO (SOURCESKTLO))) (SYNONYM PUPDEST (DEST)) (SYNONYM PUPDESTSOCKET (DESTSKT)) (SYNONYM PUPSOURCE (SOURCE)) (SYNONYM PUPSOURCESOCKET (SOURCESKT)) (ACCESSFNS PUPDATASTART ((PUPCONTENTS (LOCF DATUM] [ACCESSFNS PUP [(PUPCHECKSUMBASE (fetch PUPBASE of DATUM)) (PUPCHECKSUMLOC (\ADDBASE (fetch PUPBASE of DATUM) (FOLDLO (SUB1 (fetch PUPLENGTH of DATUM)) BYTESPERWORD] (BLOCKRECORD PUPCHECKSUMLOC ((PUPCHECKSUM WORD] (TYPE? (type? ETHERPACKET DATUM))) (ACCESSFNS PUPADDRESS ((PUPNET# (LRSH DATUM 8)) (PUPHOST# (LOGAND DATUM 255))) (CREATE (IPLUS (LLSH PUPNET# 8) PUPHOST#))) (ACCESSFNS XIP [(XIPBASE (LOCF (fetch (ETHERPACKET EPBODY) of DATUM] [BLOCKRECORD XIPBASE ((XIPCHECKSUM WORD) (XIPLENGTH WORD) (XIPTCONTROL BYTE) (XIPTYPE BYTE) (XIPDESTNET FIXP) (XIPDESTWORD1 3 WORD) (XIPDESTSOCKET WORD) (XIPSOURCENET FIXP) (XIPSOURCEWORD1 3 WORD) (XIPSOURCESOCKET WORD) (XIPFIRSTDATAWORD WORD) (* Start of data) ) [ACCESSFNS XIPLENGTH ((XIPCHECKSUMBASE (LOCF DATUM] [ACCESSFNS XIPFIRSTDATAWORD ((XIPCONTENTS (LOCF DATUM] [ACCESSFNS XIPSOURCEWORD1 ((XIPSOURCEHOST (LOADNSHOSTNUMBER (LOCF DATUM)) (STORENSHOSTNUMBER (LOCF DATUM) NEWVALUE] [ACCESSFNS XIPDESTWORD1 ((XIPDESTHOST (LOADNSHOSTNUMBER (LOCF DATUM)) (STORENSHOSTNUMBER (LOCF DATUM) NEWVALUE] [ACCESSFNS XIPSOURCENET ((XIPSOURCENSADDRESS (\LOADNSADDRESS (LOCF DATUM)) (\STORENSADDRESS (LOCF DATUM) NEWVALUE] (ACCESSFNS XIPDESTNET ((XIPDESTNSADDRESS (\LOADNSADDRESS (LOCF DATUM)) (\STORENSADDRESS (LOCF DATUM) NEWVALUE] (TYPE? (type? ETHERPACKET DATUM))) (TYPERECORD NSHOSTNUMBER (NSHOST0 NSHOST1 NSHOST2)) (DATATYPE SYSQUEUE ((NIL BYTE) (SYSQUEUEHEAD POINTER) (NIL BYTE) (SYSQUEUETAIL POINTER))) (BLOCKRECORD QABLEITEM ((NIL BYTE) (QLINK POINTER) (* Link to next thing in queue always in first pointer of datum, independent of what the datum is) ) (BLOCKRECORD QABLEITEM ((NIL BYTE) (LINK POINTER) (* Let's also be able to call it a LINK) ))) ] (/DECLAREDATATYPE (QUOTE ETHERPACKET) (QUOTE (BYTE POINTER BYTE POINTER BYTE POINTER FLAG (BITS 7) POINTER BYTE POINTER BYTE POINTER WORD WORD FIXP POINTER WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD))) (/DECLAREDATATYPE (QUOTE SYSQUEUE) (QUOTE (BYTE POINTER BYTE POINTER))) (PUTPROPS ETHERRECORDS COPYRIGHT ("Xerox Corporation" 1983)) (DECLARE: DONTCOPY (FILEMAP (NIL))) STOP