;;; CHAOS NET PACKET DEFINITION

;NOTE, IF YOU MAKE CHANGES TO OPCODES OR CONNECTION STATE SYMBOLS,
;ALSO CHANGE AI:MAINT;CHS DEFS.
;THIS FILE IS FOR PDP-10'S - CHS DEFS IS FOR PDP-11'S.


;PACKET HEADER
;NOTE THESE ARE FULL WORD BYTE POINTERS, INCLUDING A WORD OFFSET

$CPKOP==341000,,0	;OPCODE
 %CO==,,-1
 %CORFC==1		;REQUEST FOR CONNECTION
 %COOPN==2		;OPEN
 %COCLS==3		;CLOSE
 %COFWD==4		;FORWARD
 %COANS==5		;ANSWER
 %COSNS==6		;SENSE STATUS
 %COSTS==7		;REPORT STATUS
 %CORUT==10		;ROUTING INFO (NOT YET USED)
 %COLOS==11		;REPORT LOSSAGE
 %COLSN==12		;LISTEN FOR RFC
 %COMNT==13		;MAINTENANCE USE, IGNORED BY NORMAL NCPS
 %COEOF==14		;END OF FILE
 %COUNC==15		;UNCONTROLLED USER PACKET
 %COBRD==16		;Software broadcast packet
 %COMAX==17		;HIGHEST NON-DATA OPCODE +1
 %CODAT==200		;NORMAL DATA OPCODE (NOTE SIGN BIT OF WORD IS SET)
 %CODWD==300		;16-BIT DATA
$CPKMV==241000,,0	;"MUPPET" VERSION (MUST BE ZERO, NO MUPPETS EXIST!)
$CPKFC==200400,,0	;FORWARDING COUNT
$CPKNB==041400,,0	;NUMBER OF BYTES
$CPKDA==242000,,1	;DESTINATION ADDRESS
 $CPKDN==341000,,1	;DESTINATION SUBNET
 $CPKDH==241000,,1	;DESTINATION HOST
$CPKDI==042000,,1	;DESTINATION INDEX
 %CPKD==1		;DESTINATION ADDRESS WORD
$CPKSA==242000,,2	;SOURCE ADDRESS
 $CPKSN==341000,,2	;SOURCE SUBNET
 $CPKSH==241000,,2	;SOURCE HOST
$CPKSI==042000,,2	;SOURCE INDEX
 %CPKS==2		;SOURCE ADDRESS WORD
$CPKPN==242000,,3	;PACKET NUMBER
$CPKAN==042000,,3	;ACKNOWLEDGE NUMBER
 %CPKDT==4		;FIRST WORD OF DATA

;PACKET SIZE

;THESE NUMBERS ARE FOR 1K PACKET BUFFERS
;%CPMXW==30.	;MAXIMUM NUMBER OF PDP10 WORDS IN WHOLE PACKET
;%CPMXC==104.	;MAXIMUM NUMBER OF CHARACTERS OF DATA

;THESE NUMBERS ARE FOR 4K PACKET BUFFERS
%CPMXW==126.	;MAXIMUM NUMBER OF PDP10 WORDS IN WHOLE PACKET
%CPMXC==488.	;MAXIMUM NUMBER OF CHARACTERS OF DATA

;CONNECTION STATES

%CS==,,-1
%CSCLS==0	;CLOSED
%CSLSN==1	;LISTENING
%CSRFC==2	;RFC RECEIVED
%CSRFS==3	;RFC SENT
%CSOPN==4	;OPEN
%CSLOS==5	;BROKEN BY RECEIPT OF "LOS"
%CSINC==6	;BROKEN BY INCOMPLETE TRANSMISSION (NO RESPONSE TO SNS)
%CSFRN==7	;OPEN IN FOREIGN PROTOCOL MODE
%CSBRS==10	;BRD sent state
