//PupRtpInternal.decl -- Private definitions for RTP
// Copyright Xerox Corporation 1979

//last modified March 8, 1978  5:05 PM

get "PupRTP.decl"

//----------------------------------------------------------------------------
structure RTPCtx:  //RTP context structure
//----------------------------------------------------------------------------
[
blank word 3	//standard stuff
socket word	//socket for which context was created
zone word	//zone from which context allocated
ctxQ word	//context queue on which put
unclean word	//nonzero if context is not in a clean state
]
manifest lenRTPCtxExtra = size RTPCtx/16 - 3

manifest
[
//RTP finite state machine socket states
CLOS = stateClosed
RFCO = stateRFCOut
LIST = stateListening
OPEN = stateOpen
ENDI = stateEndIn
ENDO = stateEndOut
DALY = stateDally
ABOR = stateAbort

//RTP Finite state machine events
OPNC = 0	//open and initiate connection
OPNL = 1	//open and listen
OPNN = 2	//open immediately (no rendezvous)
CLSN = 3	//close normally
CLST = 4	//close abnormally (e.g. after timeout)
RRFC = 5	//received RFC
RABT = 6	//received Abort
REND = 7	//received End
RENR = 8	//received EndReply
TIMO = 9	//fsm timeout

//RTP Finite state machine actions
LERR = #0B8	//local error (our bug, calls SysErr)
FERR = #1B8	//foreign error (his bug, ignored)
NOOP = #2B8	//no action
SABT = #3B8	//send Abort
OPNX = #4B8	//complete locally-initiated open
SRF1 = #5B8	//send initiating RFC
SRF2 = #6B8	//send answering RFC
SEND = #7B8	//send End
SENR = #10B8	//send EndReply
]