cdc:nos2.source:nam5871:nvfcbpa
Table of Contents
NVFCBPA
Table Of Contents
- [00009] PROC NVFCBPA
- [00010] NVFCBPA - BEGIN PROTOCOL ACTION.
- [00014] BEGIN PROTOCOL ACTION.
- [00063] PROC MOVE
- [00064] PROC NVFASWN
- [00065] PROC NVFCFCE
- [00066] PROC SSTATS
- [00067] PROC SSTAQE
- [00068] PROC SSTRTS
- [00069] PROC SSSAWR
Source Code
- NVFCBPA.txt
- *DECK NVFCBPA
- USETEXT TEXTSS
- USETEXT TXSMNVF
- USETEXT TXTAPSS
- USETEXT TXTANVF
- USETEXT TXTSUSS
- USETEXT TXINNVF
- USETEXT TEXTNVF
- PROC NVFCBPA;
- # TITLE NVFCBPA - BEGIN PROTOCOL ACTION. #
- BEGIN # NVFCBPA #
- #
- ** NVFCBPA - BEGIN PROTOCOL ACTION.
- *
- * S. H. FISCHER. 81/11/09.
- * D. G. DEPEW. 81/12/17.
- * C. J. BRION. 82/06/01.
- *
- * THIS PROCEDURE PERFORMS ALL THE CONNECTION(C) LAYER PROCESSING
- * REQUIRED FOR ALL INBOUND, CONNECTION/USER RELATED SUPERVISORY
- * MESSAGES.
- *
- * PROC NVFCBPA
- *
- * ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
- * TRAFFIC QUEUE (*CTQ*) ENTRY.
- * ABHBUF[0] = APPLICATION BLOCK HEADER FOR THE SM (BASED
- * ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
- * MSGBUF[0] = BODY OF THE SM (BASED ARRAY *APSM* IN
- * *TXTAPSS* POINTS HERE). THE POSSIBLE PFC/SFC
- * VALUES ARE: CR/ITE/R, CR/IAP/R, CR/RAP/R,
- * CR/RCN/R, CR/SWH/N, CR/TRM/N, CR/ACC, CR/CB,
- * AND TCH/TCHAR.
- *
- * EXIT ANY OF THE FOLLOWING IN VARIOUS COMBINATIONS ACCORDING TO
- * THE SM RECEIVED AND THE STATE OF THE ACN LIST ENTRY FOR
- * THE USER IN QUESTION.
- * - THE ACN LIST ENTRY HAS BEEN CREATED.
- * - THE ACN LIST ENTRY HAS BEEN DELETED.
- * - THE STATE OF THE ACN LIST ENTRY HAS BEEN UPDATED.
- * - AN ENTRY HAS BEEN PLACED IN THE OUTGOING TRAFFIC QUEUE
- * (*OTQ*).
- * - AN ENTRY HAS BEEN PLACED IN THE TERMINAL-TO-APPLICATION
- * CONNECTION INPUT QUEUE (*TAINPQ*).
- * - AN ENTRY HAS BEEN PLACED IN THE APPLICATION-TO-
- * APPLICATION CONNECTION INPUT QUEUE (*AAINPQ*).
- * - ALL OUTPUT ENQUEUED (IN THE *WBQ*) FOR THE USER IN
- * QUESTION HAS BEEN DISCARDED.
- *
- * NOTE THE PROCESSING IS DEFINED BY THE NVF/USER C-LAYER STATE
- * DIAGRAM.
- #
- #
- **** PROC NVFCBPA - XREF LIST.
- #
- XREF
- BEGIN
- PROC MOVE; # MOVE BLOCK OF MEMORY #
- PROC NVFASWN; # PROCESS CR/SWH/N SM #
- PROC NVFCFCE; # FIND CONNECTION TABLE ENTRY #
- PROC SSTATS; # ALLOCATE TABLE STACE #
- PROC SSTAQE; # ACCEPT QUEUE ENTRY #
- PROC SSTRTS; # REMOVE TABLE SPACE #
- PROC SSSAWR; # ACCEPT WORKLIST REQUEST #
- END
- #
- ****
- #
- ITEM I I; # LOOP VARIABLE #
- ITEM DTLOC I; # LOCAL DEVICE TYPE #
- ITEM NEWACN B; # TRUE IF ACN NOT FOUND IN ACN LIST #
- ITEM RORD I; # ORDINAL OF ENTRY LOCATED IN WBQ #
- ITEM AE I; # ORD OF MATCHED (OR NEW) ACN LIST ENTRY #
- ITEM ACNN I; # ACN FROM ENTRY WE ARE LOOKING FOR #
- ITEM SIZ I; # SIZE OF ENTRY BEING MOVED TO *OTQ* #
- ITEM OORD I; # ORDINAL OF ENTRY POSITION IN *OTQ* #
- ITEM SMID S:CTQSTAT; # SUBSCRIPT FOR GOTO SWITCH #
- SWITCH UCSWT:CTQSTAT
- LLCRITE: SITE, # CR/ITE #
- LLCRCB: SCB, # CR/CB #
- LLCRTRMN: STRMN, # CR/TRM/N #
- LLCRSWHN: SSWHN, # CR/SWH/N #
- LLCRACC: SACC, # CR/ACC #
- LLTCHAR: STCHAR, # TCH/TCAR #
- LLCRIAP: SIAP, # CR/IAP #
- LLCRRAP: SRAP, # CR/RAP #
- LLCRRCN: SRCN; # CR/RCN #
- #
- * IF NEWACN THEN IF CR/ITE/R THEN OK
- * ELSE ACN MUST EXIST.
- #
- ACNN =CRACN[0];
- IF ACNN NQ 0
- THEN
- NVFCFCE( ACNN, AE, NEWACN );
- SMID = WCB$SMID[0]; # GET INTERNAL SM IDENTIFIER #
- IF SFC[0] EQ ITE # IF CR/ITE DT IN DIFF FIELD #
- THEN
- DTLOC = CRITDT[0];
- ELSE
- DTLOC = CRDT[0];
- GOTO UCSWT[SMID];
- LLCRRCN:
- LLCRITE:
- SSTATS( P<ACN>, ACNLSIZ$ );
- ACN$WORD0[AE] = 0;
- ACN$STATE[AE] = ACNST"CREATE";
- IF SMID EQ CTQSTAT"SITE"
- THEN
- ACN$ABL[AE] = CRITABL[0];
- ELSE
- ACN$ABL[AE] = CRABL[0];
- ACN$ABN[AE] = 1;
- ACN$DBZ[AE] = 500;
- ACN$ACN[AE] = CRACN[0];
- ACN$WORD1[AE] = 0;
- #
- * CHECK THE DEVICE TYPE OF THE INPUT SM. IF DEVICE TYPE
- * IS FOR A-A TYPE CONNECTION, SEND TO A-A INPUT QUEUE.
- * OTHERWISE, TO THE T-A INPUT QUEUE.
- #
- IF DTLOC EQ DT$INTA OR
- DTLOC EQ DT$INTE
- THEN
- SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF);
- ELSE
- SSTAQE(P<TAINPQ>,WCBUF,ABHBUF,MSGBUF);
- GOTO ENDTAS;
- LLCRCB:
- IF ACNN NQ 0
- THEN
- BEGIN # CONNECTION BELONGS TO NVF #
- IF ACN$STATE[AE] EQ ACNST"ACTIVE"
- OR ACN$STATE[AE] EQ ACNST"CLEARI"
- OR ACN$STATE[AE] EQ ACNST"SWTPEND"
- OR ACN$STATE[AE] EQ ACNST"BRKCMD"
- OR ACN$STATE[AE] EQ ACNST"TRMPEND"
- THEN
- BEGIN
- RORD = 0; # MUST DISCARD ANY WAITING OUTPUT #
- FOR I = 1 STEP 1 UNTIL ACN$WBCNT[AE]
- DO
- BEGIN
- FOR RORD = RORD STEP WBQ$ESIZE[RORD]
- WHILE WBQ$ABHACN[RORD] NQ ACNN
- DO
- BEGIN END # FIND ORD OF ENTRY TO DELETE #
- SIZ = WBQ$ESIZE[RORD]; # SIZE OF ENTRY TO DELETE #
- SSTRTS( P<WBQ>, RORD, SIZ ); # DELETE ENTRY #
- END
- ACN$WBCNT[AE] = 0;
- END
- IF ACN$STATE[AE] EQ ACNST"TRMPEND"
- OR ACN$STATE[AE] EQ ACNST"SWTPEND"
- THEN
- BEGIN # FIND AND SEND CR/TRM OR DELETE CR/SWH #
- FOR RORD = RORD STEP WBQ$ESIZE[RORD]
- WHILE (WBQ$ABHACN[RORD] NQ 0 OR WBQ$CRSACN[RORD] NQ ACNN)
- AND (RORD LS WBQLNGTH )
- DO
- BEGIN END # FIND ORD OF ASYNCHRONOUS ENTRY #
- IF RORD LS WBQLNGTH # CR/SWH OR CR/TRM FOUND IN WBQ #
- THEN
- BEGIN
- SIZ = WBQ$ESIZE[RORD]; # SIZE OF ENTRY TO BE PROCESSED #
- IF ACN$STATE[AE] EQ ACNST"TRMPEND"
- THEN
- BEGIN
- OORD = OTQLNGTH;
- SSTATS( P<OTQ>, SIZ );
- MOVE( SIZ, WBQ[RORD], OTQ[OORD] );
- IF OORD EQ 0
- THEN
- SSSAWR( WWDF"SACNI" );
- ACN$STATE[AE] = ACNST"ENDED";
- END
- SSTRTS( P<WBQ>, RORD, SIZ );
- END
- END
- IF ACN$STATE[AE] EQ ACNST"ACTIVE"
- OR ACN$STATE[AE] EQ ACNST"CLEARI"
- OR ACN$STATE[AE] EQ ACNST"SWTPEND"
- OR ACN$STATE[AE] EQ ACNST"BRKCMD"
- OR ACN$STATE[AE] EQ ACNST"BRKOUT"
- OR ACN$STATE[AE] EQ ACNST"SWSTART"
- THEN
- BEGIN
- IF DTLOC EQ DT$INTA OR
- DTLOC EQ DT$INTE
- THEN
- SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF); # A-A INPUT #
- ELSE
- SSTAQE(P<TAINPQ>,WCBUF,ABHBUF,MSGBUF); # T-A INPUT #
- ACN$STATE[AE] = ACNST"BROKEN";
- END
- END
- ELSE
- BEGIN # CR/CB FOR CONNECTION TO OTHER APPL #
- IF DTLOC EQ DT$INTA OR
- DTLOC EQ DT$INTE
- THEN
- SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF); # A-A INPUT #
- ELSE
- SSTAQE(P<TAINPQ>,WCBUF,ABHBUF,MSGBUF); # T-A INPUT #
- END
- GOTO ENDTAS;
- LLCRSWHN:
- IF DTLOC EQ DT$INTA OR # IF A-A CONNECTION, #
- DTLOC EQ DT$INTE # ADDITIONAL PAAC #
- THEN # PROCESSING ID NEEDED#
- BEGIN
- NVFASWN(ACNN); # PROCESS CR/SWH/N #
- END
- SSTRTS(P<ACN>, AE*ACNLSIZ$, ACNLSIZ$);
- GOTO ENDTAS;
- LLCRTRMN:
- SSTRTS( P<ACN>, AE*ACNLSIZ$, ACNLSIZ$ );
- GOTO ENDTAS;
- LLCRACC:
- IF DTLOC EQ DT$INTA OR
- DTLOC EQ DT$INTE
- THEN
- SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF); # A-A INPUT #
- ELSE
- SSTAQE(P<TAINPQ>,WCBUF,ABHBUF,MSGBUF); # T-A INPUT #
- GOTO ENDTAS;
- LLTCHAR:
- IF ACN$STATE[AE] EQ ACNST"ACTIVE"
- OR ACN$STATE[AE] EQ ACNST"BRKOUT"
- OR ACN$STATE[AE] EQ ACNST"CLEARI"
- OR ACN$STATE[AE] EQ ACNST"BRKCMD"
- THEN
- SSTAQE( P<TAINPQ>, WCBUF, ABHBUF, MSGBUF );
- GOTO ENDTAS;
- LLCRIAP:
- LLCRRAP:
- #
- * IF THE INCOMING SM IS A CR/IAP/R, CHECK IF ACN EXISTS. IF SO, THEN
- * A REPEAT SM SEEN. FLUSH THE CR/SWH/R SM IN THE WAITING BLOCK QUEUE.
- * IF PAAC EXISTS, CHECK STATE OF ACN.
- * IF THE STATE IS "SWITCH PENDING", THEN THE CR/SWH/R SM IN THE
- * WAITING BLOCK QUEUE MUST BE FLUSHED AND THE STATE OF THE ACN SET
- * TO "CREATE".
- #
- #
- IF AN INCOMING CR/RAP/R SM, SET UP ACN AND SEND TO AAINPQ.
- #
- IF NEWACN
- THEN
- BEGIN
- SSTATS(P<ACN>,ACNLSIZ$);
- ACN$WORD0[AE] = 0;
- ACN$WORD1[AE] = 0;
- ACN$ACN[AE] = CRACN[0];
- END
- ELSE
- BEGIN
- #
- ACN EXISTS, MUST BE A REPEAT CR/IAP/R SM.
- CHECK STATE FOR "SWITCH PENDING".
- IF SO, FIND CR/SWH/R SM FOR THIS ACN AND DISPOSE OF.
- #
- IF ACN$STATE[AE] EQ ACNST"SWTPEND"
- THEN
- BEGIN
- RORD = 0;
- FOR RORD = RORD STEP WBQ$ESIZE[RORD] WHILE
- WBQ$CRSACN[RORD] NQ ACNN OR
- WBQ$ABHACN[RORD] NQ 0
- DO
- BEGIN
- END
- SIZ = WBQ$ESIZE[RORD];
- SSTRTS(P<WBQ>,RORD,SIZ);
- END
- END
- #
- SET NEW ACN STATE AND SEND CR/XXX AS PROTOCOL EVENT TO AAINPQ.
- #
- ACN$STATE[AE] =ACNST"CREATE";
- SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF);
- GOTO ENDTAS;
- ENDTAS:
- END # NVFCBPS #
- TERM
cdc/nos2.source/nam5871/nvfcbpa.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator