cdc:nos2.source:nam5871:nbsttp
Table of Contents
NBSTTP
Table Of Contents
- [00019] PROC NBSTTP1)
- [00107] PROC ABORT
- [00108] PROC HBSTTP
- [00109] PROC LOCLLCB
- [00110] PROC NFOB
- [00111] PROC NCSTTP
- [00112] PROC NXBLOCK
- [00113] PROC OMSG
- [00114] PROC OVLCALL
- [00115] PROC XSTTP
- [00116] PROC XTRACE
- [00117] PROC MGETS
- [00118] PROC NPBACK
Source Code
- NBSTTP.txt
- *DECK NBSTTP
- USETEXT NIPDEF
- USETEXT ACNB
- USETEXT DRHDR
- USETEXT DUMPFLG
- USETEXT LLCB
- USETEXT MSGIDX
- USETEXT KDIS
- USETEXT NHEADER
- USETEXT NCNT
- USETEXT NCNB
- USETEXT PARAMP
- USETEXT PARAMS
- USETEXT PCNB
- USETEXT PT
- USETEXT OVERLAY
- USETEXT STPRESP
- USETEXT SUPMSG
- PROC NBSTTP((NCNBAD),(TRIGGER),(BLKPTR));
- STARTIMS;
- #
- *1DC NBSTTP
- *
- * 1. PROC NAME AUTHOR DATE
- * NBSTTP C. BITTNER 81/05/15
- *
- * 2. FUNCTIONAL DESCRIPTION
- * NETWORK BLOCK PROTOCOL (IVT) 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 IVT STATE AND TRIGGER. IF A LEGAL TRIGGER
- * IS RETURNED, THEN DO THE FOLLOWING (IF VALUE NOT
- * SET TO NOCHG):
- * A) ACTION - EXECUTE NETWORK BLOCK PROTOCOL (IVT) STATE
- * TABLE ACTION (ISSUE SM, ETC)
- * B) NEWSTATE - UPDATE NEW IVT STATE
- * C) TRIGC - TRIGGER NETWORK CONNECTION STATE TABLE
- * D) TRIGB - TRIGGER HOST BLOCK PROTOCOL (IVT) 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,
- * THEN IGNORE TRIGGER (NO-OP).
- *
- *
- *
- * 4. ENTRY PARAMETERS
- * NCNBAD - NCNB ADDRESS
- * TRIGGER - NETWORK IVT STATE TABLE TRIGGER
- * BLKPTR - ADDRESS OF INPUT BUFFER
- * WORD 0 = PIP BLOCK HEADER OR DATA RING HEADER
- *
- * 5. EXIT PARAMETERS
- * NONE
- *
- * 6. SYMPL TEXTS USED
- * NIPDEF DUMPFLG
- * NCNB
- * STPRESP
- * MSGIDX PARAMP PARAMS
- * OVERLAY SUPMSG LLCB
- *
- * 7. ROUTINES AND OVERLAYS CALLED
- * HBSTTP - HOST BLOCK PROTOCOL STATE TABLE PROCESSOR
- * NCSTTP - NETWORK CONNECTION STATE TABLE PROCESSOR
- * LOCLLCB - LOCATE LLCB
- * ABORT - ABORT NIP
- * NFOB - LINK MESSAGE ON PIP OUTBOUND CHAIN
- * NXBLOCK - SEND SPECIAL NETWORK BLOCK TO CCP
- * OVLCALL - LOAD AND EXECUTE OVERLAY
- * NPBACK - PROCESS BACK FROM CCP
- * RELNCNB OVL RELEASE NCNB
- * COMPCON OVL SWITCH TO PROPER OVERLAY
- * NPBRK OVL DISCARD ALL MESSAGES ON NCNB
- * HPRUON OVL PROCESS PRU/ON
- * STPNERR OVL OUTPUT STATE TABLE ERROR MESSAGE
- * NGIGO OVL DISCARD MESSAGE
- * NNPIIN OVL SEND NPI/IN TO CCP
- * XERRMSG OVL OUTPUT ERROR MESSAGE
- * XSTTP - STATE TABLE PROCESSOR
- * XTRACE - RECORD PROCEDURE CALL
- *
- * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
- * "INVALID TRIGGER NUMBER - NBSTTP"
- *
- #
- STOPIMS;
- #
- INPUT PARAMETERS
- #
- ITEM NCNBAD; # NCNB ADDRESS #
- ITEM TRIGGER; # NETWORK IVT STATE TABLE TRIGGER #
- ITEM BLKPTR; # ADDRESS OF INPUT BUFFER #
- #
- EXTERNAL VARIABLES
- #
- XREF
- BEGIN
- PROC ABORT; # ABORT NIP #
- PROC HBSTTP; # HOST BLOCK PROTOCOL STATE TABLE PROC #
- PROC LOCLLCB; # LOCATE LLCB #
- PROC NFOB ;
- PROC NCSTTP; # HOST CONNECTION STATE TABLE PROC #
- PROC NXBLOCK; # SEND NETWORK BLOCK TO NPU #
- PROC OMSG; # ISSUE DAYFILE MESSAGE #
- PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
- PROC XSTTP; # STATE TABLE PROCESSOR #
- PROC XTRACE; # RECORD PROCEDURE CALL #
- PROC MGETS ;
- PROC NPBACK ;
- END
- #
- INTERNAL VARIABLES
- #
- SWITCH NBACTION NB0,NB1,NB2,NB3,NB4,NB5,NB6,NB7,NB8,NB9,NB10,
- NB11,NB12,NB13,NB14,NB15,NB16,NB17,NB18 ;
- ITEM ACNBAD; # ACNB ADDRESS #
- ITEM BTYPE; # NETWORK BLOCK TYPE #
- ITEM CNN ; # NETWORK CONNECTION NUMBER #
- ITEM CURST; # CURRENT STATE #
- ITEM HN; # HOST NODE #
- ITEM LLCBAD; # LLCB ADDRESS #
- ITEM NCNTEAD; # NCNT ENTRY ADDRESS #
- ITEM RESP; # RESPONSE WORD #
- ITEM TN; # TERMINAL NODE #
- ITEM BLKADDR ; # ADDRESS OF NWL #
- ITEM TEMPPTR U ;
- ITEM DATABLK U ;
- ITEM PRUMOD B=FALSE ;
- ITEM TEMP U ;
- #**********************************************************************#
- BEGIN
- CONTROL IFEQ DEBUG,1;
- XTRACE("NBSTT") ;
- CONTROL FI;
- # VALIDATE TRIGGER NUMBER #
- BLKADDR = BLKPTR ; # ADDRESS OF NWL #
- IF TRIGGER LQ NBMTR AND TRIGGER GQ 0
- THEN
- BEGIN # VALID TRIGGER NUMBER #
- P<NCNB> = NCNBAD;
- IF P<NCNB> EQ 0
- THEN # NO NCNT ENTRY/NCNB #
- BEGIN # ERROR - NO NCNB #
- D27M2[0] = "NBSTTP1";
- ABORT(DFMSG27,0); # NIP INTERNAL ERROR #
- END
- ELSE
- BEGIN
- HN = NCNBHN[0] ;
- TN = NCNBTN[0] ;
- CNN = NCNBCN[0] ;
- ACNBAD = NCNBACNB[0] ;
- CURST = NCNBBST[0] ;
- END
- XSTTP(NBORD,CURST,TRIGGER,RESP);
- P<STRESP> = LOC(RESP);
- IF LEGTRIG[0]
- THEN # LEGAL TRIGGER #
- BEGIN
- IF ACTION[0] NQ NOCHG
- THEN
- GOTO NBACTION[ACTION[0]]; # EXECUTE PROPER ACTION #
- ELSE
- GOTO NBA;
- NB0:
- #
- DLNCNB (ACTION NO. 0)
- DELETE NCNB
- #
- PARAMS1 = P<NCNB>; # NCNB ADDRESS #
- OVLNAME = RELNCNBP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NBA;
- NB1:
- #
- NBSINTR (ACTION NO. 1)
- SEND INITR TO CCP
- #
- PARAMS1 = P<NCNB>;
- PARAMS9 = COMPCX"RELBLK$" ;
- OVLNAME = COMPCONP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- BTYPE = NETINITR;
- GOTO NXB;
- NB2:
- #
- NBSTERM (ACTION NO. 2)
- SEND TERM TO CCP
- #
- BTYPE = NETTERM;
- GOTO NXB;
- NB3:
- #
- SINITN (ACTION NO. 3)
- SEND INITN TO CCP
- #
- BTYPE = NETINITN;
- GOTO NXB;
- NB4:
- #
- NBSRST ( ACTION NO. 4 )
- SEND RST TO CCP
- #
- BTYPE = NETRST;
- GOTO NXB;
- NB5:
- #
- NBICMDR (ACTION NO. 5)
- SEND ICMDR TO CCP
- #
- BTYPE = NETICMDR;
- GOTO NXB;
- NB6:
- #
- NSBACK ( ACTION NO. 6 )
- SEND BACK TO CCP
- #
- BTYPE = NETBACK;
- GOTO NXB;
- NB7:
- #
- NBSMSG ( ACTION NO. 7 )
- SEND BLOCK MSG TO CCP
- #
- NFOB(BLKADDR,P<NCNB>) ;
- GOTO NBA ;
- NB8:
- #
- NBBACK (ACTION NO. 8)
- FORM PSUEDO NETWORK FOR FC/ACK AND/OR FC/NAK FOR THE HOST SIDE,
- AND SEND QUEUED MESSAGE TO CCP IF PERMITTED.
- #
- NPBACK(BLKADDR,P<NCNB>); # PROCESS BACK FROM CCP #
- # BLKADD IS THE ADDRESS OF PSUEDO FCACK OR FCNAK #
- # THIS WILL BE PASSED TO THE HOSTSIDE, AND PROPER #
- # SM MESSAGE WILL BE SENT #
- # IF BLKPTR IS ZERO THEN THIS BACK WAS IGNORED #
- IF BLKADDR EQ 0
- THEN
- BEGIN # IGNORE THIS BACK #
- TRIGB[0] = NOCHG ;
- END # INGORE THIS BACK #
- GOTO NBA ;
- NB9:
- #
- RELDR (ACTION NO. 9)
- RELEASE MSG AND BLK BLOCK TYPE IN NCNB
- #
- BEGIN
- PARAMS1 = P<NCNB> ;
- OVLNAME = NPBRKP ;
- OVLCALL ;
- GOTO NBA ;
- END
- NB11:
- #
- STERMRD (ACTION NO.11)
- SEND TERM TO CCP AND RELEASE DATA RING
- #
- P<SMNIP> = BLKPTR + BLKHSIZE + ABHSIZE;
- RCBRK = TCNRC[0]; # REASON CODE FOR BRK #
- PARAMS1 = P<NCNB>;
- PARAMS9 = COMPCX"RELBLK$" ;
- OVLNAME = COMPCONP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- BTYPE = NETTERM;
- GOTO NXB;
- NB12:
- #
- RELDR2 (ACTION NO. 12)
- RELEASE DATA RING
- #
- PARAMS1 = P<NCNB>;
- PARAMS9 = COMPCX"RELBLK$" ;
- OVLNAME = COMPCONP; # OVERLAY NAME #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- GOTO NBA;
- NB10:
- #
- CONVERT ( ACTION NUMBER 10 )
- CONVERT THE NCNB TO A PCNB AND START PRU MOD
- #
- OVLNAME = HPRUONP ;
- OVLCALL;
- IF PARAMP1 NQ 0 # MEANS WE DID NOT SUCCEED TO CONVERT #
- THEN
- RETURN ; # AND DO NOT GO TO PRU STATE #
- ELSE
- BEGIN
- P<NCNB> = PARAMP2 ;
- NCNBAD = PARAMP2 ;
- GOTO NBA ;
- END
- # #
- NB13:
- #
- NBICMD ( ACTION NUMBER 13 )
- SEND ICMD TO CCP
- #
- P<SUPMSG> = BLKPTR + BLKHSIZE + ABHSIZE ;
- TEMPBSN = INTRCHR[0]; # INTERRUPT CHARACTER #
- BTYPE = NETICMD;
- GOTO NXB;
- NB14:
- #
- SEND BREAK PROTOCOL ELEMENT TO CCP.
- DISCARD ANY PREVIOUS DOWNLINE DATA IF POSSIBLE
- #
- PARAMS1 = P<NCNB> ;
- OVLNAME = NPBRKP ;
- OVLCALL ;
- P<SUPMSG> = BLKPTR + BLKHSIZE + ABHSIZE ;
- TEMPBSN = FCRBR ;
- BTYPE = NETBRK ;
- GOTO NXB ;
- NB15:
- GOTO NBA ;
- NB16:
- #
- DISCARD ( ACTION NUMBER 16 )
- SIGNAL NPPWL THAT THIS IS DISCARD MOD
- #
- PARAMP2 = 1 ;
- GOTO NBA ;
- NB17:
- #
- ALL DATA OF PRU ALLOWED
- #
- PARAMP2 = 0 ;
- GOTO NBA ;
- NB18:
- #
- SAVE THE BSN FOR THE NEXT BLOCK FROM CCP
- #
- P<NHEADER> = BLKPTR + BLKHSIZE ;
- P<NCNT> = NCNBCTAD[0] ; # NCNT ADDRESS #
- TEMPPTR = NCNTHSIZE + ( NCNBCN[0] LAN X"F" ) ; # INDEX INTO NCNT #
- IF KNAMDB[0]
- THEN
- BEGIN # K-DEBUG IS ON #
- TEMP = NCNTNIB[TEMPPTR] ;
- IF TEMP NQ 0
- AND TEMP NQ NHBSN[0]
- THEN
- ABORT(0,0) ; # BSN FROM CCP NOT IN SEQUENCE #
- END # K-DEBUG IS ON #
- IF NHBSN[0] LS 7
- THEN
- NCNTNIB[TEMPPTR] = NHBSN[0] + 1 ;
- ELSE
- NCNTNIB[TEMPPTR] = 1 ; # NEXT BSN #
- GOTO NBA ;
- NXB: # SEND BLOCK PROTOCOL ELEMENT TO NPU #
- NXBLOCK(P<NCNB>,BTYPE);
- NBA:
- IF NEWSTATE[0] NQ STATX
- THEN
- BEGIN
- NCNBLBS[0] = CURST ; # UPDATE LAST STATE (STATISTICS ) #
- NCNBLBT[0] = TRIGGER;# AND THE LAST TRIGGER #
- END
- IF NEWSTATE[0] NQ NOCHG
- THEN
- NCNBBST[0] = NEWSTATE[0] ;
- IF TRIGC[0] NQ NOCHG
- THEN # TRIGGER HOST CONNECTION TABLE #
- BEGIN
- NCSTTP(NCNBAD,CNN,TRIGC[0],0);
- END
- IF TRIGB[0] NQ NOCHG
- THEN
- BEGIN
- CONTROL IFEQ DEBUG,1;
- IF ACNBAD EQ 0
- THEN
- BEGIN
- D27M2[0] = "NBSTTP2";
- ABORT(DFMSG27,0); # "NIP INTERNAL ERROR" #
- END
- CONTROL FI;
- HBSTTP(ACNBAD,TRIGB[0],BLKADDR) ;
- END
- ENDACTION:END
- IF NOT LEGTRIG[0]
- THEN
- BEGIN # ILLEGAL TRIGGER #
- PARAMS1 = HN; # HOST NODE #
- PARAMS2 = TN; # TERMINAL NODE #
- PARAMS3 = CNN ; # NETWORK CONNECTION NUMBER #
- PARAMS4 = TRIGGER; # ILLEGAL TRIGGER #
- PARAMS6 = "NBSTTP";# NAME OF STATE TABLE PROCESSOR #
- PARAMS7 = CURST; # CURRENT BLOCK PROTOCOL STATE #
- OVLNAME = STPNERRP; # STATE TABLE ERROR PROCESSOR #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- IF TRIGGER LS NBMINXT OR TRIGGER GR NBMAXXT
- THEN
- BEGIN # TRIGGER INTERNAL TO NIP #
- ABORT(0,0); # ABORT NIP #
- END
- ELSE
- BEGIN # ILLEGAL EXTERNAL TRIGGER FROM CCP #
- OVLNAME = NGIGOP; # SEND GARBAGE MSG TO DAYFILE #
- PARAMP1 = BLKPTR;
- PARAMP4 = DMCBNBPSTT; # INDX FOR BAD NET BLK STATE TBLE MSG#
- OVLCALL;
- CONTROL IFEQ DEBUG,1;
- LOCLLCB(HN,TN,P<LLCB>);
- PARAMS1 = P<LLCB>;
- PARAMS2 = TRIGGER; # BAD TRIGGER FROM NETWORK #
- PARAMS3 = CURST; # CURRENT STATE OF CONNECTION #
- PARAMS4 = CNN; # NETWORK CONNECTION NUMBER #
- PARAMS7 = X"42"; # STATE TABLE PROCESSOR #
- OVLNAME = NNPIINP; # SEND NPI/IN TO CCP #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- CONTROL FI;
- END
- END
- END
- ELSE
- BEGIN # TRIGGER NUMBER OUT OF RANGE #
- PARAMS1 = DFMSG26;
- PARAMS6 = "NB";
- OVLNAME = XERRMSGP;
- OVLCALL;
- END
- RETURN;
- END
- TERM
1)
NCNBAD),(TRIGGER),(BLKPTR
cdc/nos2.source/nam5871/nbsttp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator