(FILECREATED "19-Oct-85 16:55:19" {ERIS}<LISPCORE>SOURCES>DOVEETHER.;25 23863  

      changes to:  (FNS \DoveEther.TurnOn)

      previous date: "18-Oct-85 16:46:15" {ERIS}<LISPCORE>SOURCES>DOVEETHER.;24)


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

(PRETTYCOMPRINT DOVEETHERCOMS)

(RPAQQ DOVEETHERCOMS ((FNS \DoveEther.ByteSwapIOCB \DoveEther.DeQueue \DoveEther.EnQueue 
			     \DoveEther.GetPacketStatus \DoveEther.Init \DoveEther.Initiate 
			     \DoveEther.MakeSureOff \DoveEther.QueueInput \DoveEther.QueueOutput 
			     \DoveEther.TurnOn)
			(INITVARS (\DoveEther.FCBPointer))
			(GLOBALVARS \DoveEther.FCBPointer)
			(DECLARE: EVAL@COMPILE DONTCOPY (FILES (FROM VALUEOF LISPUSERSDIRECTORIES)
							       MESATYPES)
				  (FILES (SOURCE)
					 DOVEDECLS)
				  (COMS * DOVEETHERDECLS))
			(DECLARE: DONTEVAL@LOAD DOCOPY (P (\DoveEther.Init)))))
(DEFINEQ

(\DoveEther.ByteSwapIOCB
  (LAMBDA (IOCB)                                             (* ejs: "11-Sep-85 22:46")

          (* * There are various IOCB fields which must be fed to Opie in byte-swapped form. This function swaps them)


    (replace (Dove.EtherIOCB i586Status) of IOCB with (\DoveIO.ByteSwap (fetch (Dove.EtherIOCB 
										       i586Status)
									   of IOCB)))
    (SELECTC (fetch (Dove.EtherIOCB IOCBType) of IOCB)
	     ((LIST DoveEther.inputIOCBType DoveEther.outputIOCBType)
	       (replace (Dove.EtherIOIOCB length) of IOCB with (\DoveIO.ByteSwap (fetch (
Dove.EtherIOIOCB length) of IOCB)))
	       (replace (Dove.EtherIOIOCB count) of IOCB with (\DoveIO.ByteSwap (fetch (
Dove.EtherIOIOCB count) of IOCB))))
	     (DoveEther.commandIOCBType (SELECTC (fetch (Dove.EtherIOCB Action) of IOCB)
						 (DoveEther.actionTimeDomainRfl
						   (\PUTBASE (fetch (Dove.EtherCommandIOCB select)
								of IOCB)
							     0
							     (\DoveIO.ByteSwap
							       (\GETBASE (fetch (Dove.EtherCommandIOCB
										  select)
									    of IOCB)
									 0))))
						 (DoveEther.actionMulticastAddr
						   (\PUTBASE (fetch (Dove.EtherCommandIOCB select)
								of IOCB)
							     0
							     (\DoveIO.ByteSwap
							       (\GETBASE (fetch (Dove.EtherCommandIOCB
										  select)
									    of IOCB)
									 0))))
						 (PROGN NIL)))
	     ((LIST DoveEther.resetIOCBType DoveEther.startRUIOCBType)
	       NIL)
	     (ERROR "Unknown ethernet IOCB type for ByteSwapIOCB" (fetch (Dove.EtherIOCB IOCBType)
								     of IOCB)))))

(\DoveEther.DeQueue
  [LAMBDA (QueuePtr IOCB)                                    (* edited: "31-Dec-00 16:00")
    (LET ((Chase (fetch (Dove.QueueBlock LispQueueHead) of QueuePtr)))
         (COND
	   [(EQ Chase IOCB)                                (* Optimal: the wanted IOCB is at the head of the 
							     queue)
	     (MESASETQ (fetch (Dove.QueueBlock QueueHead) of QueuePtr)
		       (fetch (Dove.EtherIOCB next) of IOCB)
		       Dove.OpieAddress)
	     (COND
	       ((EQ (fetch (Dove.QueueBlock LispQueueTail) of QueuePtr)
		      IOCB)                                  (* It's also at the tail; the queue is now empty)
		 (replace (Dove.QueueBlock LispQueueTail) of QueuePtr with NIL]
	   (T                                                (* The IOCB is in the middle of the queue)
	      (while Chase do (COND
				    ((EQ (fetch (Dove.EtherIOCB nextIOCB) of Chase)
					   IOCB)             (* Found it)
				      (MESASETQ (fetch (Dove.EtherIOCB next) of Chase)
						(fetch (Dove.EtherIOCB next) of IOCB)
						Dove.OpieAddress)
				      (COND
					((EQ (fetch (Dove.QueueBlock LispQueueTail) of QueuePtr)
					       IOCB)         (* The wanted IOCB was at the tail of the queue and 
							     not at the head of the queue)
					  (replace (Dove.QueueBlock LispQueueTail) of QueuePtr
					     with Chase)))
				      (RETURN))
				    (T (SETQ Chase (fetch (Dove.EtherIOCB nextIOCB) of Chase])

(\DoveEther.EnQueue
  [LAMBDA (QueuePtr IOCB)                                    (* edited: "31-Dec-00 16:00")

          (* * Enqueues IOCB on IOP Queueblock at QueuePtr)


    (COND
      ((NULL (fetch (Dove.QueueBlock LispQueueHead) of QueuePtr))
	(replace (Dove.QueueBlock LispQueueHead) of QueuePtr with IOCB))
      (T (replace (Dove.EtherIOCB nextIOCB) of (fetch (Dove.QueueBlock LispQueueTail)
						      of QueuePtr)
	    with IOCB)))
    (replace (Dove.EtherIOCB nextIOCB) of IOCB with NIL)
    (\DoveIO.LockMem \DoveIO.OVERWRITEIFNIL (\DoveIO.IORegionOffset (fetch (Dove.QueueBlock 
											QueueNext)
								       of QueuePtr))
		     (\DoveIO.ByteSwap (\LOLOC IOCB))
		     (fetch (Dove.EtherFCB etherLockMask) of \DoveEther.FCBPointer))
    (replace (Dove.QueueBlock LispQueueTail) of QueuePtr with IOCB])

(\DoveEther.GetPacketStatus
  (LAMBDA (IOCB)                                             (* ejs: "12-Sep-85 20:08")
    (LET ((IOCBType (fetch (Dove.EtherIOCB IOCBType) of IOCB)))
         (COND
	   ((NOT (fetch (Dove.EtherIOCB done) of IOCB))
	     \ES.PENDING)
	   (T (COND
		((NOT (fetch (Dove.EtherIOCB isDequeued) of IOCB))
                                                             (* Dequeue the packet and byte swap it for us)
		  (UNINTERRUPTABLY
                      (\DoveEther.DeQueue (COND
					    ((EQ IOCBType DoveEther.inputIOCBType)
					      (fetch (Dove.EtherFCB mesaInQueue) of 
									    \DoveEther.FCBPointer))
					    (T               (* Output and command IOCBs go on the mesaOutQueue, I 
							     think)
					       (fetch (Dove.EtherFCB mesaOutQueue) of 
									    \DoveEther.FCBPointer)))
					  IOCB)
		      (\DoveEther.ByteSwapIOCB IOCB)
		      (replace (Dove.EtherIOCB isDequeued) of IOCB with T))))
	      (SELECTC IOCBType
		       (DoveEther.inputIOCBType (COND
						  ((fetch (Dove.EtherIOCB okay) of IOCB)
						    (bind (PTR ←(fetch (Dove.EtherIOIOCB 
										    bufferAddress)
								   of IOCB))
						       for I from (FOLDHI (fetch (Dove.EtherIOIOCB
										   length)
									     of IOCB)
									  BYTESPERWORD)
						       to 0 by (IMINUS WORDSPERPAGE)
						       do (\PUTBASE PTR I (\GETBASE PTR I)))
						    \ES.GOOD.PACKET)
						  ((fetch (Dove.Etheri586Status ovrnErr)
						      of (LOCF (fetch (Dove.EtherIOCB i586Status)
								  of IOCB)))
						    \ES.OVERRUN)
						  ((fetch (Dove.Etheri586Status crcErr)
						      of (LOCF (fetch (Dove.EtherIOCB i586Status)
								  of IOCB)))
						    \ES.BAD.CRC)
						  ((fetch (Dove.Etheri586Status alnErr)
						      of (LOCF (fetch (Dove.EtherIOCB i586Status)
								  of IOCB)))
						    \ES.BAD.ALIGNMENT)
						  ((fetch (Dove.EtherIOCB frameTooLong) of IOCB)
						    \ES.PACKET.TOO.LONG)
						  (T \ES.OTHER.ERROR)))
		       (DoveEther.outputIOCBType (COND
						   ((fetch (Dove.EtherIOCB okay) of IOCB)
						     \ES.GOOD.PACKET)
						   ((fetch (Dove.EtherIOCB frameTooLong)
						       of IOCB)
						     \ES.PACKET.TOO.LONG)
						   ((fetch (Dove.Etheri586Status underrun)
						       of (LOCF (fetch (Dove.EtherIOCB i586Status)
								   of IOCB)))
						     \ES.UNDERRUN)
						   ((fetch (Dove.Etheri586Status tooManyCollisions)
						       of (LOCF (fetch (Dove.EtherIOCB i586Status)
								   of IOCB)))
						     \ES.TOO.MANY.COLLISIONS)
						   (T \ES.OTHER.ERROR)))
		       (COND
			 ((fetch (Dove.EtherIOCB okay) of IOCB)
			   \ES.GOOD.PACKET)
			 (T \ES.OTHER.ERROR))))))))

(\DoveEther.Init
  (LAMBDA NIL                                                (* ejs: "16-Sep-85 12:57")
    (MAPC (QUOTE (\DoveEther.FCBPointer))
	  (FUNCTION \LOCKVAR))))

(\DoveEther.Initiate
  (LAMBDA (IOCB)                                             (* ejs: "12-Sep-85 20:08")

          (* * Queues a command-like IOCB on the ethernet output queue)



          (* * Fill in the IOCB)


    (PROGN (\CLEARWORDS (fetch (Dove.EtherIOCB ClientCondition) of IOCB)
			\DoveEther.ClientConditionSize)
	   (replace (Dove.EtherIOCB nextIOCB) of IOCB with NIL)
	   (replace (Dove.EtherIOCB Status) of IOCB with 0))

          (* * Byte Swap for Opie)


    (\DoveEther.ByteSwapIOCB IOCB)

          (* * Put it on queue for output)


    (\DoveEther.EnQueue (fetch (Dove.EtherFCB mesaOutQueue) of \DoveEther.FCBPointer)
			IOCB)

          (* * Tell the IOP there's something there)


    (\DoveIO.NotifyIOP (fetch (Dove.EtherFCB etherOutWorkMask) of \DoveEther.FCBPointer))))

(\DoveEther.MakeSureOff
  (LAMBDA NIL                                                (* ejs: "12-Sep-85 20:08")

          (* * This fn makes sure the ethernet is OFF)


    (replace (Dove.EtherFCB mesaClientStateRequest) of \DoveEther.FCBPointer with 
									    \DoveEther.RequestOFF)
    (\DoveIO.NotifyIOP (fetch (Dove.EtherFCB etherInWorkMask) of \DoveEther.FCBPointer))
    (\DoveIO.NotifyIOP (fetch (Dove.EtherFCB etherOutWorkMask) of \DoveEther.FCBPointer))
    (until (EQ (fetch (Dove.EtherFCB mesaOutClientState) of \DoveEther.FCBPointer)
	       \DoveEther.RequestOFF)
       do (BLOCK))))

(\DoveEther.QueueInput
  (LAMBDA (IOCB BUF LEN)                                     (* ejs: "12-Sep-85 20:08")

          (* * Queues a packet NIL associated IOCB on the input queue)



          (* * Fill in the IOCB)


    (PROGN (\CLEARWORDS (fetch (Dove.EtherIOCB ClientCondition) of IOCB)
			\DoveEther.ClientConditionSize)
	   (replace (Dove.EtherIOIOCB bufferAddress) of IOCB with BUF)
	   (replace (Dove.EtherIOIOCB length) of IOCB with (UNFOLD LEN BYTESPERWORD))
	   (replace (Dove.EtherIOCB nextIOCB) of IOCB with NIL)
	   (replace (Dove.EtherIOCB Status) of IOCB with 0)
	   (replace (Dove.EtherIOCB IOCBType) of IOCB with DoveEther.inputIOCBType))

          (* * Byte swap for Opie)


    (\DoveEther.ByteSwapIOCB IOCB)

          (* * Put it on queue for output)


    (\DoveEther.EnQueue (fetch (Dove.EtherFCB mesaInQueue) of \DoveEther.FCBPointer)
			IOCB)

          (* * Tell the IOP there's something there)


    (\DoveIO.NotifyIOP (fetch (Dove.EtherFCB etherInWorkMask) of \DoveEther.FCBPointer))))

(\DoveEther.QueueOutput
  (LAMBDA (IOCB BUF LEN)                                     (* ejs: "12-Sep-85 20:08")

          (* * Queues a packet NIL associated IOCB on the output queue)



          (* * Must mark it referenced)


    (\GETBASE BUF 0)
    (COND
      ((IGREATERP LEN WORDSPERPAGE)
	(\GETBASE BUF WORDSPERPAGE)))

          (* * Fill in the IOCB)


    (PROGN (\CLEARWORDS (fetch (Dove.EtherIOCB ClientCondition) of IOCB)
			\DoveEther.ClientConditionSize)
	   (replace (Dove.EtherIOIOCB length) of IOCB with (UNFOLD LEN BYTESPERWORD))
	   (replace (Dove.EtherIOIOCB bufferAddress) of IOCB with BUF)
	   (replace (Dove.EtherIOCB nextIOCB) of IOCB with NIL)
	   (replace (Dove.EtherIOCB IOCBType) of IOCB with DoveEther.outputIOCBType)
	   (replace (Dove.EtherIOCB Status) of IOCB with 0))

          (* * Byte Swap for Opie)


    (\DoveEther.ByteSwapIOCB IOCB)

          (* * Put it on queue for output)


    (\DoveEther.EnQueue (fetch (Dove.EtherFCB mesaOutQueue) of \DoveEther.FCBPointer)
			IOCB)

          (* * Tell the IOP there's something there)


    (\DoveIO.NotifyIOP (fetch (Dove.EtherFCB etherOutWorkMask) of \DoveEther.FCBPointer))))

(\DoveEther.TurnOn
  (LAMBDA (NSHostNumber)                                     (* ejs: "19-Oct-85 16:53")

          (* * Turns on Daybreak ether driver)


    (SETQ \DoveEther.FCBPointer (\DoveIO.GetHandlerIORegionPtr DoveIO.ethernetHandler))
    (\DoveEther.MakeSureOff)
    (\CLEARWORDS (fetch (Dove.EtherFCB mesaInQueue) of \DoveEther.FCBPointer)
		   (MESASIZE Dove.QueueBlock))
    (\CLEARWORDS (fetch (Dove.EtherFCB mesaOutQueue) of \DoveEther.FCBPointer)
		   (MESASIZE Dove.QueueBlock))
    (replace (Dove.EtherFCB mesaClientStateRequest) of \DoveEther.FCBPointer with 
									     \DoveEther.RequestON)

          (* * The following code is "new")



          (* * Entirely too horrible kludge! We need a segment 0 storage allocator in this system!)


    (LET ((IOCB (\ADDBASE \IOPAGE 64)))
         (replace (Dove.EtherIOCB IOCBType) of IOCB with DoveEther.resetIOCBType)
         (COND
	   ((\DoveEther.DoOutput IOCB)
	     (replace (Dove.EtherIOCB IOCBType) of IOCB with DoveEther.commandIOCBType)
	     (replace (Dove.EtherIOCB Action) of IOCB with DoveEther.actionConfigure)
	     (LET ((Conf (fetch (Dove.EtherCommandIOCB select) of IOCB)))
	          (\CLEARBYTES (fetch (Dove.EtherCommandIOCB select) of IOCB)
				 0
				 (UNFOLD (IDIFFERENCE (MESASIZE Dove.EtherCommandIOCB)
							(MESASIZE Dove.EtherIOCB))
					 BYTESPERWORD))
	          (with Dove.EtherConfigure Conf (SETQ ByteCount 9)
			  (SETQ FifoLimit 11)
			  (SETQ SaveBadFrames NIL)
			  (SETQ PreambleLength 2)
			  (SETQ AddrTypeLoc 1)
			  (SETQ AddrLength 6)
			  (SETQ InterframeSpacing 96)
			  (SETQ RetryNumber 15)
			  (SETQ SlotTimeHigh 2)
			  (SETQ PromiscuousMode (EQUAL NSHostNumber BROADCASTNSHOSTNUMBER))
			  (SETQ MinFrameLength 64))
	          (COND
		    ((\DoveEther.DoOutput IOCB)
		      (replace (Dove.EtherIOCB IOCBType) of IOCB with DoveEther.commandIOCBType)
		      (replace (Dove.EtherIOCB Action) of IOCB with 
								   DoveEther.actionIndividualAddr)
		      (COND
			((EQ NSHostNumber T)
			  (\BLT (fetch (Dove.EtherCommandIOCB select) of IOCB)
				  (LOCF (fetch (IFPAGE NSHost0) of \InterfacePage))
				  \#WDS.NSHOSTNUMBER))
			(T (\STORENSHOSTNUMBER (fetch (Dove.EtherCommandIOCB select)
						    of IOCB)
						 NSHostNumber)))
		      (COND
			((\DoveEther.DoOutput IOCB)
			  (replace (Dove.EtherIOCB IOCBType) of IOCB with 
									DoveEther.startRUIOCBType)
			  (\DoveEther.DoOutput IOCB)))))))))))
)

(RPAQ? \DoveEther.FCBPointer )
(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS \DoveEther.FCBPointer)
)
(DECLARE: EVAL@COMPILE DONTCOPY 
(FILESLOAD (FROM VALUEOF LISPUSERSDIRECTORIES)
	   MESATYPES)

(FILESLOAD (SOURCE)
	   DOVEDECLS)


(RPAQQ DOVEETHERDECLS ((RECORDS Dove.EtherSCB)
			 (RECORDS Dove.EtherAddr Dove.EtherConfigure Dove.EtherDumpStatus 
				  Dove.EtherFCB Dove.Etheri586Status Dove.EtherIOCB 
				  Dove.EtherCommandIOCB Dove.EtherIOIOCB Dove.EtherMulticastAddr 
				  Dove.EtherTransmit Dove.RxBufferDesc Dove.RxFrameDesc 
				  Dove.TimeDomainRFL)
			 (MACROS \DoveEther.DoOutput)
			 (CONSTANTS \DoveEther.MulticastAddr \DoveEther.QueuePtrSize 
				    \DoveEther.ClientConditionSize \DoveEther.IOIOCBLength 
				    \DoveEther.RequestON \DoveEther.RequestOFF)
			 (CONSTANTS * DoveEther.IOCBTypes)
			 (CONSTANTS * DoveEther.ActionCommands)))
[DECLARE: EVAL@COMPILE 

(MESARECORD Dove.EtherSCB ((stat BITS 4)
			     (NIL BITS 1)
			     (cus BITS 3)                    (* command unit status)
			     (NIL BITS 1)
			     (rus BITS 3)                    (* receive unit status)
			     (NIL BITS 4)
			     (ack BITS 4)                    (* acknowledge int)
			     (NIL BITS 1)
			     (cuc BITS 3)                    (* command unit command)
			     (reset FLAG)
			     (ruc BITS 3)                    (* receive unit command)
			     (NIL BITS 4)
			     (cblOffset WORD)
			     (rfaOffset WORD)
			     (crcErrs WORD)
			     (alnErrs WORD)
			     (rscErrs WORD)
			     (ovrnErrs WORD)))
]
[DECLARE: EVAL@COMPILE 

(BLOCKRECORD Dove.EtherAddr ((id 3 WORD)))

(MESARECORD Dove.EtherConfigure ((NIL BITS 4)
				   (ByteCount BITS 4)
				   (NIL BITS 4)
				   (FifoLimit BITS 4)
				   (SaveBadFrames FLAG)
				   (SyncReady FLAG)
				   (NIL BITS 6)
				   (ExternalLoopBack FLAG)
				   (InternalLoopBack FLAG)
				   (PreambleLength BITS 2)
				   (AddrTypeLoc BITS 1)
				   (AddrLength BITS 3)
				   (ExpBackoffMethod BITS 1)
				   (AccContRes BITS 3)
				   (NIL BITS 1)
				   (LinearPolarity BITS 3)
				   (InterframeSpacing BYTE)
				   (SlotTimeLow BYTE)
				   (RetryNumber BITS 4)
				   (NIL BITS 1)
				   (SlotTimeHigh BITS 3)
				   (Padding FLAG)
				   (BitStuffing FLAG)
				   (CRC16 FLAG)
				   (NoCRCInsertion FLAG)
				   (TxNoCRS FLAG)
				   (NRZEncoding FLAG)
				   (BroadcastDisable FLAG)
				   (PromiscuousMode FLAG)
				   (InternalCDT FLAG)
				   (CDTFilter BITS 3)
				   (InternalCRS FLAG)
				   (CRSFilter BITS 3)
				   (MinFrameLength BYTE)
				   (NIL BYTE)))

(BLOCKRECORD Dove.EtherDumpStatus ((Buffer WORD)))

(MESARECORD Dove.EtherFCB ((mesaOutQueue Dove.QueueBlock)
			     (mesaInQueue Dove.QueueBlock)
			     (mesaClientStateRequest WORD)
			     (scb Dove.EtherSCB)
			     (etherOutWorkMask WORD)
			     (etherInWorkMask WORD)
			     (etherLockMask WORD)
			     (mesaInClientState WORD)
			     (mesaOutClientState WORD)))

(BLOCKRECORD Dove.Etheri586Status ((completion FLAG)
				     (busy FLAG)
				     (okay FLAG))
				    (BLOCKRECORD Dove.Etheri586Status ((NIL BITS 3)
                                                             (* receiveframe variant)
						    (unused FLAG)
						    (crcErr FLAG)
						    (alnErr FLAG)
						    (rscErr FLAG)
						    (ovrnErr FLAG)
						    (frameTooShort FLAG)
						    (noEOFFlag FLAG)
						    (NIL BITS 6)))
				    (BLOCKRECORD Dove.Etheri586Status ((NIL BITS 3)
                                                             (* command variant. Mainly for transmit)
						    (aborted FLAG)
						    (NIL FLAG)
						    (noCRS FLAG)
						    (lossOfCTS FLAG)
						    (underrun FLAG)
						    (deferred FLAG)
						    (sqeTest FLAG)
						    (tooManyCollisions FLAG)
						    (NIL BITS 1)
						    (collisions BITS 4))))

(MESARECORD Dove.EtherIOCB ((next Dove.OpieAddress)        (* Next IOCB in IO queue)
			      (ClientCondition 3 WORD)       (* Gets notifed in Mesaland when IO is complete)
			      (i586Status WORD)              (* Status from the Dove ethernet coprocessor)
			      (Status BYTE)                  (* IO status?)
			      (IOCBType BITS 4)              (* What type of IO operation is this?)
			      (Action BITS 4)                (* Used only for Command variant)
			      )
			     (ACCESSFNS ((nextIOCB (fetch (Dove.OpieAddress LispPointer)
							of (fetch (Dove.EtherIOCB next)
								of DATUM))
						     (replace (Dove.OpieAddress LispPointer)
							of (fetch (Dove.EtherIOCB next)
								of DATUM)
							with NEWVALUE))))
			     (BLOCKRECORD Dove.EtherIOCB ((NIL 6 WORD)
					     (done FLAG)
					     (handled FLAG)
					     (okay FLAG)
					     (frameTooLong FLAG)
					     (interruptTimeout FLAG)
					     (NIL BITS 2)
					     (isDequeued FLAG))))

(MESARECORD Dove.EtherCommandIOCB ((iocbCommon Dove.EtherIOCB)
				     (select 7 WORD)))

(MESARECORD Dove.EtherIOIOCB ((iocbCommon Dove.EtherIOCB)
				(address Dove.OpieAddress)
				(length WORD)
				(count WORD))
			       (ACCESSFNS ((bufferAddress (fetch (Dove.OpieAddress LispPointer)
							       of (fetch (Dove.EtherIOIOCB 
											  address)
								       of DATUM))
							    (replace (Dove.OpieAddress LispPointer)
							       of (fetch (Dove.EtherIOIOCB 
											  address)
								       of DATUM)
							       with NEWVALUE)))))

(BLOCKRECORD Dove.EtherMulticastAddr ((ByteCount WORD)
					(MulticastID1 3 WORD)
					(MulticastID2 3 WORD)))

(BLOCKRECORD Dove.EtherTransmit ((BdPtr WORD)
				   (DestAddr 3 WORD)
				   (Type WORD)))

(BLOCKRECORD Dove.RxBufferDesc ((EndOfFrame FLAG)
				  (Filled FLAG)
				  (ActualCount BITS 14)
				  (Next WORD)
				  (BufAddrIOPReal WORD)
				  (EndOfList FLAG)
				  (Unused FLAG)
				  (Size BITS 14)))

(BLOCKRECORD Dove.RxFrameDesc ((Status WORD)
				 (EndOfList FLAG)
				 (Suspend FLAG)
				 (NIL BITS 14)
				 (Link WORD)
				 (BDPtr WORD)
				 (DestAddr 3 WORD)
				 (SourceAddr 3 WORD)
				 (Type WORD)))

(BLOCKRECORD Dove.TimeDomainRFL ((LinkOK FLAG)
				   (XcvrProblem FLAG)
				   (Open FLAG)
				   (Short FLAG)
				   (NIL FLAG)
				   (Time BITS 11)))
]
(DECLARE: EVAL@COMPILE 
(DEFMACRO \DoveEther.DoOutput (IOCB)
	  (BQUOTE (PROGN (\DoveEther.Initiate , IOCB)
			 (until (fetch (Dove.EtherIOCB done)
				       of , IOCB)
				do
				(BLOCK))
			 (\DoveEther.DeQueue (fetch (Dove.EtherFCB mesaOutQueue)
						    of \DoveEther.FCBPointer)
					     , IOCB)
			 (fetch (Dove.EtherIOCB okay)
				of , IOCB))))
)
(DECLARE: EVAL@COMPILE 

(RPAQQ \DoveEther.MulticastAddr 3)

(RPAQQ \DoveEther.QueuePtrSize 6)

(RPAQQ \DoveEther.ClientConditionSize 3)

(RPAQQ \DoveEther.IOIOCBLength 11)

(RPAQQ \DoveEther.RequestON 1)

(RPAQQ \DoveEther.RequestOFF 0)

(CONSTANTS \DoveEther.MulticastAddr \DoveEther.QueuePtrSize \DoveEther.ClientConditionSize 
	   \DoveEther.IOIOCBLength \DoveEther.RequestON \DoveEther.RequestOFF)
)

(RPAQQ DoveEther.IOCBTypes ((DoveEther.commandIOCBType 0)
			      (DoveEther.outputIOCBType 1)
			      (DoveEther.resetIOCBType 2)
			      (DoveEther.startRUIOCBType 3)
			      (DoveEther.inputIOCBType 15)))
(DECLARE: EVAL@COMPILE 

(RPAQQ DoveEther.commandIOCBType 0)

(RPAQQ DoveEther.outputIOCBType 1)

(RPAQQ DoveEther.resetIOCBType 2)

(RPAQQ DoveEther.startRUIOCBType 3)

(RPAQQ DoveEther.inputIOCBType 15)

(CONSTANTS (DoveEther.commandIOCBType 0)
	   (DoveEther.outputIOCBType 1)
	   (DoveEther.resetIOCBType 2)
	   (DoveEther.startRUIOCBType 3)
	   (DoveEther.inputIOCBType 15))
)

(RPAQQ DoveEther.ActionCommands ((DoveEther.actionNop 0)
				   (DoveEther.actionIndividualAddr 1)
				   (DoveEther.actionConfigure 2)
				   (DoveEther.actionMulticastAddr 3)
				   (DoveEther.actionTransmit 4)
				   (DoveEther.actionTimeDomainRfl 5)
				   (DoveEther.actionDumpStatus 6)
				   (DoveEther.actionDiagnose 7)))
(DECLARE: EVAL@COMPILE 

(RPAQQ DoveEther.actionNop 0)

(RPAQQ DoveEther.actionIndividualAddr 1)

(RPAQQ DoveEther.actionConfigure 2)

(RPAQQ DoveEther.actionMulticastAddr 3)

(RPAQQ DoveEther.actionTransmit 4)

(RPAQQ DoveEther.actionTimeDomainRfl 5)

(RPAQQ DoveEther.actionDumpStatus 6)

(RPAQQ DoveEther.actionDiagnose 7)

(CONSTANTS (DoveEther.actionNop 0)
	   (DoveEther.actionIndividualAddr 1)
	   (DoveEther.actionConfigure 2)
	   (DoveEther.actionMulticastAddr 3)
	   (DoveEther.actionTransmit 4)
	   (DoveEther.actionTimeDomainRfl 5)
	   (DoveEther.actionDumpStatus 6)
	   (DoveEther.actionDiagnose 7))
)
)
(DECLARE: DONTEVAL@LOAD DOCOPY 
(\DoveEther.Init)
)
(PUTPROPS DOVEETHER COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (891 15040 (\DoveEther.ByteSwapIOCB 901 . 2640) (\DoveEther.DeQueue 2642 . 4236) (
\DoveEther.EnQueue 4238 . 5167) (\DoveEther.GetPacketStatus 5169 . 8112) (\DoveEther.Init 8114 . 8306)
 (\DoveEther.Initiate 8308 . 9200) (\DoveEther.MakeSureOff 9202 . 9868) (\DoveEther.QueueInput 9870 . 
11017) (\DoveEther.QueueOutput 11019 . 12332) (\DoveEther.TurnOn 12334 . 15038)))))
STOP