*DECK CSSAED USETEXT TEXTCS; USETEXT TEXTSS; USETEXT TXCMDCS; USETEXT TXTAPSS; USETEXT TXTSUSS; USETEXT TXTSMCS; PROC CSSAED; # TITLE CSSAED - ACTION END COMMAND # BEGIN # CSSAED # # ** CSSAED - ACTION END COMMAND. * * C. BRION 82/05/06. * * THIS PROCEDURE PROCESSES THE END, BYE, HELLO, LOGIN, LOGOUT, * OR GOODBYE COMMANDS. * * CSSAED * * ENTRY * 1. HDRCMD[0] = COMMAND HEADER WORD. * 2. PARMS[0] = COMMAND BLOCK CONTAINING THE ORIGINAL TYPEIN * AND THE SYNTAX PARAMETER LIST. * * EXIT * 1. IF NOP: * A. CON/END/R TO THE CONNECTION TRAFFIC QUEUE * B. IF CONTROLLING NOP -- CTRL/OFF TO THE EVENT QUEUE. * 2. IF HOP: * TERMINAL TEXT TO THE CONNECTION TRAFFIC QUEUE * INDICATING ILLEGAL COMMAND. # # **** PROC CSSAED XREF LIST # XREF BEGIN PROC SSBTBW; # SS-TEST BIT IN WORD # PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY # END # **** # ITEM OORD U; # OPERATOR ORDINAL # ITEM DVAR; ITEM I U; # LOOP INDUCTION VARIABLE # ITEM TNAME C(10); # TERMINAL NAME # ITEM BEGSYIX U; # START INDEX OF SYNTAX LIST# ITEM FINSYIX U; # FINAL INDEX OF SYNTAX LIST# ITEM NAPFLAG B; # NEXT APPL PRESENT FLAG # ITEM NAPINDX U; # INDEX LOC OF NAP PARAMETER# ITEM RUNNING B; # OLD RUNNING FLAG # # * FLG$WORD - BASED ARRAY THAT POINTS TO THE FLAG WORD INDICATING * OPERATORS RUNNING ONLINE DIAGNOSTICS. # BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$); BEGIN ITEM FW$WORD I(00,00,60); END # * RESCMD - COMMAND RESTRICTED MESSAGE. # ARRAY RESCMD [00:00] S(4); BEGIN ITEM RES$TXT C(00,00,20) = ["COMMAND RESTRICTED T"]; ITEM RES$TXT1 C(02,00,15) = ["O NPU OPERATORS"]; ITEM RES$ZERO U(03,30,30)= [0]; END OORD = HDR$OPORD[0]; # SET OCB ORDINAL # # * IF HOP OPERATOR ENTERED COMMAND, NOT ALLOWED. SEND ERROR MSG. # IF OC$TYPE[OORD] EQ OPTYP"HOP" THEN BEGIN ABHADR[1] = OORD; WCB$SMID[1] = SMID"TTEXT"; WCB$WC[1] = 6; WCB$IAF[1] = TRUE; SSTAQE(P,WCBUF[1],ABH[1],RESCMD[0]); GOTO ENDEXIT; END # * NPU OPERATOR ENTERED COMMAND. SET UP THE WORD COUNT WORD AND ABH * WORD OF THE OUTGOING OVERLAY/TM SM THAT WILL TERMINATE ANY TEST * ON ANY NPU THAT THE ORIGIN OPERATOR MAY HAVE IN PROGRESS. * * FOR EACH NPU THAT HAS THE ORIGIN OPERATOR AS THE CURRENT OVERLAY * OPERATOR, SEND THE OVERLAY/TM SM TO TERMINATE THE TEST. * IF THE OPERATOR HAS REQUESTED A CONNECTION TO OLD AND HAS YET TO * BE CONFIRMED, SET THE CURRENT OVERLAY OPERATOR OF THE NPUCB TO AN * OUT OF RANGE VALUE SO AS TO INTERLOCK THE NPU UNTIL THE RESPONSE * TO THE REQUEST IS RECEIVED. # WCB$WORD[1] = 0; ABHWORD[1] = 0; PFCSFC[1] = OLDTM; OLDDO[1] = OORD; ABHABT[1] = APPSUP; ABHBT[1] = APPSUP; ABHACT[1] = ACTCSNP$; ABHTLC[1] = 2; WCB$WC[1] = 3; FOR I = 0 STEP 1 WHILE I LS CSNPCNT DO BEGIN P = LOC(NPU$OVFLGS[I]); SSBTBW(FLG$WORD,OORD,RUNNING); IF RUNNING THEN BEGIN ABHDN[1] = NPU$NID[I]; ABHSN[1] = NPU$HID[I]; SSTAQE(P,WCBUF[1],ABH[1],CSSM[1]); END END # * SEARCH THE NPUCB-S AND FOR EACH NPU THAT THIS OPERATOR CONTROLS, * SEND AN EVENT INDICATING LOSE OF CONTROL, CLEAR THE CONTROLLING * NOP FIELD, AND IF THERE IS AN OPERATOR WITH AUTO CONTROL STATUS, * THEN ASSIGN THAT OPERATOR CONTROL OF THE NPU. # IF CSACNOP EQ OORD THEN BEGIN CSACNOP = 0; END FOR I=0 STEP 1 WHILE I LS CSNPCNT DO BEGIN IF NPU$STAT[I] EQ SUPSTAT"SUP" AND NPU$CNOP[I] EQ OORD THEN BEGIN WCB$WORD[1] = 3; WCB$SMID[1] = SMID"CTRLOFF"; ABHSN[1] = I; TNAME = OC$TNAM[OORD]; SSTAQE(P,WCBUF[1],ABH[1],TNAME); NPU$CNOP[I] = 0; IF CSACNOP NQ 0 THEN BEGIN NPU$CNOP[I] = CSACNOP; WCB$SMID[1] = SMID"CTRLON"; SSTAQE(P,WCBUF[1],ABH[1],TNAME); END END END # * IF THE COMMAND IS END, SEARCH THE SYNTAX LIST OF PARMS FOR THE * NEXT APPLICATION NAME (NAP). IF PRESENT, INSERT INTO THE CON/ * END/R PROTOCOL RESPONSE. # IF HDR$VERB[0] EQ "END" THEN BEGIN BEGSYIX = HDR$TXWCNT[0] + 1; FINSYIX = HDR$TXWCNT[0] + HDR$SPCNT[0]; NAPFLAG = FALSE; FOR I = BEGSYIX STEP 1 WHILE (I LS FINSYIX AND NOT NAPFLAG) DO BEGIN IF PAR$PCODE[I] EQ "NAP" THEN BEGIN NAPINDX = I; NAPFLAG = TRUE; END END CONUANM[1] = 0; IF NAPFLAG THEN CONANM[1] = PAR$ELNAME[NAPINDX]; END ELSE # * NOT THE END COMMAND BUT ONE OF THE OTHERS. # BEGIN # * IF HELLO, SET NEXT APPLICATION NAME TO LOGIN, OTHERWISE SET TO * LOGOUT. # IF HDR$VERB[0] EQ "HEL" THEN CONANM[1] = "LOGIN "; ELSE CONANM[1] = "LOGOUT "; END # * SET UP CON/END/R PROTOCOL RESPONSE TO C LAYER. # WCB$SMID[1] = SMID"CONENDR"; WCB$WC[1] = LCONEN + 2; ABHADR[1] = OORD; SSTAQE(P,WCBUF[1],ABH[1],CSSM[1]); OC$TNAM[OORD] = " "; OC$UNAM[OORD] = " "; OC$NCNT[OORD] = 0; OC$CBPD[OORD] = FALSE; OC$NTO[OORD] = FALSE; OC$WORD2[OORD] = 0; ENDEXIT: DVAR = 1; END #CSSAED# TERM