cdc:nos2.source:nam5871:npregll
Table of Contents
NPREGLL
Table Of Contents
- [00015] PRGM NPREGLL
- [00124] PROC KPUT
- [00125] PROC MCLRIL
- [00126] PROC MGETS
- [00127] PROC MGROW
- [00128] PROC MRELS
- [00129] PROC MSETIL
- [00130] PROC NXBLINK
- [00131] PROC OMSG
- [00132] PROC OVLCALL
- [00133] PROC RELCONN
- [00134] PROC XTRACE
- [00135] FUNC XCDD C(10)
Source Code
- NPREGLL.txt
- *DECK NPREGLL
- USETEXT CET
- USETEXT KDIS
- USETEXT KHDRX
- USETEXT LLCB
- USETEXT NBT
- USETEXT NHEADER
- USETEXT NIPDEF
- USETEXT OVERLAY
- USETEXT PARAMP
- USETEXT PARAMS
- USETEXT PT
- USETEXT SUPMSG
- USETEXT TNT
- PRGM NPREGLL;
- # PROCESS SUPERVISORY MESSAGE REG/LL #
- STARTIMS;
- #
- *1DC NPREGLL
- *
- * 1. PROC NAME AUTHOR DATE
- * NPREGLL E. GEE 86/10/01
- *
- * 2. FUNCTIONAL DESCRIPTION
- * THIS ROUTINE IS RESPONSIBLE FOR PROCESSING THE SUPERVISORY
- * MESSAGE REG/LL.
- *
- * 3. METHOD USED
- * CALL OMSG TO ISSUE DAYFILE MSG TO RECORD RECEIPT OF REG/LL MSG.
- * IF SPECIAL CDCNET REG/LL/R SUPERVISORY MESSAGE,
- * CREATE REG/LL/N SUPERVISORY MESSAGE.
- * CALL NXBLINK TO QUEUE REG/LL/N SUPERVISORY MESSAGE.
- * CHECK IF LOGICAL LINK CONTROL BLOCK ALREADY EXISTS,
- * IF NO LOGICAL LINK CONTROL BLOCK EXISTS,
- * VERIFY TERMINAL NODE IS ACCEPTABLE.
- * SET BAD REG/LL FLAG IF TERMINAL NODE IS UNACCEPTABLE.
- * IF TERMINAL NODE IS ACCEPTABLE,
- * IF BUFFER LEVEL IS NONZERO,
- * IF TERMINAL NODE TABLE NEEDS TO BE EXPANDED,
- * CALL MSETIL TO SET NIP/PIP INTERLOCK BEFORE EXPANSION.
- * CALL MGROW TO EXPAND TERMINAL NODE TABLE.
- * CALL MCLRIL TO CLEAR NIP/PIP INTERLOCK AFTER EXPANSION.
- * CALL OVERLAY BLDLLCB TO BUILD LOGICAL LINK CONTROL BLOCK.
- * ELSE (LOGICAL LINK CONTROL BLOCK ALREADY EXISTS),
- * IF CS SUPERVISION BROKEN,
- * CALL OVERLAY HCSUPCB TO SEND SUP/CB SUP MSG TO CS.
- * IF BUFFER LEVEL IS ZERO,
- * IF THIS IS THE FIRST TIME, NIP WAS INFORMED ABOUT LLK DOWN,
- * CALL RELCONN TO BREAK ALL CONNECTIONS ON THIS LLK.
- * IF NO CONNECTIONS REMAIN ON THIS LOGICAL LINK,
- * CALL OVERLAY RELLLCB TO RELEASE LLCB.
- * ELSE (PRU CONNECTIONS REMAIN TO BE CLEANED UP),
- * SET RELEASE LLCB FLAG.
- * ELSE (BUFFER LEVEL IS NONZERO),
- * CLEAR RELEASE LLCB FLAG.
- * IF REGULATION LEVEL CHANGED,
- * CALL OVERLAY NPREGCN TO PROCESS REGULATION CHANGE.
- * IF NAM ST DISPLAY NEEDS TO BE UPDATED,
- * CALL KPUT TO UPDATE NAM ST DISPLAY.
- *
- * 4. ENTRY PARAMETERS
- * NBTIDX INDEX OF NBT ENTRY BEING PROCESSED
- * PARAMP1 DATA BLOCK HEADER ADDRESS
- *
- * 5. EXIT PARAMETERS
- * PARAMS5 TRUE IF REG/LL SUP MSG REJECTED BECAUSE A
- * BAD TERMINAL NODE WAS SPECIFIED IN THE
- * NETWORK HEADER.
- *
- * 6. COMDECKS CALLED
- * CET COUPLER EQUIPMENT TABLE
- * KDIS K-DISPLAY TABLE
- * KHDRX K-DISPLAY HEADER TABLE
- * LLCB LOGICAL LINK CONTROL BLOCK TEMPLATE
- * NBT NETWORK BUFFER TABLE
- * NHEADER NETWORK BLOCK HEADER TEMPLATE
- * NIPDEF CONSTANT DEFINITIONS
- * OVERLAY OVERLAY TABLE
- * PARAMP BUFFER FOR PASSING PARAMS TO/FROM PRI OVL
- * PARAMS BUFFER FOR PASSING PARAMS TO/FROM SEC OVL
- * PT GLOBAL VARIABLES AND POINTERS
- * SUPMSG SUPERVISORY MESSAGE TEMPLATE
- * TNT TERMINAL NODE TABLE
- *
- * 7. ROUTINES AND OVERLAYS CALLED
- * BLDLLCB OVL CREATE LOGICAL LINK CONTROL BLOCK
- * HCSUPCB OVL GENERATE SUPERVISORY MESSAGE SUP/CB
- * KPUT UPDATE NAM K-DISPLAY BUFFER
- * MCLRIL CLEAR NIP/PIP INTERLOCK
- * MGETS GET BUFFER
- * MGROW INCREASE SIZE OF BUFFER
- * MSETIL SET NIP/PIP INTERLOCK
- * NPREGCN OVL PROCESS CONNECTION REGULATION
- * NXBLINK LINK DOWNLINE MSG TO OUTBOUND CHAIN
- * OMSG ISSUE DAYFILE MESSAGE
- * OVLCALL LOAD AND EXECUTE OVERLAY
- * RELCONN RELEASE CONNECTIONS ON A LOGICAL LINK
- * RELLLCB OVL RELEASE LOGICAL LINK CONTROL BLOCK
- * XCDD CONVERT INTEGER TO DECIMAL DISPLAY
- * XTRACE TRACE CALLS
- *
- * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
- * *** EST XXX - NIP/REGLL DN=AAA,SN=BBB,RL=L. ***
- *
- * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE
- * OVLCALL. WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO
- * LOCATION RJMAIN TO THE CALLING PROGRAM.
- *
- * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
- * OVERLAY BUFFER SIZE MINUS 5 (560B WORDS).
- *
- * THIS OVERLAY IS CALLED BY NPNIPSM.
- *
- #
- STOPIMS;
- #
- **** EXTERNAL ENTRY POINTS
- #
- XREF
- BEGIN
- PROC KPUT ; # UPDATE K-DISPLAY BUFFER #
- PROC MCLRIL ; # CLEAR NIP/PIP INTERLOCK #
- PROC MGETS; # GET BUFFER #
- PROC MGROW ; # EXPAND TNT TABLE #
- PROC MRELS; # RELEASE BUFFER SPACE #
- PROC MSETIL ; # SET PIP/NIP INTERLOCK #
- PROC NXBLINK; # QUEUE DOWNLINE MSG FOR PIP #
- PROC OMSG; # ISSUE ERROR DAYFILE MESSAGE #
- PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
- PROC RELCONN ; # RELEASE NETWORK CONNECTION #
- PROC XTRACE; # RECORD PROCEDURE CALL #
- FUNC XCDD C(10) ; # CONVERT INTEGER TO DEC DISPLAY#
- LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
- END
- # LOCAL VARIABLES #
- ARRAY DFMSG1 P(5) ;
- BEGIN
- ITEM DFMSGH C(00,00,40) =
- ["EST XXX - NIP/REGLL DN= ,SN= ,RL= ."];
- ITEM DFEST U(00,24,18); # EST ORDINAL OF FRONT END #
- ITEM DFDN C(02,18,3); # DESTINATION NODE NUMBER #
- ITEM DFSN C(03,00,3); # SOURCE NODE NUMBER #
- ITEM DFRL C(03,42,1); # BUFFER REGULATION LEVEL #
- ITEM DFZERO U(04,00,60) = [0];
- END
- ITEM BUFADDR; # BUFFER FOR REG/LL/N SUP MSG #
- ITEM I; # LOOP CONTROL VARIABLE #
- ITEM IDXHN; # HOST NODE NUMBER #
- ITEM IDXTN; # TERMINAL NODE NUMBER #
- ITEM KN U;
- #**********************************************************************#
- BEGIN # BEGIN NPREGLL CODE #
- CONTROL IFEQ DEBUG,1 ; # RECORD PROCEDURE CALL #
- XTRACE("NPRLL") ;
- CONTROL FI;
- PARAMS5 = FALSE; # INITIALIZE FOR REG/LL NOT #
- # REJECTED #
- #
- ISSUE REGULATION LEVEL DAYFILE MESSAGE
- #
- P<NHEADER> = PARAMP1 + DBHSIZE; # LOCATION OF NETWORK HEADER #
- P<SMNIP> = P<NHEADER> + NBHSIZE; # LOCATION OF REG/LL SUP MSG #
- IDXTN = SN[0]; # TNT ENTRY INDEX #
- IDXHN = DN[0]; # HOST NODE NUMBER #
- I = XCDD(IDXHN); # DESTINATION NODE #
- DFDN[0] = C<7,3>I;
- I = XCDD(IDXTN); # SOURCE NODE #
- DFSN[0] = C<7,3>I;
- I = XCDD(REGB[0]); # REGULATION LEVEL #
- DFRL[0] = C<9,1>I;
- DFEST[0] = (NBTEST1[NBTIDX]+27)*64*64 + (NBTEST2[NBTIDX]+27)*64 +
- NBTEST3[NBTIDX]+27; # EST ORDINAL #
- OMSG(DFMSG1,0);
- #
- CHECK FOR SPECIAL CDCNET REG/LL SUPERVISORY MESSAGE
- #
- IF (IDXTN EQ 0) AND
- (IDXHN EQ 0)
- THEN # SPECIAL CDCNET REG/LL SUP MSG #
- BEGIN
- #
- SEND REG/LL/N SUP MSG BACK TO MDI WITH APPROPRIATE NODE NUMBER
- #
- IDXHN = NBTHN[NBTIDX]; # HOST NODE NUMBER #
- IDXTN = NBTTN[NBTIDX+1]; # TERMINAL NODE FOR CDCNET LLK #
- DN[0] = IDXHN; # HOST NODE FOR LOGICAL LINK #
- SN[0] = IDXTN; # TERMINAL NODE FOR LOGICAL LINK#
- MGETS(LREG + BLKHSIZE + NBHSIZE, BUFADDR,TRUE); # GET BUFFER #
- P<NHEADER> = BUFADDR + BLKHSIZE; # NETWORK ADDRESS WORD #
- DN[0] = IDXTN; # TERMINAL NODE FOR CDCNET LLK #
- SN[0] = IDXHN; # HOST NODE FOR LOGICAL LINK #
- BT[0] = NETCMD; # NETWORK CHARACTER TYPE #
- NHACT[0] = CT8ASCII; # CHAR TYPE IS 8 BIT ASCII #
- CC[0] = NREGLLN; # LENGTH OF REG/LL/N SUP MSG #
- P<SUPMSG> = BUFADDR + BLKHSIZE + NBHSIZE; # ADDR OF SM TEXT #
- SPMSG0[0] = REGLLW0[0]; # WORD ZERO OF SUP MSG #
- RB[0] = TRUE; # SET NORMAL RESPONSE BIT #
- NXBLINK(BUFADDR,NBTIDX+OSTFET);# QUEUE REG/LL/N SUP MSG #
- END
- #
- CHECK FOR ALREADY EXISTING LOGICAL LINK CONTROL BLOCK
- #
- P<LLCB> = 0; # INIT TO NO LLK EXISTS #
- PARAMS2 = 0; # INIT LINK ADDR FOR BLDLLCB #
- IF IDXTN LQ TNTBS[0] - TNTHSIZE
- THEN # SN IS WITHIN TNT TABLE SIZE #
- BEGIN
- P<LLCB> = TNTLLAD[IDXTN]; # TNT ENTRY FOR SPECIFIED SN #
- FOR I = I WHILE (P<LLCB> NQ 0 ) AND # MORE LLCBS TO CHECK #
- (LLCBHN[0] NQ IDXHN) # NOT THE CORRECT LLCB#
- DO
- BEGIN
- PARAMS2 = P<LLCB>; # SAVE FOR CALL TO BLDLLCB #
- P<LLCB> = LLCBFP[0]; # CHECK NEXT LLCB IN CHAIN #
- END
- END
- IF P<LLCB> EQ 0
- THEN # NO EXISTING LLCB FOUND #
- BEGIN
- #
- VERIFY TERMINAL NODE IS ACCEPTABLE, I.E. IT CAN NOT BE THE SAME
- AS HOST NODE. ALSO FOR CDCNET IT CANNOT BE THE SAME AS ANY
- OTHER HOST NODE NUMBER IN CET TABLE.
- #
- IF IDXTN EQ IDXHN
- THEN # BAD REG/LL SUP MSG #
- BEGIN
- PARAMS5 = TRUE; # SET FLAG FOR BAD NETWORK MSG #
- END
- ELSE # DN IS NOT THE SAME AS SN #
- BEGIN
- IF NBTET[NBTIDX] EQ "NQ"
- THEN # CDCNET FRONT END #
- BEGIN
- FOR I= CETHSIZE STEP 1 UNTIL CETBS[0] - 1
- DO # LOOP THROUGH CET TABLE #
- BEGIN
- IF CETHN[I] EQ IDXTN
- THEN # HN IN CET TABLE MATCHES SN #
- BEGIN
- PARAMS5 = TRUE; # ERROR IN CONFIGURATION #
- END
- END
- END
- END
- IF NOT PARAMS5
- THEN # ACCEPTABLE SN WAS SPECIFIED #
- BEGIN
- IF REGB[0] NQ BUFLCD
- THEN # NONZERO BUFFER LEVEL - LLK UP #
- BEGIN
- IF IDXTN GR TNTBS - TNTHSIZE
- THEN # NEED TO EXPAND TNT #
- BEGIN
- MSETIL(0) ; # REQ INTERLOCK,TNT MAY BE MOVED#
- MGROW(P<TNT>,IDXTN + TNTHSIZE,TRUE); # EXPAND TNT #
- PTTNT[0] = P<TNT> ; # RESET TNT PTR #
- MCLRIL ; # CLEAR THE NIP/PIP INTERLOCK #
- END
- #
- CREATE NEW LOGICAL LINK CONTROL BLOCK
- #
- OVLNAME = BLDLLCBP; # NAME OF OVERLAY TO LOAD #
- PARAMS1 = PARAMP1 + DBHSIZE; # NETWORK BLOCK HEADER ADDRESS#
- OVLCALL;
- END
- END
- END
- ELSE # LLCB ALREADY EXISTS #
- BEGIN
- #
- CHECK FOR CS SUPERVISION BROKEN. IF SO, NEED TO INFORM CS
- #
- IF (LLCBCS[0] ) AND # CS THINKS IT HAS SUPERVISION #
- (NOT REGC ) AND # CS NO LONGER HAS SUPERVISION #
- (PROCAN[CSORD] NQ 0) # CS IS RUNNING IN THIS HOST #
- THEN # TELL CS IT LOST SUPERVISION #
- BEGIN
- #
- SEND SUP/CB SUPERVISORY MESSAGE TO CS
- #
- OVLNAME = HCSUPCBP; # NAME OF OVERLAY TO LOAD #
- PARAMS1 = IDXHN; # HOST NODE OF THIS LLK #
- PARAMS2 = IDXTN; # TERMINAL NODE OF THIS LLK #
- OVLCALL ; # LOAD AND EXECUTE OVERLAY #
- END
- IF REGB[0] EQ BUFLCD
- THEN # ZERO BUFFER LEVEL - LLK DOWN #
- BEGIN
- #
- LOGICAL LINK IS DOWN. BREAK ALL CONNECTIONS IF THIS IS THE
- FIRST TIME NIP RECEIVED REG/LL FOR THIS LOGICAL LINK WITH
- BUFFER LEVEL = 0.
- #
- IF NOT LLCBWOF[0]
- THEN # 1ST NOTIFICATION OF LLK DOWN #
- BEGIN
- RCBRK = RCCB"LLF" ; # LL FAILED = 15 FOR CR/CB/U #
- RELCONN(P<LLCB>,LLFAIL); # BREAK ALL CONS ON THIS LLK #
- END
- IF LLCBNPC[0] EQ 0
- THEN # NO CONNECTIONS ON LLK #
- BEGIN
- #
- RELEASE LOGICAL LINK CONTROL BLOCK
- #
- PARAMS2 = P<LLCB>; # ADDR OF LLCB TO RELEASE #
- OVLNAME = RELLLCBP; # NAME OF OVERLAY TO LOAD #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- END
- ELSE # PRU CONNECTIONS TO RELEASE #
- BEGIN
- LLCBWOF[0] = TRUE; # SET FLAG FOR LLCB TO RELEASE #
- END
- END
- ELSE # NONZERO BUFFER LEVEL - LLK UP #
- BEGIN
- LLCBWOF[0] = FALSE; # CLEAR FLAG TO RELEASE LLK #
- IF LLCBNRL[0] NQ REGB
- THEN # REGULATION LEVEL CHANGED #
- BEGIN
- IF LLCBNRL[0] GR REGB
- THEN # LOWERING REGULATION LEVEL #
- BEGIN
- PARAMS3 = 1; # SET FLAG FOR PUTTING CN IN REG#
- END
- ELSE # RAISING REGULATION LEVEL #
- BEGIN
- PARAMS3 = 0; # SET FLAG FOR TAKING CN OUT OF #
- END # REGULATION #
- #
- CALL NPREGCN TO PUT CONNECTIONS IN REGULATION OR TAKE THEM
- OUT OF REGULATION
- #
- PARAMS1 = P<LLCB> ; # ADDRESS OF LLCB #
- PARAMS2 = REGB ; # NEW REGULATION LEVEL #
- OVLNAME = NPREGCNP ; # NAME OF OVERLAY TO LOAD #
- OVLCALL ; # LOAD AND EXECUTE OVERLAY #
- END
- LLCBCS[0] = REGC; # UPDATE CS INDICATOR #
- LLCBNS[0] = REGN; # UPDATE NS INDICATOR #
- LLCBNRL[0] = REGB; # UPDATE NETWORK REGULATION LVL #
- IF KDST[0] AND # NAM ST DISPLAY IS UP #
- LLCBKNDX[0] NQ 0 AND
- LLCBKNDX[0] GQ KDLGLST[0] AND
- LLCBKNDX[0] LQ KDLGLND[0]
- THEN
- BEGIN
- #
- UPDATE LOGICAL LINK STATUS ON NAM ST DISPLAY
- #
- IF KDESTST[0] EQ 0
- THEN
- BEGIN
- KN = LLCBKNDX[0] - KDLGLST[0];
- END
- ELSE
- BEGIN
- IF KDAPPST[0] EQ 0
- THEN
- BEGIN
- KN = LLCBKNDX[0] + KDESTND[0] - KDESTST[0];
- END
- ELSE
- BEGIN
- KN = LLCBKNDX[0] + KDESTND[0] + KDAPPND[0] - KDAPPST[0];
- END
- END
- KPUT(KHDRNP[0],KN,KPLGN,LLCBNRL[0]); # UPDATE NAM ST DISPLY#
- IF LLCBCS[0]
- THEN # CS USING LLK TO SUPERVISE NPU #
- BEGIN
- KPUT(KHDRNP[0],KN,KPLGS,"S"); # UPDATE NAM ST DISPLAY #
- END
- ELSE # NO CS SUPERVISION ON THIS LLK #
- BEGIN
- KPUT(KHDRNP[0],KN,KPLGS," "); # UPDATE NAM ST DISPLAY #
- END
- END
- END
- END
- GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
- END # NPREGLL #
- TERM
cdc/nos2.source/nam5871/npregll.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator