Trailing-Edge
-
PDP-10 Archives
-
bb-bt99g-bb
-
router.c11
There is 1 other file named router.c11 in the archive. Click here to see a list.
INS 1/1 ;11C1
;DSKO:ROUTER.MAC[10,7,DECNET] Edit by -TL- [10,44] on 26-Feb-85 at 08:39:47
;MCO 11872 - Fixes for Phase IIIE/IV adjacent nodes.
REP 25/34 ;11C2
SKIPLE T1 ;CHECK LENGTH OF STORED ROUTING MESSAGE
CAMLE T1,RTRMXN ;OF REASONABLE LENGTH?
WIT
SKIPG T1 ;CHECK LENGTH OF STORED ROUTING MESSAGE
INS 32/34 ;11C3
CAMLE T1,RTRMXN ;MORE NODES THAN WE CAN ACCEPT?
MOVE T1,RTRMXN ;YES, PROCESS ONLY WHAT WE CAN
REP 43/47 ;11C4
TMNE RCVRQ,(RC) ;IS VERIFICATION REQUIRED?
TXO T1,TIVER ;YES, TELL HIM ABOUT IT
WIT
SKIPE RTRVRQ ;DO WE REQUIRE VERIFICATION?
TXO T1,TIVER ;YES, TELL HIM ABOUT IT
DEL 19/58 ;11C5
LOAD T1,MBSRC,(MB) ;GET THE SOURCE NODE
CAIL T1,1 ;CHECK NODE ADDRESS
CAMLE T1,RTRMXN ; FOR REASONABLENESS
JRST [MOVX T1,RS.ANO ;REASON: ADJACENT NODE ADDRESS OUT OF RANGE
CALLRET RTEINO] ;REPORT THE INITIALIZATION FAILURE EVENT
STOR T1,RCNAD,(RC) ;STORE IT
REP 29/58 ;11C6
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR EVENT
;Check the first byte of the init message (TLINFO)
CALL DNG1BY ;GET THE INITINFO FIELD
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR
TXNE T1,TIRSV ;IS THE RESERVED FIELD ZERO?
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR EVENT
MOVX T2,RCVRQ ;GET THE VERFIFY REQUIRED BIT
ANDCAM T2,RC.VRQ(RC) ;ASSUME THAT VERIFICATION ISN'T REQUIRED
TXNE T1,TIVER ;IS IT REALLY REQUIRED?
IORM T2,RC.VRQ(RC) ;YES, SET IT
LOAD T2,TINTY,+T1 ;GET NODE TYPE FROM BYTE
SETZ T1, ;USE T1 TO HOLD NODE TYPE FOR CIRCUIT BLOCK
CAIN T2,RNT.RT ;IS IT A ROUTING NODE?
MOVX T1,RCT.3F ;YUP, MUST BE A PHASE III FULL NODE
CAIN T2,RNT.NR ;IS IT A NON-ROUTING NODE?
MOVX T1,RCT.3S ;YES, WELL ITS A PHASE III END NODE
SKIPN T1 ;DID WE GET ONE?
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR EVENT
STOR T1,RCNTY,(RC) ;STORE THE NODE TYPE IN CIRCUIT BLOCK
WIT
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR EVENT (MUST INCLUDE VERSION)
;Get the first byte of the init message (TLINFO)
SAVEAC <P1> ;NEED AN AC
CALL DNG1BY ;GET THE INITINFO FIELD
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR
HRLZ P1,T1 ;SAVE TLINFO UNTIL WE KNOW VERSION
REP 5/59 ;11C7
; CAMGE T1,RTRBSZ ;IS THE BLOCKSIZE REASONABLE
; JRST [MOVX T1,RS.VSK ;EVENT REASON: VERSION SKEW
; CALLRET RTEINO] ;REPORT THE INITIALIZATION FAILURE EVENT
STOR T1,RCBSZ,(RC) ; AND STORE IT FOR WHATEVER REASON
WIT
HRR P1,T1 ;SAVE UNTIL WE KNOW VERSION
REP 14/59 ;11C8
STOR T1,RCVER,(RC) ;STORE IN IN CIRCUIT BLOCK
WIT
CAMLE T1,RTRVER ;IS IT ONE WE KNOW?
JRST FREMSG ;NO, PITCH MESSAGE
STOR T1,RCVER,(RC) ;STORE IN IN CIRCUIT BLOCK
;Now that we know that this is a reasonable message, do the validity checks
LOAD T1,MBSRC,(MB) ;GET THE SOURCE NODE
CAIL T1,1 ;CHECK NODE ADDRESS
CAMLE T1,RTRMXN ; FOR REASONABLENESS
JRST [MOVX T1,RS.ANO ;REASON: ADJACENT NODE ADDRESS OUT OF RANGE
CALLRET RTEINO] ;REPORT THE INITIALIZATION FAILURE EVENT
STOR T1,RCNAD,(RC) ;STORE IT
;Check the first byte of the init message (TLINFO)
HLRZ T1,P1 ;GET THE FIRST BYTE FROM WHERE WE STASHED IT
TXNE T1,TIRSV ;IS THE RESERVED FIELD ZERO?
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR EVENT
MOVX T2,RCVRQ ;GET THE VERFIFY REQUIRED BIT
ANDCAM T2,RC.VRQ(RC) ;ASSUME THAT VERIFICATION ISN'T REQUIRED
TXNE T1,TIVER ;IS IT REALLY REQUIRED?
IORM T2,RC.VRQ(RC) ;YES, SET IT
LOAD T2,TINTY,+T1 ;GET NODE TYPE FROM BYTE
SETZ T1, ;USE T1 TO HOLD NODE TYPE FOR CIRCUIT BLOCK
CAIN T2,RNT.RT ;IS IT A ROUTING NODE?
MOVX T1,RCT.3F ;YUP, MUST BE A PHASE III FULL NODE
CAIN T2,RNT.NR ;IS IT A NON-ROUTING NODE?
MOVX T1,RCT.3S ;YES, WELL ITS A PHASE III END NODE
SKIPN T1 ;DID WE GET ONE?
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR EVENT
STOR T1,RCNTY,(RC) ;STORE THE NODE TYPE IN CIRCUIT BLOCK
;Check the blocksize field
HRRZ T1,P1 ;RETRIEVE IT
; CAMGE T1,RTRBSZ ;IS THE BLOCKSIZE REASONABLE
; JRST [MOVX T1,RS.VSK ;EVENT REASON: VERSION SKEW
; CALLRET RTEINO] ;REPORT THE INITIALIZATION FAILURE EVENT
STOR T1,RCBSZ,(RC) ; AND STORE IT FOR WHATEVER REASON
;Now, continue parsing the version field
REP 21/59 ;11C9
WIT
REP 37/59 ;11C10
SETZ T2, ;ZERO LENGTH USER DATA SPACE FOR PSWD
WIT
LDB T2,[POINT 8,RTRXPW,7];GET COUNT OF PASSWORD BYTES
AOJ T2, ; + COUNT BYTE AS LENGTH OF DATA SPACE
REP 1/60 ;11C11
;Put a zero length password at the end of the verification msg
SETZ T1, ;MAKE A ZERO COUNT FIELD
CALL DNP1BY ;TELL MSG ABOUT IT
WIT
;Put a password at the end of the verification msg
MOVE T3,[POINT 8,RTRXPW];POINT TO PASSWORD STRING
ILDB T2,T3 ;GET COUNT OF BYTES IN PASSWORD
SKIPA T1,T2 ;COPY COUNT AS DATA BYTE
RTCIN2: ILDB T1,T3 ;GET NEXT DATA BYTE
CALL DNP1BY ;TELL MSG ABOUT IT
SOJGE T2,RTCIN2 ;CONTINUE TILL DONE
REP 32/62 ;11C12
SKIPLE T1 ;RANGE CHECK THE LENGTH
CAMLE T1,RTRMXN ; OF THE MESSAGE
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR EVENT
CAME T1,RTRMXN ;IT'S A ROUTING UPDATE LOSS IF MESSAGE ISN'T
; EXACTLY THE LENGTH THAT WE ARE EXPECTING
CALL RTCRTF ; SO REPORT THE LOSS AND COME BACK
WIT
SKIPG T1 ;RANGE CHECK THE LENGTH
CALLRET RTEMFE ;++MESSAGE FORMAT ERROR EVENT
INS 41/62 ;11C13
CAMGE T4,RTRMXN ;IT'S A ROUTING UPDATE LOSS IF MESSAGE IS
; SMALLER THAN WHAT WE EXPECT
CALL RTCRTF ; SO REPORT THE LOSS AND COME BACK
REP 28/63 ;11C14
MOVE T3,T1 ;SET UP THE NODE NUMBER
WIT
MOVE T3,T4 ;SET UP THE HIGHEST ADR IN MSG
REP 30/70 ;11C15
SOJGE T2,[SETZ T1, ;WRITE THE NULL BYTES
CALL DNP1BY ;PUT IN MESSAGE SEGMENT
JRST .] ;KEEP IT GOING TILL DONE
WIT
MOVE T3,[POINT 8,RTRXPW,7] ;SKIP PHASE III COUNT
SKIPA T1,T2 ;COPY OUR COUNT AS FIRST DATA BYTE
RTRP2L: ILDB T1,T3 ;GET THE NEXT DATA BYTE
CALL DNP1BY ;PUT IN MESSAGE SEGMENT
SOJGE T2,RTRP2L ;LOOP FOR COUNT AND ALL DATA BYTES
REP 31/88 ;11C16
CALLRET PUTNBY ;COPY HIGHEST ADDRESS
WIT
MOVE T1,RTREVW ;GET THE EVENT WORD (HIGHEST ADDRESS IN MSG)
CALLRET PUTNBT ;STORE IN MESSAGE
INS 5/98 ;11C17
;*****RELATED DATA, DON'T INSERT
RTRXPM==^D64 ;MAXIMUM NUMBER OF BYTES IN A VERIFICATION PSWD
RTRXPW: BYTE(8) ^D<8>,"D","E","C","N","E","T","2","0" ;DEFAULT
BLOCK <<RTRXPM+1+3>/4>-<.-RTRXPW>;ALLOCATE FOR MAX
;*****END RELATED DATA
SUM 173279