cdc:nos2.source:nam5871:ipispcr
Table of Contents
IPISPCR
Table Of Contents
- [00003] PROC IPISPCR
- [00005] IPISPCR - PROCESS CON/REQ/R SUPERVISORY MESSAGE
- [00045] PROC IPIAIPA
- [00046] PROC IPIDOSM
- [00047] PROC IPUMCLR
- [00048] PROC MESSAGE
Source Code
- IPISPCR.txt
- *DECK IPISPCR
- USETEXT TEXTIPL
- PROC IPISPCR;
- *CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992.
- # TITLE IPISPCR - PROCESS CON/REQ/R SUPERVISORY MESSAGE #
- BEGIN # IPISPCR #
- #
- **** IPISPCR PROCESS CON/REQ/R SUPERVISORY MESSAGE
- *
- * THIS PROCEDURE PROCESSES A CON/REQ/R SUPERVISORY MESSAGE.
- *
- * PROC IPISPCR
- *
- * ENTRY P<ABH> = PTR TO INPUT APPLICATION BLOCK HEADER (*IABH*).
- * CONABN = 0 = NEW CONNECTION REQUEST
- * <> 0 = RESPONSE TO CON/ACRQ
- * P<APSM> = PTR TO INPUT SUPERVISORY MESSAGE (*INPBUF*).
- * NUMACN = COUNT OF CURRENT OPEN CONNECTIONS.
- *
- * EXIT NUMACN = COUNT OF CURRENT OPEN CONNECTIONS.
- * ACN ENTRY CREATED
- *
- * METHOD
- *
- * TREAT THE REQUEST AS A NAM PROTOCOL ERROR BASED ON THE FOLLOWING:
- *
- * 1) ABN IS OUT OF RANGE.
- * 2) ACN VALUE OUT OF RANGE.
- * 3) CONNECTION NOT DT INTER-HOST.
- * 4) ACN ENTRY ALREADY IN USE.
- *
- * FOR A VALID CONNECTION REQUEST:
- *
- * 1) CREATE THE APPLICATION CONNECTION ENTRY.
- * 2) INCREMENT THE NUMBER OF ACTIVE CONNECTIONS.
- * 3) SEND A CON/REQ/N SUPERVISORY MESSAGE.
- #
- #
- **** PROC IPISPCR - XREF LIST
- #
- XREF
- BEGIN
- PROC IPIAIPA; # ABORT THE IP APPLICATION #
- PROC IPIDOSM; # DISPATCH OUTPUT SUPERVISORY MESSAGES #
- PROC IPUMCLR; # MEMORY CLEAR #
- PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
- END
- #
- **
- #
- CONTROL EJECT;
- #
- **** START MAIN PROCEDURE
- #
- #
- **** VALIDATE THE CONNECTION REQUEST.
- #
- IF CONABN [0] GR CONNECTABN$
- THEN
- BEGIN # ABN OUT OF RANGE #
- IPIAIPA (NCONREQ$);
- RETURN;
- END
- IF (COND [0] NQ DT$INTE)
- THEN
- BEGIN # NOT APP/APP INTER CONNECT #
- IPIAIPA (NCONREQ$);
- RETURN;
- END
- CURACN = CONACN [0]; # SET ACN ENTRY INDEX TO ABN #
- IF (CURACN GR MAXACN$) OR (CURACN LS MINACN$)
- THEN
- BEGIN # INVALID ACN RECEIVED #
- IPIAIPA (NCONREQ$);
- RETURN;
- END
- IF (ACN$STATE [CURACN] NQ S"IDLE") AND
- (ACN$STATE [CURACN] NQ S"CLOSED")
- THEN
- BEGIN # INVALID CONNECTION STATE #
- IPIAIPA (NCONREQ$);
- RETURN;
- END
- #
- **** CREATE THE APPLICATION CONNECTION ENTRY.
- *
- #
- IPUMCLR (LOC (ACN$WORD0 [CURACN]), ACNSIZE$);
- ACN$ACN [CURACN] = CURACN; # STORE CONNECTION NUMBER #
- ACN$STATE [CURACN] = S"CONNECTED";# STORE CURRENT CONNECT STATE #
- ACN$CONNECT [CURACN] = TRUE; # SOCKET CONNECTED TO NAM #
- ACN$ABN [CURACN] = 1; # STORE APPLICATION BLOCK NO #
- ACN$DBZ [CURACN] = CONDBZ[0]; # STORE DOWNLINE BLOCK SIZE #
- ACN$ABL [CURACN] = CONABL[0]; # STORE APPLICATION BLOCK LIMIT #
- ACN$BUFFER [CURACN] = LOC(QUE$BUF [0, CURACN]); # INPUT BUF LOC #
- ACN$BLOCK [CURACN] = TRUE; # DEFAULT BLOCKING TRUE #
- ACN$WAITIME [CURACN] = BLOCKWAIT$;# DEFAULT BLOCK TIME #
- IF CONABN [0] EQ CONNECTABN$
- THEN
- BEGIN # SAVE ACN FOR FC/INIT VERIFY #
- ISS$ACN [0] = CONACN [0];
- END
- #
- **** INCREMENT THE NUMBER OF ACTIVE CONNECTIONS.
- *
- #
- NUMACN = NUMACN + 1;
- #
- **** SEND A CON/REQ/N SUPERVISORY MESSAGE.
- *
- #
- P<APSM> = LOC(OUTBUF); # BASE SUPERVISORY MESSAGE PTR #
- SPMSG0 [0] = 0; # CLEAR FIRST WORD #
- RC [0] = 0; # STORE REASON CODE #
- CONACN [0] = CURACN; # SET CONNECTION NUMBER #
- CONNXP [0] = TRUE; # SET NO TRANSPARENT DATA FLAG #
- CONACT [0] = CT8ASCII; # SET CHARACTER TYPE EXPECTED #
- CONALN [0] = DATA$; # ALL CONNECTIONS ON LIST DATA$ #
- IPIDOSM (CONREQN,LCORQR); # FORMAT AND SEND CON/REQ/N SM #
- RETURN; # RETURN TO CALLER #
- END # IPISPCR #
- TERM
cdc/nos2.source/nam5871/ipispcr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator