*DECK IPISPFI USETEXT TEXTIPL PROC IPISPFI; *CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992. # TITLE IPISPFI - PROCESS FC/INIT SUPERVISORY MESSAGE. # BEGIN # IPISPFI # # **** IPISPFI PROCESS FC/INIT SUPERVISORY MESSAGE. * * THIS PROCEDURE PROCESSES A FC/INIT SUPERVISORY MESSAGE. * * PROC IPISPFI * * ENTRY P = PTR TO THE INPUT SUPERVISORY MESSAGE (*INBUF*). * * EXIT P = PTR TO OUTPUT SUPERVISORY MESSAGE (*OUTBUF*). * ISS$STATUS = SET TO *OK* IF ACN MATCH. * ACN$STATTE = SET TO *OPEN*. * * METHOD IF THE CONNECTION STATE IS NOT *CONNECTED* OR *CLOSING*, * THEN, TREAT IT AS A NAM PROTOCOL ERROR. * * IF THE CONNECTION STATE IS *CONNECTED*, CHANGE THE ACN * STATE TO ACTIVE AND SEND THE FC/INIT/N SUPERVISORY * MESSAGE. * * IF THE CONNECTION STATE IS *CLOSING*, THEN IGNORE THE * MESSAGE. * # # **** PROC IPISPFI - XREF LIST # XREF BEGIN PROC IPIAIPA; # ABORT THE IP APPLICATION # PROC IPIDOSM; # DISPATCH OUTPUT SUPERVISORY MESSAGE # END # ** # CONTROL EJECT; # **** START MAIN PROCEDURE # CURACN = FCACN [0]; # **** IF THE CONNECTION STATE IS NOT *CONNECTED* OR *CLOSING* THEN * TREAT AS A NAM PROTOCOL ERROR. # IF (ACN$STATE [CURACN] NQ S"CONNECTED") AND (ACN$STATE [CURACN] NQ S"CLOSING") THEN BEGIN IPIAIPA (NFCINIT$); RETURN; END # **** IF CONNECT STATE IS *CONNECTED*, SEND FC/INIT/N SUPERVISORY * MESSAGE AND SET THE CONNECTION STATE TO *OPEN*. IF APPLICATION * INITIATED CONNECTION, UPDATE THE SOCKET STATUS ENTRY FOR IPINITH. # IF ACN$STATE [CURACN] EQ S"CONNECTED" THEN BEGIN IF ISS$ACN [0] EQ CURACN THEN BEGIN # APPLICATION INIT CONNECTION # ISS$STATUS [0] = SOCKSTAT"OK"; END ACN$STATE [CURACN] = S"OPEN"; # CONNECTION STATE NOW *OPEN* # P = LOC (OUTBUF); # BASE SUPERVISORY MESSAGE PTR # SPMSG0[0] = 0; # CLEAR FIRST WORD # FCACN [0] = CURACN; # SET CONNECTION NUMBER # IPIDOSM (FCINITN, LFCINTN); # FORMAT AND SEND FC/INIT/N SM # END RETURN; # RETURN TO CALLER # END # IPISPFI # TERM