(FILECREATED " 6-Oct-85 15:10:27" {ERIS}<LISPCORE>LIBRARY>ETHERRECORDS.;2 23405  

      changes to:  (RECORDS NSNAME)
		   (VARS ETHERRECORDSCOMS)

      previous date: "26-Sep-84 12:34:38" {ERIS}<LISPCORE>LIBRARY>ETHERRECORDS.;1)


(* Copyright (c) 1983, 1984, 1985 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT ETHERRECORDSCOMS)

(RPAQQ ETHERRECORDSCOMS ((RECORDS ETHERPACKET SYSQUEUE QABLEITEM)
			   (COMS (* Pup things)
				 (RECORDS PUP ERRORPUP PUPADDRESS)
				 (MACROS \LOCALPUPADDRESS \LOCALPUPHOSTNUMBER \LOCALPUPNETNUMBER)
				 (CONSTANTS (\PUPOVLEN 22)
					    (\MAX.PUPDATALENGTH 532))
				 (CONSTANTS * PUPERRORCODES))
			   (COMS (* XIP things)
				 (RECORDS XIP ERRORXIP NSHOSTNUMBER NSADDRESS NSNAME)
				 (CONSTANTS (\XIPOVLEN 30)
					    (\MAX.XIPDATALENGTH 546))
				 (CONSTANTS * XIPERRORCODES))))
[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)
			 (EPRECEIVING FLAG)                  (* True when a packet has been seen at the head of the
							     network's input queue at least once)
			 (NIL BITS 6)
			 (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)
			 ))

(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 FLAG (BITS 6)
			       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))
		  [QUOTE ((ETHERPACKET 0 (BITS . 7))
			  (ETHERPACKET 0 POINTER)
			  (ETHERPACKET 2 (BITS . 7))
			  (ETHERPACKET 2 POINTER)
			  (ETHERPACKET 4 (BITS . 7))
			  (ETHERPACKET 4 POINTER)
			  (ETHERPACKET 6 (FLAGBITS . 0))
			  (ETHERPACKET 6 (FLAGBITS . 16))
			  (ETHERPACKET 6 (BITS . 37))
			  (ETHERPACKET 6 POINTER)
			  (ETHERPACKET 8 (BITS . 7))
			  (ETHERPACKET 8 POINTER)
			  (ETHERPACKET 10 (BITS . 7))
			  (ETHERPACKET 10 POINTER)
			  (ETHERPACKET 12 (BITS . 15))
			  (ETHERPACKET 13 (BITS . 15))
			  (ETHERPACKET 14 FIXP)
			  (ETHERPACKET 16 POINTER)
			  (ETHERPACKET 18 (BITS . 15))
			  (ETHERPACKET 19 (BITS . 15))
			  (ETHERPACKET 20 (BITS . 15))
			  (ETHERPACKET 21 (BITS . 15))
			  (ETHERPACKET 22 (BITS . 15))
			  (ETHERPACKET 23 (BITS . 15))
			  (ETHERPACKET 24 (BITS . 15))
			  (ETHERPACKET 25 (BITS . 15))
			  (ETHERPACKET 26 (BITS . 15))
			  (ETHERPACKET 27 (BITS . 15))
			  (ETHERPACKET 28 (BITS . 15))
			  (ETHERPACKET 29 (BITS . 15))
			  (ETHERPACKET 30 (BITS . 15))
			  (ETHERPACKET 31 (BITS . 15))
			  (ETHERPACKET 32 (BITS . 15))
			  (ETHERPACKET 33 (BITS . 15))
			  (ETHERPACKET 34 (BITS . 15))
			  (ETHERPACKET 35 (BITS . 15))
			  (ETHERPACKET 36 (BITS . 15))
			  (ETHERPACKET 37 (BITS . 15))
			  (ETHERPACKET 38 (BITS . 15))
			  (ETHERPACKET 39 (BITS . 15))
			  (ETHERPACKET 40 (BITS . 15))
			  (ETHERPACKET 41 (BITS . 15))
			  (ETHERPACKET 42 (BITS . 15))
			  (ETHERPACKET 43 (BITS . 15))
			  (ETHERPACKET 44 (BITS . 15))
			  (ETHERPACKET 45 (BITS . 15))
			  (ETHERPACKET 46 (BITS . 15))
			  (ETHERPACKET 47 (BITS . 15))
			  (ETHERPACKET 48 (BITS . 15))
			  (ETHERPACKET 49 (BITS . 15))
			  (ETHERPACKET 50 (BITS . 15))
			  (ETHERPACKET 51 (BITS . 15))
			  (ETHERPACKET 52 (BITS . 15))
			  (ETHERPACKET 53 (BITS . 15))
			  (ETHERPACKET 54 (BITS . 15))
			  (ETHERPACKET 55 (BITS . 15))
			  (ETHERPACKET 56 (BITS . 15))
			  (ETHERPACKET 57 (BITS . 15))
			  (ETHERPACKET 58 (BITS . 15))
			  (ETHERPACKET 59 (BITS . 15))
			  (ETHERPACKET 60 (BITS . 15))
			  (ETHERPACKET 61 (BITS . 15))
			  (ETHERPACKET 62 (BITS . 15))
			  (ETHERPACKET 63 (BITS . 15))
			  (ETHERPACKET 64 (BITS . 15))
			  (ETHERPACKET 65 (BITS . 15))
			  (ETHERPACKET 66 (BITS . 15))
			  (ETHERPACKET 67 (BITS . 15))
			  (ETHERPACKET 68 (BITS . 15))
			  (ETHERPACKET 69 (BITS . 15))
			  (ETHERPACKET 70 (BITS . 15))
			  (ETHERPACKET 71 (BITS . 15))
			  (ETHERPACKET 72 (BITS . 15))
			  (ETHERPACKET 73 (BITS . 15))
			  (ETHERPACKET 74 (BITS . 15))
			  (ETHERPACKET 75 (BITS . 15))
			  (ETHERPACKET 76 (BITS . 15))
			  (ETHERPACKET 77 (BITS . 15))
			  (ETHERPACKET 78 (BITS . 15))
			  (ETHERPACKET 79 (BITS . 15))
			  (ETHERPACKET 80 (BITS . 15))
			  (ETHERPACKET 81 (BITS . 15))
			  (ETHERPACKET 82 (BITS . 15))
			  (ETHERPACKET 83 (BITS . 15))
			  (ETHERPACKET 84 (BITS . 15))
			  (ETHERPACKET 85 (BITS . 15))
			  (ETHERPACKET 86 (BITS . 15))
			  (ETHERPACKET 87 (BITS . 15))
			  (ETHERPACKET 88 (BITS . 15))
			  (ETHERPACKET 89 (BITS . 15))
			  (ETHERPACKET 90 (BITS . 15))
			  (ETHERPACKET 91 (BITS . 15))
			  (ETHERPACKET 92 (BITS . 15))
			  (ETHERPACKET 93 (BITS . 15))
			  (ETHERPACKET 94 (BITS . 15))
			  (ETHERPACKET 95 (BITS . 15))
			  (ETHERPACKET 96 (BITS . 15))
			  (ETHERPACKET 97 (BITS . 15))
			  (ETHERPACKET 98 (BITS . 15))
			  (ETHERPACKET 99 (BITS . 15))
			  (ETHERPACKET 100 (BITS . 15))
			  (ETHERPACKET 101 (BITS . 15))
			  (ETHERPACKET 102 (BITS . 15))
			  (ETHERPACKET 103 (BITS . 15))
			  (ETHERPACKET 104 (BITS . 15))
			  (ETHERPACKET 105 (BITS . 15))
			  (ETHERPACKET 106 (BITS . 15))
			  (ETHERPACKET 107 (BITS . 15))
			  (ETHERPACKET 108 (BITS . 15))
			  (ETHERPACKET 109 (BITS . 15))
			  (ETHERPACKET 110 (BITS . 15))
			  (ETHERPACKET 111 (BITS . 15))
			  (ETHERPACKET 112 (BITS . 15))
			  (ETHERPACKET 113 (BITS . 15))
			  (ETHERPACKET 114 (BITS . 15))
			  (ETHERPACKET 115 (BITS . 15))
			  (ETHERPACKET 116 (BITS . 15))
			  (ETHERPACKET 117 (BITS . 15))
			  (ETHERPACKET 118 (BITS . 15))
			  (ETHERPACKET 119 (BITS . 15))
			  (ETHERPACKET 120 (BITS . 15))
			  (ETHERPACKET 121 (BITS . 15))
			  (ETHERPACKET 122 (BITS . 15))
			  (ETHERPACKET 123 (BITS . 15))
			  (ETHERPACKET 124 (BITS . 15))
			  (ETHERPACKET 125 (BITS . 15))
			  (ETHERPACKET 126 (BITS . 15))
			  (ETHERPACKET 127 (BITS . 15))
			  (ETHERPACKET 128 (BITS . 15))
			  (ETHERPACKET 129 (BITS . 15))
			  (ETHERPACKET 130 (BITS . 15))
			  (ETHERPACKET 131 (BITS . 15))
			  (ETHERPACKET 132 (BITS . 15))
			  (ETHERPACKET 133 (BITS . 15))
			  (ETHERPACKET 134 (BITS . 15))
			  (ETHERPACKET 135 (BITS . 15))
			  (ETHERPACKET 136 (BITS . 15))
			  (ETHERPACKET 137 (BITS . 15))
			  (ETHERPACKET 138 (BITS . 15))
			  (ETHERPACKET 139 (BITS . 15))
			  (ETHERPACKET 140 (BITS . 15))
			  (ETHERPACKET 141 (BITS . 15))
			  (ETHERPACKET 142 (BITS . 15))
			  (ETHERPACKET 143 (BITS . 15))
			  (ETHERPACKET 144 (BITS . 15))
			  (ETHERPACKET 145 (BITS . 15))
			  (ETHERPACKET 146 (BITS . 15))
			  (ETHERPACKET 147 (BITS . 15))
			  (ETHERPACKET 148 (BITS . 15))
			  (ETHERPACKET 149 (BITS . 15))
			  (ETHERPACKET 150 (BITS . 15))
			  (ETHERPACKET 151 (BITS . 15))
			  (ETHERPACKET 152 (BITS . 15))
			  (ETHERPACKET 153 (BITS . 15))
			  (ETHERPACKET 154 (BITS . 15))
			  (ETHERPACKET 155 (BITS . 15))
			  (ETHERPACKET 156 (BITS . 15))
			  (ETHERPACKET 157 (BITS . 15))
			  (ETHERPACKET 158 (BITS . 15))
			  (ETHERPACKET 159 (BITS . 15))
			  (ETHERPACKET 160 (BITS . 15))
			  (ETHERPACKET 161 (BITS . 15))
			  (ETHERPACKET 162 (BITS . 15))
			  (ETHERPACKET 163 (BITS . 15))
			  (ETHERPACKET 164 (BITS . 15))
			  (ETHERPACKET 165 (BITS . 15))
			  (ETHERPACKET 166 (BITS . 15))
			  (ETHERPACKET 167 (BITS . 15))
			  (ETHERPACKET 168 (BITS . 15))
			  (ETHERPACKET 169 (BITS . 15))
			  (ETHERPACKET 170 (BITS . 15))
			  (ETHERPACKET 171 (BITS . 15))
			  (ETHERPACKET 172 (BITS . 15))
			  (ETHERPACKET 173 (BITS . 15))
			  (ETHERPACKET 174 (BITS . 15))
			  (ETHERPACKET 175 (BITS . 15))
			  (ETHERPACKET 176 (BITS . 15))
			  (ETHERPACKET 177 (BITS . 15))
			  (ETHERPACKET 178 (BITS . 15))
			  (ETHERPACKET 179 (BITS . 15))
			  (ETHERPACKET 180 (BITS . 15))
			  (ETHERPACKET 181 (BITS . 15))
			  (ETHERPACKET 182 (BITS . 15))
			  (ETHERPACKET 183 (BITS . 15))
			  (ETHERPACKET 184 (BITS . 15))
			  (ETHERPACKET 185 (BITS . 15))
			  (ETHERPACKET 186 (BITS . 15))
			  (ETHERPACKET 187 (BITS . 15))
			  (ETHERPACKET 188 (BITS . 15))
			  (ETHERPACKET 189 (BITS . 15))
			  (ETHERPACKET 190 (BITS . 15))
			  (ETHERPACKET 191 (BITS . 15))
			  (ETHERPACKET 192 (BITS . 15))
			  (ETHERPACKET 193 (BITS . 15))
			  (ETHERPACKET 194 (BITS . 15))
			  (ETHERPACKET 195 (BITS . 15))
			  (ETHERPACKET 196 (BITS . 15))
			  (ETHERPACKET 197 (BITS . 15))
			  (ETHERPACKET 198 (BITS . 15))
			  (ETHERPACKET 199 (BITS . 15))
			  (ETHERPACKET 200 (BITS . 15))
			  (ETHERPACKET 201 (BITS . 15))
			  (ETHERPACKET 202 (BITS . 15))
			  (ETHERPACKET 203 (BITS . 15))
			  (ETHERPACKET 204 (BITS . 15))
			  (ETHERPACKET 205 (BITS . 15))
			  (ETHERPACKET 206 (BITS . 15))
			  (ETHERPACKET 207 (BITS . 15))
			  (ETHERPACKET 208 (BITS . 15))
			  (ETHERPACKET 209 (BITS . 15))
			  (ETHERPACKET 210 (BITS . 15))
			  (ETHERPACKET 211 (BITS . 15))
			  (ETHERPACKET 212 (BITS . 15))
			  (ETHERPACKET 213 (BITS . 15))
			  (ETHERPACKET 214 (BITS . 15))
			  (ETHERPACKET 215 (BITS . 15))
			  (ETHERPACKET 216 (BITS . 15))
			  (ETHERPACKET 217 (BITS . 15))
			  (ETHERPACKET 218 (BITS . 15))
			  (ETHERPACKET 219 (BITS . 15))
			  (ETHERPACKET 220 (BITS . 15))
			  (ETHERPACKET 221 (BITS . 15))
			  (ETHERPACKET 222 (BITS . 15))
			  (ETHERPACKET 223 (BITS . 15))
			  (ETHERPACKET 224 (BITS . 15))
			  (ETHERPACKET 225 (BITS . 15))
			  (ETHERPACKET 226 (BITS . 15))
			  (ETHERPACKET 227 (BITS . 15))
			  (ETHERPACKET 228 (BITS . 15))
			  (ETHERPACKET 229 (BITS . 15))
			  (ETHERPACKET 230 (BITS . 15))
			  (ETHERPACKET 231 (BITS . 15))
			  (ETHERPACKET 232 (BITS . 15))
			  (ETHERPACKET 233 (BITS . 15))
			  (ETHERPACKET 234 (BITS . 15))
			  (ETHERPACKET 235 (BITS . 15))
			  (ETHERPACKET 236 (BITS . 15))
			  (ETHERPACKET 237 (BITS . 15))
			  (ETHERPACKET 238 (BITS . 15))
			  (ETHERPACKET 239 (BITS . 15))
			  (ETHERPACKET 240 (BITS . 15))
			  (ETHERPACKET 241 (BITS . 15))
			  (ETHERPACKET 242 (BITS . 15))
			  (ETHERPACKET 243 (BITS . 15))
			  (ETHERPACKET 244 (BITS . 15))
			  (ETHERPACKET 245 (BITS . 15))
			  (ETHERPACKET 246 (BITS . 15))
			  (ETHERPACKET 247 (BITS . 15))
			  (ETHERPACKET 248 (BITS . 15))
			  (ETHERPACKET 249 (BITS . 15))
			  (ETHERPACKET 250 (BITS . 15))
			  (ETHERPACKET 251 (BITS . 15))
			  (ETHERPACKET 252 (BITS . 15))
			  (ETHERPACKET 253 (BITS . 15))
			  (ETHERPACKET 254 (BITS . 15))
			  (ETHERPACKET 255 (BITS . 15))
			  (ETHERPACKET 256 (BITS . 15))
			  (ETHERPACKET 257 (BITS . 15))
			  (ETHERPACKET 258 (BITS . 15))
			  (ETHERPACKET 259 (BITS . 15))
			  (ETHERPACKET 260 (BITS . 15))
			  (ETHERPACKET 261 (BITS . 15))
			  (ETHERPACKET 262 (BITS . 15))
			  (ETHERPACKET 263 (BITS . 15))
			  (ETHERPACKET 264 (BITS . 15))
			  (ETHERPACKET 265 (BITS . 15))
			  (ETHERPACKET 266 (BITS . 15))
			  (ETHERPACKET 267 (BITS . 15))
			  (ETHERPACKET 268 (BITS . 15))
			  (ETHERPACKET 269 (BITS . 15))
			  (ETHERPACKET 270 (BITS . 15))
			  (ETHERPACKET 271 (BITS . 15))
			  (ETHERPACKET 272 (BITS . 15))
			  (ETHERPACKET 273 (BITS . 15))
			  (ETHERPACKET 274 (BITS . 15))
			  (ETHERPACKET 275 (BITS . 15))
			  (ETHERPACKET 276 (BITS . 15))
			  (ETHERPACKET 277 (BITS . 15))
			  (ETHERPACKET 278 (BITS . 15))
			  (ETHERPACKET 279 (BITS . 15))
			  (ETHERPACKET 280 (BITS . 15))
			  (ETHERPACKET 281 (BITS . 15))
			  (ETHERPACKET 282 (BITS . 15))
			  (ETHERPACKET 283 (BITS . 15))
			  (ETHERPACKET 284 (BITS . 15))
			  (ETHERPACKET 285 (BITS . 15))
			  (ETHERPACKET 286 (BITS . 15))
			  (ETHERPACKET 287 (BITS . 15))
			  (ETHERPACKET 288 (BITS . 15))
			  (ETHERPACKET 289 (BITS . 15))
			  (ETHERPACKET 290 (BITS . 15))
			  (ETHERPACKET 291 (BITS . 15))
			  (ETHERPACKET 292 (BITS . 15))
			  (ETHERPACKET 293 (BITS . 15))
			  (ETHERPACKET 294 (BITS . 15))
			  (ETHERPACKET 295 (BITS . 15))
			  (ETHERPACKET 296 (BITS . 15))
			  (ETHERPACKET 297 (BITS . 15))
			  (ETHERPACKET 298 (BITS . 15))
			  (ETHERPACKET 299 (BITS . 15))
			  (ETHERPACKET 300 (BITS . 15))
			  (ETHERPACKET 301 (BITS . 15))
			  (ETHERPACKET 302 (BITS . 15))
			  (ETHERPACKET 303 (BITS . 15))
			  (ETHERPACKET 304 (BITS . 15))
			  (ETHERPACKET 305 (BITS . 15))
			  (ETHERPACKET 306 (BITS . 15))
			  (ETHERPACKET 307 (BITS . 15))
			  (ETHERPACKET 308 (BITS . 15))
			  (ETHERPACKET 309 (BITS . 15))
			  (ETHERPACKET 310 (BITS . 15))
			  (ETHERPACKET 311 (BITS . 15))
			  (ETHERPACKET 312 (BITS . 15))
			  (ETHERPACKET 313 (BITS . 15))
			  (ETHERPACKET 314 (BITS . 15))
			  (ETHERPACKET 315 (BITS . 15))
			  (ETHERPACKET 316 (BITS . 15))
			  (ETHERPACKET 317 (BITS . 15))
			  (ETHERPACKET 318 (BITS . 15]
		  (QUOTE 320))
(/DECLAREDATATYPE (QUOTE SYSQUEUE)
		  (QUOTE (BYTE POINTER BYTE POINTER))
		  (QUOTE ((SYSQUEUE 0 (BITS . 7))
			  (SYSQUEUE 0 POINTER)
			  (SYSQUEUE 2 (BITS . 7))
			  (SYSQUEUE 2 POINTER)))
		  (QUOTE 4))



(* Pup things)

[DECLARE: EVAL@COMPILE 

(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 ERRORPUP ((ERRORPUPBASE (fetch PUPCONTENTS of DATUM)))
		      (BLOCKRECORD ERRORPUPBASE ((ERRORPUPCOPY 10 WORD)
                                                             (* Copy of pup header)
				      (ERRORPUPCODE WORD)
				      (ERRORPUPARG WORD)     (* Usually zero)
				      (ERRORPUPSTRINGBASE WORD)
                                                             (* Human readable message)
				      )))

(ACCESSFNS PUPADDRESS ((PUPNET# (LRSH DATUM 8))
			 (PUPHOST# (LOGAND DATUM 255)))
			(CREATE (IPLUS (LLSH PUPNET# 8)
					   PUPHOST#)))
]
(DECLARE: EVAL@COMPILE 
(PUTPROPS \LOCALPUPADDRESS MACRO (NIL \LOCALPUPNETHOST))
(PUTPROPS \LOCALPUPHOSTNUMBER MACRO (NIL (fetch PUPHOST# of \LOCALPUPNETHOST)))
(PUTPROPS \LOCALPUPNETNUMBER MACRO (NIL (fetch PUPNET# of \LOCALPUPNETHOST)))
)
(DECLARE: EVAL@COMPILE 

(RPAQQ \PUPOVLEN 22)

(RPAQQ \MAX.PUPDATALENGTH 532)

(CONSTANTS (\PUPOVLEN 22)
	   (\MAX.PUPDATALENGTH 532))
)

(RPAQQ PUPERRORCODES ((\PUPE.CHECKSUM 1)
			(\PUPE.NOSOCKET 2)
			(\PUPE.SOCKETFULL 3)
			(\PUPE.GATEWAY.BADPUP 513)
			(\PUPE.NOROUTE 514)
			(\PUPE.NOHOST 515)
			(\PUPE.LOOPED 516)
			(\PUPE.TOOLARGE 517)
			(\PUPE.WRONG.GATEWAY 518)
			(\PUPE.GATEWAYFULL 519)))
(DECLARE: EVAL@COMPILE 

(RPAQQ \PUPE.CHECKSUM 1)

(RPAQQ \PUPE.NOSOCKET 2)

(RPAQQ \PUPE.SOCKETFULL 3)

(RPAQQ \PUPE.GATEWAY.BADPUP 513)

(RPAQQ \PUPE.NOROUTE 514)

(RPAQQ \PUPE.NOHOST 515)

(RPAQQ \PUPE.LOOPED 516)

(RPAQQ \PUPE.TOOLARGE 517)

(RPAQQ \PUPE.WRONG.GATEWAY 518)

(RPAQQ \PUPE.GATEWAYFULL 519)

(CONSTANTS (\PUPE.CHECKSUM 1)
	   (\PUPE.NOSOCKET 2)
	   (\PUPE.SOCKETFULL 3)
	   (\PUPE.GATEWAY.BADPUP 513)
	   (\PUPE.NOROUTE 514)
	   (\PUPE.NOHOST 515)
	   (\PUPE.LOOPED 516)
	   (\PUPE.TOOLARGE 517)
	   (\PUPE.WRONG.GATEWAY 518)
	   (\PUPE.GATEWAYFULL 519))
)



(* XIP things)

[DECLARE: EVAL@COMPILE 

(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)))

(ACCESSFNS ERRORXIP ((ERRORXIPBASE (fetch XIPCONTENTS of DATUM)))
		      (BLOCKRECORD ERRORXIPBASE ((ERRORXIPCODE WORD)
				      (ERRORXIPARG WORD)
				      (ERRORXIPBODY WORD)    (* As many words of offending XIP as sender felt like 
							     including...)
				      )))

(TYPERECORD NSHOSTNUMBER (NSHOST0 NSHOST1 NSHOST2))

(DATATYPE NSADDRESS ((NSNET FIXP)
		       (NSHNM0 WORD)
		       (NSHNM1 WORD)
		       (NSHNM2 WORD)
		       (NSSOCKET WORD))
		      (ACCESSFNS (NSHOSTNUMBER (LOADNSHOSTNUMBER (LOCF (fetch NSHNM0
									    of DATUM)))
						 (STORENSHOSTNUMBER (LOCF (fetch NSHNM0
									     of DATUM))
								    NEWVALUE)))
		      (BLOCKRECORD NSADDRESS ((NSNETHI WORD)
				      (NSNETLO WORD))))

(DATATYPE NSNAME ((NSOBJECT POINTER)
		    (NSDOMAIN POINTER)
		    (NSORGANIZATION POINTER))                (* Canonical three-part Clearinghouse name)
		   )
]
(/DECLAREDATATYPE (QUOTE NSADDRESS)
		  (QUOTE (FIXP WORD WORD WORD WORD))
		  [QUOTE ((NSADDRESS 0 FIXP)
			  (NSADDRESS 2 (BITS . 15))
			  (NSADDRESS 3 (BITS . 15))
			  (NSADDRESS 4 (BITS . 15))
			  (NSADDRESS 5 (BITS . 15]
		  (QUOTE 6))
(/DECLAREDATATYPE (QUOTE NSNAME)
		  (QUOTE (POINTER POINTER POINTER))
		  (QUOTE ((NSNAME 0 POINTER)
			  (NSNAME 2 POINTER)
			  (NSNAME 4 POINTER)))
		  (QUOTE 6))
(DECLARE: EVAL@COMPILE 

(RPAQQ \XIPOVLEN 30)

(RPAQQ \MAX.XIPDATALENGTH 546)

(CONSTANTS (\XIPOVLEN 30)
	   (\MAX.XIPDATALENGTH 546))
)

(RPAQQ XIPERRORCODES ((\XIPE.CHECKSUM 1)
			(\XIPE.NOSOCKET 2)
			(\XIPE.SOCKETFULL 3)
			(\XIPE.GATEWAY.CHECKSUM 513)
			(\XIPE.NOROUTE 514)
			(\XIPE.LOOPED 515)
			(\XIPE.TOOLARGE 516)))
(DECLARE: EVAL@COMPILE 

(RPAQQ \XIPE.CHECKSUM 1)

(RPAQQ \XIPE.NOSOCKET 2)

(RPAQQ \XIPE.SOCKETFULL 3)

(RPAQQ \XIPE.GATEWAY.CHECKSUM 513)

(RPAQQ \XIPE.NOROUTE 514)

(RPAQQ \XIPE.LOOPED 515)

(RPAQQ \XIPE.TOOLARGE 516)

(CONSTANTS (\XIPE.CHECKSUM 1)
	   (\XIPE.NOSOCKET 2)
	   (\XIPE.SOCKETFULL 3)
	   (\XIPE.GATEWAY.CHECKSUM 513)
	   (\XIPE.NOROUTE 514)
	   (\XIPE.LOOPED 515)
	   (\XIPE.TOOLARGE 516))
)
(PUTPROPS ETHERRECORDS COPYRIGHT ("Xerox Corporation" 1983 1984 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL)))
STOP