cdc:nos2.source:nam5871:ncsttp
Table of Contents
NCSTTP
Table Of Contents
- [00022] PROC NCSTTP1)
- [00124] PROC ABORT
- [00125] PROC NBSTTP
- [00126] PROC HCSTTP
- [00127] PROC MGETS
- [00128] PROC HRELPWL
- [00129] PROC LOCLLCB
- [00130] PROC LOCNCNT
- [00131] PROC NFOB
- [00132] PROC OMSG
- [00133] PROC OVLCALL
- [00134] PROC XSTTP
- [00135] PROC XTRACE
- [00569] PROC CRNCNBP
- [00585] PROC SICNXXP
Source Code
- NCSTTP.txt
- *DECK NCSTTP
- USETEXT NIPDEF
- USETEXT ACB
- USETEXT ACNB
- USETEXT AHEADER
- USETEXT APPSTAT
- USETEXT AT
- USETEXT DRHDR
- USETEXT DUMPFLG
- USETEXT LLCB
- USETEXT MSGIDX
- USETEXT NCNB
- USETEXT NCNT
- USETEXT PCNB
- USETEXT PWL
- USETEXT OVERLAY
- USETEXT PARAMP
- USETEXT PARAMS
- USETEXT PT
- USETEXT STPRESP
- USETEXT SUPMSG
- PROC NCSTTP((LLCBAD),(CN),(TRIGGER),(SMPTR));
- STARTIMS;
- #
- *1DC NCSTTP
- *
- * 1. PROC NAME AUTHOR DATE
- * NCSTTP C. BITTNER 81/05/15
- *
- * 2. FUNCTIONAL DESCRIPTION
- * NETWORK CONNECTION STATE TABLE PROCESSOR
- *
- * 3. METHOD USED
- * VALIDATE TRIGGER. SET CURRENT STATE (IF THERE IS NO NCNB
- * THEN SET THE CURRENT STATE TO STATX). CALL XSTTP (STATE TABLE
- * PROCESSOR) PASSING THE STATE TABLE ORDINAL, CURRENT
- * CONNECTION STATE AND TRIGGER. IF A LEGAL TRIGGER IS
- * RETURNED THEN DO THE FOLLOWING (IF VALUE NOT SET TO NOCHG):
- * A) ACTION - EXECUTE NETWORK CONNECTION STATE TABLE
- * ACTION (ISSUE SM, ETC)
- * B) NEWSTATE - UPDATE NEW CONNECTION STATE
- * C) TRIGC - TRIGGER HOST CONNECTION STATE TABLE
- * D) TRIGB - TRIGGER HOST BLOCK PROTOCOL STATE TABLE
- *
- * IF AN ILLEGAL TRIGGER IS RETURNED THEN DO THE
- * FOLLOWING: IF THE TRIGGER IS INTERNAL TO NIP THEN ABORT
- * NIP. IF ILLEGAL EXTERNAL TRIGGER AND IN DEBUG MODE
- * ABORT CCP (SEND NPI/IN TO CCP). IF ILLEGAL EXTERNAL
- * TRIGGER AND NOT IN DEBUG MODE, IGNORE TRIGGER (NO-OP).
- *
- *
- * 4. ENTRY PARAMETERS
- * LLCBAD - LLCB ADDRESS OR NCNB ADDRESS
- * CN - NETWORK CONNECTION NUMBER
- * TRIGGER - NETWORK CONNECTION STATE TABLE TRIGGER
- * SMPTR - ADDRESS OF SM BUFFER
- *
- * 5. EXIT PARAMETERS
- * NONE
- *
- * 6. SYMPL TEXTS USED
- * ACNB
- * APPSTAT
- * AT
- * NCNB NCNT
- * OVERLAY
- * NIPDEF PARAMP
- * PARAMS PT
- * STPRESP PCNB PWL
- * SUPMSG
- * AHEADER LLCB MSGIDX
- *
- * 7. ROUTINES CALLED
- * NBSTTP - NETWORK BLOCK PROTOCOL STATE TABLE PROCESSOR
- * HCSTTP - HOST CONNECTION STATE TABLE PROCESSOR
- * MGETS - GET A BUFFER
- * LOCLLCB - FIND LLCB ADDRESS
- * LOCNCNT - LOCATE NCNT ENTRY ADDRESS
- * OMSG - ISSUE DAYFILE MESSAGE
- * OVLCALL - LOAD AND EXECUTE OVERLAY
- * ABORT - ABORT NIP
- * NFOB - LINK MESSAGE ON PIP OUTBOUND CHAIN
- * CRNCNBP - INTERNAL PROC TO CREATE NCNB
- * NNPIIN OVL SEND NPI/IN TO CCP
- * NICTEAX OVL ISSUE ICN/TE/A
- * COMPCON OVL TRIGGER CONNECTION PROCESSING ROUTINES
- * NTCNTAR OVL ISSUE TCN/TA/R
- * UPDNCNB OVL UPDATE NCNB ON RECEIPT OF CHC/TE
- * NICNTEA OVL SEND ICN/TE/A TO CCP
- * NTCNTAN OVL SENT TCN/TA/N TO CCP
- * NPPCT OVL CONVERT PCNB TO NCNB
- * RELNCNB OVL RELEASE NCNB
- * STPNERR OVL ISSUE STP ERROR MESSAGE
- * XERRMSG OVL ISSUE ERROR MESSAGE
- * STRTCON OVL TRIGGER CONNECTION PROCESSING ROUTINES
- * XSTTP - STATE TABLE PROCESSOR
- * XTRACE - RECORD PROCEDURE CALL
- *
- * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
- * "CCP ERROR - NCSTTP"
- * "NIP INTERNAL ERROR - PROC NAME"
- * "INVALID TRIGGER NUMBER - __STTP"
- *
- * THIS PROCEDURE IS CALLED BY HCSTTP, NBSTTP
- * NPNIPSM, NPPWL, AND RELCONN.
- *
- #
- STOPIMS;
- #
- INPUT PARAMETERS
- #
- ITEM LLCBAD; # LLCB ADDRESS #
- ITEM CN; # CONNECTION NUMBER #
- ITEM TRIGGER; # STATE TABLE TRIGGER #
- ITEM SMPTR; # ADDRESS OF SM BUFFER #
- #
- EXTERNAL VARIABLES
- #
- XREF
- BEGIN
- PROC ABORT; # ABORT NIP #
- PROC NBSTTP; # NETW BLOCK PROTOCOL STATE TABLE PROC #
- PROC HCSTTP; # HOST CONNECTION STATE TABLE PROC #
- PROC MGETS;
- PROC HRELPWL; # RELEASE USED PORTION OF NWL #
- PROC LOCLLCB ;
- PROC LOCNCNT; # LOCATE NCNT ENTRY ADDRESS #
- PROC NFOB ;
- PROC OMSG; # ISSUE DAYFILE MESSAGE #
- PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
- PROC XSTTP; # STATE TABLE PROCESSOR #
- PROC XTRACE; # RECORD PROCEDURE CALL #
- END
- #
- INTERNAL VARIABLES
- #
- SWITCH NCACTION NC0,NC1,NC2,NC3,NC4,NC5,NC6,NC7,NC8,
- NC9,NC10,NC11,NC12,NC13,NC14,NC15,NC16,NC17,NC18,NC19;
- ITEM ACN; # APPLICATION CONNECTION NUMBER #
- ITEM AN; # APPLICATION NUMBER #
- ITEM CURST; # CURRENT STATE #
- ITEM NCNTEAD; # NCNT ENTRY ADDRESS #
- ITEM RESP U; # RESPONSE WORD #
- ITEM TRC I ; # TERMINATED REASON CODE #
- #**********************************************************************#
- BEGIN
- BEGIN
- CONTROL IFEQ DEBUG,1;
- XTRACE("NCSTT") ;
- CONTROL FI;
- TRC = 0 ; # ASSUMING RC TO TERMINATE IS ZERO #
- CURST = 0 ;
- P<ACNB> = 0 ;
- PARAMS3 = 0;
- P<NCNB> = 0;
- P<SUPMSG> = SMPTR+BLKHSIZE+ABHSIZE;
- P<SMNVF> = P<SUPMSG>;
- P<SMNIP> = P<SUPMSG>;
- # VALIDATE TRIGGER NUMBER #
- IF TRIGGER LQ NCMTR AND TRIGGER GQ 0
- THEN
- BEGIN # VALID TRIGGER NUMBER #
- P<LLCB> = LLCBAD ;
- IF LLCBID[0] EQ NCNBIDVALUE OR
- LLCBID[0] EQ LCNBIDVALUE OR
- LLCBID[0] EQ PCNBIDVALUE
- THEN
- BEGIN
- P<NCNB> = LLCBAD ;
- CURST = NCNBCST[0] ;
- P<ACNB>=NCNBACNB[0];
- LOCLLCB(NCNBHN[0],NCNBTN[0],LLCBAD) ;
- END
- ELSE # THIS IS AN LLCB (CALLED FROM HOST SIDE) #
- BEGIN
- LOCNCNT(LLCBAD,CN,NCNTEAD); # LOCATE NCNT ENTRY ADDRESS #
- P<NCNT> = NCNTEAD;
- IF P<NCNT> EQ 0
- THEN
- CURST = STATX;
- ELSE
- BEGIN
- P<NCNB> = NCNTNCNB[0];
- IF P<NCNB> EQ 0
- THEN
- CURST = STATX;
- ELSE
- BEGIN
- CURST = NCNBCST[0] ;
- P<ACNB> = NCNBACNB[0] ;
- END
- END
- END
- XSTTP(NCORD,CURST,TRIGGER,RESP); # CALL STATE TABLE PROC #
- P<STRESP> = LOC(RESP);
- IF LEGTRIG[0]
- THEN
- BEGIN # LEGAL TRIGGER #
- IF ACTION[0] NQ NOCHG
- THEN
- GOTO NCACTION[ACTION[0]]; # EXECUTE PROPER ACTION #
- ELSE
- GOTO NCA;
- CONTROL EJECT;
- NC0:
- #
- BUILD NCNB, LINK IT TO ACNB
- FORMAT ICN/AP/R FROM CR/IAP/N
- SEND ICN/AP/R TO NETWORK
- #
- CRNCNBP; # BUILD NCNB FROM CR/IAP/N #
- NCNBACNB[0] = ACNBADD;
- P<ACNB> = ACNBADD;
- ACNBNCNB[0] = NCNBADD; # LINK NCNB/ACNB #
- SICNXXP; # SEND ICN/AP/R TO NETWORK #
- GOTO NCA ;
- NC1:
- #
- CNCNB2 (ACTION NO. 1)
- REJECT CN IF IN SHUTDOWN ELSE CREATE NCNB
- #
- IF SHUTDOWN
- THEN # REJECT, HOST IN SHUTDOWN MODE #
- PARAMS3 = RTEA"HSD";
- ELSE
- BEGIN
- IF ATACBA[NVFAN] EQ 0
- THEN # NVF NOT YET NETTED ON #
- PARAMS3 = RTEA"NNO";
- END
- IF PARAMS3 EQ 0
- THEN
- CRNCNBP; # BUILD NCNB IF POSSIBLE #
- IF PARAMS3 NQ 0
- THEN # ERROR DETECTED #
- BEGIN
- IF TRIGGER EQ RICNTER
- THEN # ERROR ON ICN/TE/R #
- BEGIN
- PARAMS1 = SMPTR; # FWA OF SM BUFFER #
- PARAMS2 = LLCBAD; # LLCB ADDRESS #
- OVLNAME = NICTEAXP; # SEND ICN/TE/A #
- OVLCALL;
- END
- ELSE # ERROR ON ICN/EX/R OR ICN/AP/R #
- SICNXXP; # SEND ICN/EX/A OR ICN/AP/A #
- GOTO NCST$EXIT; # EXIT NCSTTP IMMEDIATELY #
- END
- GOTO NCA;
- NC2:
- #
- DNCNB1 (ACTION NO. 2)
- ISSUE TCN/TA/R TO CCP
- #
- # ISSUE TCN/TA/R TO CCP #
- PARAMS1 = P<NCNB>; # NCNB ADDRESS #
- PARAMS2 = RCBRK; # REASON CODE FROM CR/TRM/R #
- OVLNAME = NTCNTARP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NCA;
- NC3:
- #
- UNCNB (ACTION NO. 3)
- UPDATE NCNB WITH TERMINAL CHARACTERISTIC CHANGES
- #
- PARAMS1 = P<NCNB>; # NCNB ADDRESS #
- PARAMS2 = SMPTR; # SM BUFFER - CHC/TE #
- OVLNAME = UPDNCNBP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NCA;
- NC4:
- #
- INCNB (ACTION NO. 4)
- UPDATE NCNB WITH TERMINAL NAME AND SEND ICN/TE/N TO CCP
- #
- CONTROL IFEQ DEBUG,1;
- IF P<NCNB> EQ 0
- THEN
- BEGIN # NO CONNECTION #
- D27M2[0] = "NCSTTP1";
- ABORT(DFMSG27,0); # "NIP INTERNAL ERROR" #
- END
- CONTROL FI;
- NCNBTNAM[0] = CRITN[0]; # TERMINAL NAME #
- # ISSUE ICN/TE/N #
- PARAMS1 = NCNBCN[0];
- PARAMS2 = LLCBAD;
- PARAMS9 = COMPCX"ICNTE$" ;
- OVLNAME = COMPCONP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NCA;
- NC5:
- #
- SICNTEA (ACTION NO. 5)
- SEND ICN/TE/A TO CCP
- #
- PARAMS1 = CRRITE; # REASON CODE FROM NVF #
- PARAMS2 = CN; # NETWORK CONNECTION NUMBER #
- PARAMS3 = LLCBAD; # LLCB ADDRESS #
- OVLNAME = NICNTEAP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NCA;
- NC6:
- #
- SEND ICN/AP/N TO CCP (AFTER CR/RAP/N FROM NVF)
- #
- SICNXXP; # SEND ICN/AP/N TO NETWORK #
- GOTO NCA ;
- NC7:
- NC8:
- #
- STCNTAN (ACTION NO. 8)
- ISSUE TCN/TA/N TO CCP
- #
- RCBRK = TCNRC[0]; # REASON CODE FOR TERMINATION #
- PARAMS1 = P<NCNB>; # NCNB ADDRESS #
- OVLNAME = NTCNTANP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NCA;
- NC9:
- NC10:
- GOTO NCA;
- NC16:
- # SEND IMMEDIATE WORKLIST TO PIP #
- P<PCNB> = P<NCNB> ;
- PCNBRC[0] = RCBRK ; # SAVE REASON CODE (IF TCN/TA) #
- MGETS(LTCPWL,P<PWLHDR>,TRUE);
- PWLID[0] = PWLIDVALUE ;
- PWLHN[0] = PCNBHN[0] ;
- PWLTN[0] = PCNBTN[0] ;
- PWLCN[0] = CN ;
- PWLOP[0] = PWLOPTRMCN; # TERMINATE CONN REQUEST #
- PWLRC[0] = TRC ; # TELL PIP THE REASON CODE #
- # AND LINK IT TO IMMEDIATE QUEUE #
- PCNBIMMO[0] = P<PWLHDR> ;
- GOTO NCA ;
- NC17:
- #
- AFTER COMPLETION SEND TCN/TA/R TO CCP
- #
- PARAMS1 = P<NCNB> ;
- PARAMS2 = RCBRK;
- OVLNAME = NTCNTARP ;
- OVLCALL ; # SEND TCN/TA/R TO CCP #
- GOTO NCA ;
- NC18:
- #
- NO TCN/TA/R TO CCP
- #
- GOTO NCA ;
- NC19:
- P<SUPMSG> = SMPTR + BLKHSIZE + ABHSIZE ;
- IF PFC[0] EQ OFT
- THEN
- TRC = OFTRC ;
- ELSE
- IF PFC[0] EQ IFT
- THEN
- TRC = IFTRC ;
- ELSE
- ABORT(0,0) ;
- GOTO NC16 ;
- NC11:
- NC12:
- #
- STANRNC (ACTION NO. 12)
- ISSUE TCN/TA/N TO CCP
- RELEASE NCNB
- #
- RCBRK = TCNRC[0]; # REASON CODE FOR TERMINATION #
- PARAMS1 = P<NCNB>; # NCNB ADDRESS #
- OVLNAME = NTCNTANP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- PARAMS1 = P<NCNB>; # NCNB ADDRESS #
- OVLNAME = RELNCNBP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NCA;
- NC13:
- #
- STEARNC (ACTION NO. 13)
- ISSUE ICN/TE/A AND DELETE NCNB
- #
- PARAMS1 = CRRITE; # REASON CODE FROM NVF #
- PARAMS2 = CN; # NETWORK CONNECTION NUMBER #
- PARAMS3 = LLCBAD; # LLCB ADDRESS #
- OVLNAME = NICNTEAP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- PARAMS1 = P<NCNB>; # NCNB ADDRESS #
- OVLNAME = RELNCNBP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NCA;
- NC14:
- #
- RLNCNB (ACTION NO. 14)
- RELEASE NCNB
- #
- PARAMS1 = P<NCNB>; # NCNB ADDRESS #
- RCBRK = RCCB"LLF" ; # LOGICAL-LINK HAS FAILED #
- # #
- OVLNAME = RELNCNBP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NCA;
- NC15:
- #
- SAPARNC (ACTION NO. 15)
- ISSUE ICN/AP/A AND DELETE NCNB
- #
- PARAMS3 = CRRRAP[0]; # REASON CODE FROM CR/RAP/A #
- SICNXXP; # SEND ICN/AP/A OR ICN/EX/A #
- PARAMS1 = P<NCNB> ;
- OVLNAME = RELNCNBP; # RELEASE NCNB #
- OVLCALL ;
- GOTO NCA;
- CONTROL EJECT;
- NCA:
- IF NEWSTATE[0] NQ STATX
- THEN
- BEGIN
- NCNBLCS[0] = CURST ; # UPDATE LAST CONNECTION STATE #
- NCNBLCT[0] = TRIGGER ; # UPDATE LAST CONNECTION TRIGGER #
- IF NEWSTATE[0] NQ NOCHG
- THEN
- NCNBCST[0] = NEWSTATE[0]; # UPDATE NEW CONN STATE #
- END
- IF TRIGC[0] NQ NOCHG
- THEN
- BEGIN # TRIGGER HOST CONNECTION STATE TABLE #
- IF P<ACNB> EQ 0
- THEN
- BEGIN # THERE IS NO CONNNECTION #
- ACN = 0; # APPLICATION CONNNECTION NUMBER #
- AN = NVFAN; # APPLICATION NUMBER #
- END
- ELSE
- BEGIN # THERE IS A CONNECTION #
- AN = ACNBAN[0]; # APPLICATION NUMBER #
- ACN = ACNBACN[0]; # APPLICATION CONNECTION NUMBER #
- END
- P<ACB> = ATACBA[AN]; # BASE APPLICATION CONTROL BLK #
- HCSTTP(P<ACB>,ACN,TRIGC[0],SMPTR);
- END
- IF TRIGB[0] NQ NOCHG
- THEN # TRIGGER NETW BLOCK PROTOCOL STATE TABLE #
- BEGIN
- CONTROL IFEQ DEBUG,1;
- IF P<NCNB> EQ 0
- THEN
- BEGIN
- D27M2[0] = "NCSTTP2";
- ABORT(DFMSG27,0); # "NIP INTERNAL ERROR" #
- END
- CONTROL FI;
- NBSTTP(P<NCNB>,TRIGB[0],0);
- END
- END
- ELSE
- BEGIN # ILLEGAL TRIGGER #
- PARAMS1 = NCNBHN[0]; # HOST NODE #
- PARAMS2 = NCNBTN[0]; # TERMINAL NODE #
- PARAMS3 = CN; # NETWORK CONNECTION NUMBER #
- PARAMS4 = TRIGGER; # ILLEGAL TRIGGER #
- PARAMS6 = "NCSTTP";# NAME OF STATE TABLE PROCESSOR #
- PARAMS7 = CURST; # CURRENT CONNECTION STATE #
- OVLNAME = STPNERRP;# ISSUE STP ERROR MESSAGE #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- IF TRIGGER LS NCMINXT OR TRIGGER GR NCMAXXT
- THEN # TRIGGER INTERNAL TO NIP #
- BEGIN
- ABORT(0,0); # ABORT NIP #
- END
- ELSE
- BEGIN # ILLEGAL EXTERNAL TRIGGER (CCP) #
- CONTROL IFEQ DEBUG,1;
- IF TRIGGER EQ RICNTER OR TRIGGER EQ RICNAPR
- THEN
- BEGIN
- PARAMS1 = SMPTR; # SM BUFFER #
- PARAMS2 = LLCBAD; # LLCB ADDRESS #
- PARAMS3 = RTEA"TCE"; # RC=9 TERM CON EXISTS #
- IF TRIGGER EQ RICNTER
- THEN
- BEGIN
- OVLNAME = NICTEAXP ;
- OVLCALL ;
- END
- ELSE
- BEGIN
- P<NCNB> = 0; # SEND ICN/AP/A IMMEDIATELY #
- SICNXXP;
- END
- END
- PARAMS1 = LLCBAD ;
- PARAMS2 = TRIGGER; # BAD TRIGGER FROM NETWORK #
- PARAMS3 = CURST; # CURRENT STATE OF CONNECTION #
- PARAMS4 = CN; # NETWORK CONNECTION NUMBER #
- PARAMS7 = X"43"; # STATE TABLE PROCESSOR #
- OVLNAME = NNPIINP; # SEND NPI/IN TO CCP #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- CONTROL FI;
- END
- END
- END
- ELSE # INVALID TRIGGER - NIP INTERNAL ERROR #
- NCERR: BEGIN
- PARAMS1 = DFMSG26;
- PARAMS6 = "NC";
- OVLNAME = XERRMSGP;
- OVLCALL;
- END
- NCST$EXIT:
- # EXIT #
- RETURN;
- END
- PROC CRNCNBP ; # CREATE NCNB #
- BEGIN
- PARAMS1 = P<SUPMSG>; # FWA OF CR/IAP/N OR ICN/TE/R #
- # OR ICN/EX/R OR ICN/AP/R #
- PARAMS2 = LLCBAD; # LLCB ADDRESS #
- PARAMP5 = STRTCX"BNCNB$" ;
- OVLNAME = STRTCONP ;
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- P<NCNB> = PARAMS1;
- NCNBADD = PARAMS1; # NCNB ADDRESS #
- P<NCNT> = PARAMS2; # NCNT ADDRESS #
- RETURN ;
- END
- PROC SICNXXP; # SEND ICN/XX TO NETWORK #
- BEGIN
- PARAMS1 = SMPTR;
- PARAMS2 = LLCBAD;
- PARAMS4 = P<NCNB>;
- PARAMS9 = COMPCX"ICNAP$";
- OVLNAME = COMPCONP;
- OVLCALL;
- RETURN;
- END
- END
- TERM
1)
LLCBAD),(CN),(TRIGGER),(SMPTR
cdc/nos2.source/nam5871/ncsttp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator