*DECK QTSUP USETEXT AIPDEF USETEXT QTRMBUF USETEXT QTRMCOM USETEXT QTRMNIT PROC QTSUP(SMC,WSA); *IF DEF,IMS # *1DC QTSUP * * 1. PROC NAME AUTHOR DATE * QTSUP E. GEE 11/01/84 * * 2. FUNCTION DESCRIPTION. * SEND ASYNCHRONOUS SUPERVISORY MESSAGES TO NAM. * * 3. METHOD USED. * IF QTOPEN NOT CALLED YET, * CALL NP$ERR TO ISSUE DAYFILE MESSAGE AND ABORT APP. * IF SUPERVISORY MESSAGE CODE VALID, * INIT RETURN CODE FIELD IN NIT TO QTSUP REJECT VALUE. * CREATE APPLICATION BLOCK HEADER WORD. * JUMP ACCORDING TO THE SUPERVISORY MESSAGE CODE. * * 0: IF SIZE OF SUP MSG NOT SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (SIZE OF SUP MSG SPECIFIED), * IF SIZE OF SUP MSG TOO LARGE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (SIZE OF SUP MSG OKAY), * IF SUP MSG BEING SENT REQUIRES RESPONSE AND CAN BE * SENT BY CALLING QTSUP WITH OTHER SUPERVISORY * MESSAGE CODE, * ABORT APP. * ELSE (OKAY FOR APP TO SEND THIS SUP MSG), * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * CREATE FRAGMENT ARRAY FOR SUP MSG. * CALL NETPUTF TO SEND SUP MSG TO NAM. * * 1: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (NIT ENTRY IS IN USE), * IF CONNECTION IN WRONG STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND FC/BRK), * CREATE FC/BRK SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 2: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (NIT ENTRY IS IN USE), * IF BAD CHARACTER SET VALUE SPECIFIED FOR DATA, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (GOOD CHAR SET VALUE SPECIFIED FOR DATA), * IF BAD CHARACTER SET VALUE SPECIFIED FOR SYNC SM, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND DC/CICT SUP MSG), * CREATE DC/CICT SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 3: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * CREATE DC/TRU SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 4: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (NIT ENTRY IS IN USE), * IF CONNECTION IN WRONG STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND INTR/APP), * CREATE INTR/APP SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * IF DEVICE CONNECTION, * IF CURRENT BLOCK LIMIT IS NOT ZERO * CREATE TO/MARK SYNCHRONOUS SUPERVISORY MESSAGE. * CALL QTTIP TO SEND SUP MSG TO NAM. * * 5: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * CREATE LST/FDX SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 6: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (NIT ENTRY IS IN USE), * IF PARM-FLG1 IS NOT SET CORRECTLY, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND LST/HDX), * CREATE LST/HDX SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 7: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * CREATE LST/OFF SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 8: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * CREATE LST/ON SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 9: IF K-DISPLAY IS NOT ASSIGNED TO APPLICATION, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (K-DISPLAY IS ASSIGNED TO APP), * IF NO SIZE SPECIFED FOR DISPLAY DATA, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (SIZE SPECIFIED FOR DISPLAY DATA), * IF SPECIFIED SIZE IS TOO LARGE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (SPECIFIED SIZE IS OKAY), * IF PARM-FLG1 NOT SET TO GOOD VALUE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND HOP/DIS SUP MSG), * CREATE FRAGMENTED ARRAYS FOR SUP MSG. * CREATE HOP/DIS SUP MSG. * CALL NETPUTF TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 10: IF APPLICATION DOES NOT SUPPORT K-DISPLAY, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (APPLICATION SUPPORTS K-DISPLAY), * IF NO SIZE SPECIFIED FOR DAYFILE MESSAGE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (SIZE SPECIFIED FOR DAYFILE MESSAGE), * IF SPECIFED SIZE IS TOO LARGE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (GOOD SIZE SPECIFIED FOR DAYFILE MESSAGE), * CREATE FRAGMENTED ARRAYS FOR SUP MSG. * CREATE HOP/LG SUP MSG. * CALL NETPUTF TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 11: IF APPLICATION DOES NOT SUPPORT K-DISPLAY, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (APPLICATION SUPPORTS K-DISPLAY), * IF OPERATOR NOT IGNORING THIS APPLICATION, * CREATE HOP/ALT SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 12: IF K-DISPLAY IS NOT ASSIGNED TO APPLICATION, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (K-DISPLAY IS ASSIGNED TO APP), * IF PARM-FLG1 NTO SET TO GOOD VALUE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND HOP/DAY SUP MSG), * CREATE HOP/DAY SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 13: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF PARM-FLG1 NTO SET TO GOOD VALUE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND DC/STMR SUP MSG), * CREATE DC/STMR SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 14: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF PRU INTERFACE IS NOT ALLOWED ON THIS DEVICE TYPE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (PRU INTERFACE ALLOWED ON THIS DEVICE TYPE), * IF CONNECTION STATE IS NOT NORMAL, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION IS IN CORRECT STATE), * IF DOWNLINE BLOCKS OUTSTANDING, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (NOT WAITING FOR ANY BACKS), * IF INVALID PRU SIZE SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERR CODE . * ELSE (OKAY TO SEND PRU/ON/R SUP MSG), * CREATE PRU/ON/R SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * UPDATE CONNECTION STATE IN NIT. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 15: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF CONNECTION STATE IS NOT PRU CONNECTION STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION IS IN RIGHT STATE), * IF NO SIZE SPECIFIED FOR SET/DEV TEXT, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (SIZE WAS SPECIFIED FOR SET/DEV TEXT), * IF SPECIFIED SIZE IS TOO LARGE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (VALID SIZE WAS SPECIFIED FOR SET/DEV TEXT), * CREATE SET/DEV SUP MSG. * CREATE FRAGMENTED ARRAYS FOR SUP MSG. * CALL NETPUTF TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 16: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF CONNECTION STATE IS NOT PRU CONNECTION STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION IS IN RIGHT STATE), * IF NO SIZE SPECIFIED FOR SET/FILE TEXT, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (SIZE WAS SPECIFIED FOR SET/FILE TEXT), * IF SPECIFIED SIZE IS TOO LARGE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (VALID SIZE WAS SPECIFIED FOR SET/FILE TEXT), * CREATE SET/FILE SUP MSG. * CREATE FRAGMENTED ARRAYS FOR SUP MSG. * CALL NETPUTF TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 17: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF CONNECTION STATE IS NOT PRU CONNECTION STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION IS IN RIGHT STATE), * IF NO SIZE SPECIFIED FOR OFC/DATA TEXT, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (SIZE WAS SPECIFIED FOR OFC/DATA TEXT), * IF SPECIFIED SIZE IS TOO LARGE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (VALID SIZE WAS SPECIFIED FOR OFC/DATA TEXT), * CREATE OFC/DATA/R SUP MSG. * CREATE FRAGMENTED ARRAYS FOR SUP MSG. * CALL NETPUTF TO SEND SUP MSG TO NAM. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 18: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF CONNECTION STATE IS NOT INITIAL PRU STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND OFC/STRT SUPERVISORY MESSAGE), * CREATE OFC/STRT/R SUP MSG. * CREATE FRAGMENTED ARRAYS FOR SUP MSG. * CALL NETPUTF TO SEND SUP MSG TO NAM. * UPDATE CONNECTION STATE IN NIT. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 19: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF CONNECTION STATE IS NOT STOPPED PRU STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND RESTART PRU TRAFFIC), * IF NETWORK NEEDS TO BE RESTARTED, * CREATE OFC/RSTR SUP MSG. * ELSE (ONLY PIP NEEDS TO BE RESTARTED), * CREATE OFC/RSM SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * UPDATE CONNECTION STATE IN NIT. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 20: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF CONNECTION STATE IS NOT IN ACTIVE PRU STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND STOP PRU TRAFFIC), * CREATE OFC/STP/R SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * UPDATE CONNECTION STATE IN NIT. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * 21: IF BAD CONNECTION NUMBER WAS SPECIFIED, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (CONNECTION NUMBER IS OKAY), * IF CONNECTION STATE IN PRU CONNECTION STATE, * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * ELSE (OKAY TO SEND ABORT PRU TRAFFIC), * CREATE OFC/ABT/R SUP MSG. * CALL NETPUT TO SEND SUP MSG TO NAM. * UPDATE CONNECTION STATE IN NIT. * SET RETURN CODE IN NIT TO NORMAL COMPLETION. * * ELSE (INVALID SUPERVISORY MESSAGE CODE), * SET SEC-RETURN-CODE FIELD IN NIT TO ERROR CODE. * * 4. ENTRY CONDITIONS. * SMC COMMAND CODE * WSA ADDR OF TEXT FOR SOME OF THE SUP MSG * * 5. NORMAL EXIT CONDITIONS. * NIT$RC NORMAL COMPLETION RETURN CODE * * 6. ABNORMAL EXIT CONDITIONS. * NIT$RC QTCMD REJECT RETURN CODE * NIT$S$RC REASON FOR QTCMD REJECTING CALL * * 7. COMDECKS AND SYMPL TEXT USED. * AIPDEF AIP DEFINITIONS * NP$CRT CDC COPYRIGHT * QTRMBUF QTRM SUP MSG BUFFER * QTRMCOM QTRM VARIABLES * QTRMNIT NIT * * 8. ROUTINES AND OVERLAYS CALLED. * CHKCN INTERNAL FUNCTION TO CHECK CONNECTION * NETPUT OUTPUT SUP MSG TO THE NETWORK * NETPUTF OUTPUT FRAGMENTED SUP MSG TO THE NETWORK * NP$ERR ISSUE ERROR MESSAGE AND ABORT APP * QTTIP SEND SYNCHRONOUS SUPERVISORY MESSAGE * * 9. DAYFILE MESSAGES OR OTHER IMPORTANT INFORMATION. * *** NETWORK APPLICATION ABORTED, RC = 77. *** * *** QTSUP: REQUEST INVALID BEFORE QTOPEN. *** * # *ENDIF # CONTROL DEFINITIONS # CONTROL PRESET; CONTROL PACK; CONTROL DISJOINT; CONTROL INERT; CONTROL FASTLOOP; *CALL NP$CRT # INPUT VARIABLES # ITEM SMC ; # SUPERVISORY MESSAGE CODE # ITEM WSA ; # ADDR OF TEXT FOR SOME OF THE SUP MSGS # DEF ENDTAB # 7 #; # SIZE OF TABLE FOR CHECKING PFC/SFCS # BASED ARRAY QPFSFC[0:0] S(1); BEGIN ITEM QPFCSFC U(00,00,16); END ARRAY QPFCSFCTAB [0:ENDTAB]; BEGIN ITEM QTRSMFC U(00,00,16) = [CONEND, # 0 # CONACR, # 1 # FCBRK, # 2 # INTRAPP, # 3 # PRUON, # 4 # OFCDTA, # 5 # OFCSTP, # 6 # OFCABRT # 7 # ]; END # ROUTINES CALLED # XREF BEGIN PROC NETPUT; # OUTPUT SUP MSG TO THE NETWORK # PROC NETPUTF; # OUTPUT FRAGMENTED SUP MSG TO THE NETWORK# PROC NP$ERR; # DAYFILE ERROR MESSAGE AND ABORT APP # PROC QTTIP; # SEND SYNCHRONOUS SUPERVISORY MESSAGE # END XDEF BEGIN FUNC CHKCN B; # CHECK IF CONNECTION NUMBER IS VALID # END # LOCAL VARIABLES # DEF MINSMC#0#; # MINIMUM SUPERVISORY MESSAGE CODE # DEF MAXSMC#21#; # MAXIMUM SUPERVISORY MESSAGE CODE # ITEM ACN; # CONNECTION NO ASSOCIATED WITH SUP MSG # ITEM I; # NUMBER OF FRAGMENTS # ITEM INDEX; # LOOP INDEX # SWITCH SWTCH$SMC SMC$0,SMC$1,SMC$2,SMC$3,SMC$4,SMC$5,SMC$6, SMC$7,SMC$8,SMC$9,SMC$10,SMC$11,SMC$12,SMC$13, SMC$14,SMC$15,SMC$16,SMC$17,SMC$18,SMC$19, SMC$20,SMC$21; #**********************************************************************# CONTROL EJECT; # EXECUTABLE CODE BEGINS HERE # BEGIN IF NOT NETON$STATUS THEN # QTOPEN HAS NOT BEEN CALLED # BEGIN NP$ERR("77"); # ISSUE ERROR MESSAGE AND ABORT APP # END P = NIT$ADDR; # ADDRESS OF NETWORK INFORMATION TABLE # ACN = NIT$CON; # CONNECTION NUMBER FROM NIT # NIT$RC[0] = S"QTSUPREJ"; # INITIALIZE RETURN CODE TO QTSUP REJ # IF (SMC GQ MINSMC) AND (SMC LQ MAXSMC) THEN # VALID COMMAND CODE # BEGIN ABHWORD[0] = 0; # CLEAR APP BLOCK HEADER WORD # ABHABT[0] = APPCMD; # APP BLOCK TYPE FOR ASYNC SUP MSG # ABHACT[0] = CT60TRANS; # APP CHAR TYPE FOR ASYNC SUP MSG # SPMSG0[0] = 0; # CLEAR FIRST WORD OF SUP MSG BUFFER # SPMSG1[0] = 0; # CLEAR SECOND WORD OF SUP MSG BUFFER # GOTO SWTCH$SMC[SMC]; SMC$0: # SEND SUPERVISORY MESSAGE # BEGIN IF NIT$CTLC[0] EQ 0 THEN # NO SIZE SPECIFIED FOR SUP MSG # BEGIN NIT$S$RC[0] = S"NOSIZE"; # STORE REASON FOR BAD CALL # END ELSE # SIZE SPECIFIED FOR SUP MSG # BEGIN IF NIT$CTLC[0] GR 410 THEN # SIZE OF SUP MSG IS TOO LARGE # BEGIN NIT$S$RC[0] = S"BADSIZE"; # STORE REASON FOR BAD CALL # END ELSE # SIZE SPECIFIED FOR SUP MSG # BEGIN P = LOC(WSA);# SET SUPERVISORY MESSAGE TEMPLETE # # TO THE ACTUAL SUPERVISORY MSG # FOR INDEX = 0 STEP 1 UNTIL ENDTAB DO BEGIN IF QTRSMFC[INDEX] EQ QPFCSFC[0] THEN BEGIN NP$ERR("84"); # RESERVED PFCSFC USED # END END ABHTLC[0] = NIT$CTLC[0]; # SIZE OF SUPERVISORY MESSAGE # NOFRAG = (NIT$CTLC[0]+62)/63; # NUMBER OF FRAGMENTS # FOR I = 0 STEP 1 UNTIL NOFRAG-1 DO # CREATE FRAGMENT ARRAY FOR SUP MSG # BEGIN FRAGSZ0[I] = 63; # SIZE OF FRAGMENT # FRAGAD0[I] = LOC(WSA) + I*63; # ADDRESS OF FRAGMENT # END NETPUTF(HEADER,NOFRAG,FRAG); # SEND SUP MSG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$1: # SEND FC/BRK SUP MSG # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER SPECIFIED # BEGIN IF NIT$STATE[ACN] NQ S"OK" THEN # CANNOT SEND FC/BRK AT THIS TIME # BEGIN NIT$S$RC[0] = S"BADSTATE"; # STORE REASON FOR BAD CALL # END ELSE # OKAY TO SEND FC/BRK SUP MSG # BEGIN ABHTLC[0] = LFCBRK; # LENGTH OF FC/BRK SUP MSG # PFCSFC[0] = FCBRK; # PFC/SFC VALUE FOR FC/BRK # RC[0] = NIT$SB$RC[0]; # REASON CODE FOR BREAK SUP MSG # FCACN[0] = ACN; # CONNECTION NUMBER TO RECEIVE FC/BRK # NETPUT(HEADER,SUP$MES); # SEND FC/BRK SUP MSG TO NAM # NIT$STATE[ACN] = S"FCBRK"; # NEW STATE FOR CONNECTION # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$2: # SEND DC/CICT SUP MSG # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER SPECIFIED # BEGIN IF (NIT$CHAR$SET[0] GR CT6DISPLAY) AND (NIT$CHAR$SET[0] NQ 10) AND (NIT$CHAR$SET[0] NQ 11) THEN # BAD CHARACTER SET VALUE SPECIFIED # BEGIN NIT$S$RC[0] = S"BADICT"; # STORE REASON FOR BAD CALL # END ELSE # CHARACTER SET VALUE WITHIN RANGE # BEGIN IF (ICTD[0] EQ CT6DISPLAY) AND # INITIAL ICT IS DIS CD # (NIT$CHAR$SET[0] NQ 0) AND ((NIT$DEVTYP[ACN] EQ DT$INTA) OR #INTRAHOST A-A CON # (NIT$DEVTYP[ACN] EQ DT$INTE)) # INTERHOST A-A CON # THEN BEGIN NIT$S$RC[0] = S"CCICT"; # CANNOT CHANGE ICT # END ELSE # OKAY TO CHANGE INPUT CHAR SET FOR DATA # BEGIN IF (NIT$PARMFLG1[0] NQ 0) AND (NIT$PARMFLG1[0] NQ CT8ASCII) AND (NIT$PARMFLG1[0] NQ CT12ASCII) THEN # BAD ICT FOR SYNC SUP MSG # BEGIN NIT$S$RC[0] = S"BADICTS"; # STORE REASON FOR BAD CAL# END ELSE # OKAY TO SEND DC/CICT SUP MSG # BEGIN ABHTLC[0] = LDC; # LENGTH OF DC/CICT SUP MSG # PFCSFC[0] = DCCICT; # PFC/SFC VALUE FOR DC/CICT # IF NIT$PARMFLG1[0] EQ 0 THEN # NO ICT SPECIFIED FOR SYNC SUP MSG # BEGIN IF NIT$SICT[ACN] EQ CT12ASCII THEN # PREVIOUS ICT WAS 12 BIT ASCII # BEGIN DCSCT[0] = TRUE; # SET FLAG FOR 12 BIT ASCII # END END ELSE # NEW ICT FOR SYNC SUP MSG SPECIFIED # BEGIN NIT$SICT[ACN] = NIT$PARMFLG1[0]; # SAVE ICT IN NIT# IF NIT$PARMFLG1[0] EQ CT12ASCII THEN # ICT FOR SYNC SUP MSG IS 12 BIT ASCII # BEGIN DCSCT[0] = TRUE; # SET FLAG FOR 12 BIT ASCII # END END IF NIT$CHAR$SET[0] EQ 0 THEN # NO ICT SPECIFIED FOR DATA # BEGIN DCACT[0] = ICTD[0]; # OLD INPUT CHARACTER TYPE # DCNXP[0] = ICTX[0]; # OLD TRANSPARENT DATA FLAG # END ELSE # NEW CHAR SET SPECIFIED FOR INPUT DATA # BEGIN NIT$ICT[ACN] = NIT$CHAR$SET[0]; # SAVE NEW ICT # DCACT[0] = NIT$PUTSET; # NEW INPUT CHAR TYPE # IF NIT$XPTSET[0] EQ 0 THEN # NO TRANSPARENT DATA DESIRED # BEGIN DCNXP[0] = TRUE; # NO TRANSPARENT DATA DESIRED # END END DCACN[0] = ACN; # CONNECTION NO TO RECEIVE DC/CICT # NETPUT(HEADER,SUP$MES); # SEND DC/CICT TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$3: # SEND DC/TRU SUP MSG # BEGIN IF (ACN EQ 0) OR ((ACN NQ 0) AND (CHKCN)) THEN # OKAY TO SEND DC/TRU SUP MSG # BEGIN ABHTLC[0] = LDC; # LENGTH OF DC/TRU SUP MSG # PFCSFC[0] = DCTRU; # PFC/SFC VALUE FOR DC/TRU # DCACN[0] = ACN; # CONNECTION NUMBER FOR DATA TRUNCATION # NETPUT(HEADER,SUP$MES); # SEND FC/BRK SUP MSG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$4: # SEND INTR/APP SUP MSG # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER SPECIFIED # BEGIN IF NIT$STATE[ACN] NQ S"OK" THEN # CANNOT SEND INTR/APP AT THIS TIME # BEGIN NIT$S$RC[0] = S"BADSTATE"; # STORE REASON FOR BAD CALL # END ELSE # OKAY TO SEND INTR/APP SUP MSG # BEGIN ABHTLC[0] = LINTR; # LENGTH OF INTR/APP SUP MSG # PFCSFC[0] = INTRAPP; # PFC/SFC VALUE FOR FC/BRK # RC[0] = NIT$SB$RC[0]; # REASON CODE FOR INTR SUP MSG # INTRACN[0] = ACN; # CONNECTION NO TO RECEIVE INTR/APP # NETPUT(HEADER,SUP$MES); # SEND INCT/APP SUP MSG TO NAM # # SEND TERMINATE OUTPUT MARKER IF TERMINAL CONNECTION # NIT$STATE[ACN] = S"INTRRSP"; # NEW STATE FOR CONNECTION # IF NIT$DEVTYP[ACN] EQ 0 THEN # TERMINAL CONNECTION # BEGIN IF NIT$C$ABL[ACN] NQ 0 THEN # OKAY TO SEND TO/MARK SUP MSG # BEGIN NIT$CHAR$SET[0] = CT8ASCII; # APPLICATION CHAR TYPE # NIT$CTLC[0] = LTOMARK; # LENGTH OF SUP MSG # SPMSG0[0] = 0; PFCSFC[0] = TOMARK; # PFC/SFC VALUE FOR TO/MARK # QTTIP(SUP$MES); # SEND SYNC SUP MSG # END ELSE # CANNOT SEND TO/MARK UNTIL RECEIVE FC/ACK# BEGIN NIT$STATE[ACN] = S"WTOMARK"; # CHANGE STATE # END END NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$5: # SEND LST/FDX SUP MSG # BEGIN IF (ACN EQ 0) OR ((ACN NQ 0) AND (CHKCN)) THEN # OKAY TO SEND LST/FDX SUP MSG # BEGIN ABHTLC[0] = LLST; # LENGTH OF LST/FDX SUP MSG # PFCSFC[0] = LSTFDX; # PFC/SFC VALUE FOR LST/FDX # LSTACN[0] = ACN; # CONNECTION NUMBER FOR FULL DUPLEX # NETPUT(HEADER,SUP$MES); # SEND LST/FDX SUP MSG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$6: # SEND LST/HDX SUP MSG # BEGIN IF (ACN EQ 0) OR ((ACN NQ 0) AND (CHKCN)) THEN # GOOD CONNECTION NUMBER SPECIFIED # BEGIN IF (NIT$PARMFLG1[0] NQ 0) AND (NIT$PARMFLG1[0] NQ 1) THEN # BAD VALUE SPECIFIED FOR PARM-FLG1 IN NIT# BEGIN NIT$S$RC[0] = S"BADDISF"; # STORE REASON FOR BAD CALL # END ELSE # GOOD VALUE SPECIFIED IN PARM-FLG1 IN NIT# BEGIN LSTDIS[0] = FALSE; # INITIAL ENABLE FOR LIST PROCESS # IF NIT$PARMFLG1[0] NQ 0 THEN # APP WANTS INITIAL LIST PROCESS DISABLED # BEGIN LSTDIS[0] = TRUE; # INITIAL DISABLE FOR LIST PROCESS # END ABHTLC[0] = LLST; # LENGTH OF LST/HDX SUP MSG # PFCSFC[0] = LSTHDX; # PFC/SFC VALUE FOR LSTHDX # LSTACN[0] = ACN; # CONNECTION NO TO GO TO HALF DUPLEX # NETPUT(HEADER,SUP$MES); # SEND LST/HDX SUP MSG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$7: # SEND LST/OFF SUP MSG # BEGIN IF CHKCN THEN # OKAY TO SEND LST/OFF SUP MSG # BEGIN ABHTLC[0] = LLST; # LENGTH OF LST/OFF SUP MSG # PFCSFC[0] = LSTOFF; # PFC/SFC VALUE FOR LST/OFF # LSTACN[0] = ACN; # CONNECTION NUMBER TO TURN LIST OFF # NETPUT(HEADER,SUP$MES); # SEND LST/OFF SUP MSG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$8: # SEND LST/ON SUP MSG # BEGIN IF CHKCN THEN # OKAY TO SEND LST/ON SUP MSG # BEGIN ABHTLC[0] = LLST; # LENGTH OF LST/ON SUP MSG # PFCSFC[0] = LSTON; # PFC/SFC VALUE FOR LST/ON # LSTACN[0] = ACN; # CONNECTION NUMBER TO TURN LIST ON # NETPUT(HEADER,SUP$MES); # SEND LST/ON SUP MSG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$9: # SEND HOP/DIS SUPERVISORY MESSAGE # BEGIN IF NOT KDISAS THEN # APP IS NOT ASSIGNED TO K-DISPLAY # BEGIN NIT$S$RC[0] = S"KNOTASS"; # STORE REASON FOR BAD CALL # END ELSE # APP SUPPORTS NAM K-DISPLAY # BEGIN IF NIT$CTLC[0] EQ 0 THEN # NO SIZE SPECIFIED FOR DISPLAY DATA # BEGIN NIT$S$RC[0] = S"NOSIZE"; # STORE REASON FOR BAD CALL # END ELSE # SIZE WAS SPECIFIED FOR DISPLAY DATA # BEGIN IF NIT$CTLC[0] GR 410 THEN # SPECIFIED SIZE IS TOO LARGE # BEGIN NIT$S$RC[0] = S"BADSIZE"; # STORE REASON FOR BAD CALL # END ELSE # SIZE SPECIFIED FOR DISPLAY DATA IS OKAY # BEGIN IF (NIT$PARMFLG1[0] NQ 0) AND (NIT$PARMFLG1[0] GQ 4) THEN # BAD VALUE SPECIFIED FOR PARM-FLG1 IN NIT# BEGIN NIT$S$RC[0] = S"BADINF"; # STORE REASON FOR BAD CALL# END ELSE # GOOD VALUE SPECIFIED IN PARM-FLG1 IN NIT# BEGIN HOPI[0] = FALSE; # INITIAL DISABLED FOR INPUT # IF (NIT$PARMFLG1[0] EQ 1) OR (NIT$PARMFLG1[0] EQ 3) THEN # APP WANTS INPUT ENABLED # BEGIN HOPI[0] = TRUE; # SET FLAG FOR INPUT ALLOWED # END IF (NIT$PARMFLG1[0] EQ 2) OR (NIT$PARMFLG1[0] EQ 3) THEN # DISPLAY DATA IS FOR RIGHT SCREEN # BEGIN HOPSCR[0] = TRUE; END ABHTLC[0] = NIT$CTLC[0] + 2; # LENGTH OF HOP/DIS # PFCSFC[0] = HOPDIS; # PFC/SFC VALUE FOR HOP/DIS # NOFRAG = (NIT$CTLC[0]+62)/63 + 2; # NUMBER OF FRAGS # FRAGSZ0[0] = 1; # SIZE OF FIRST FRAGMENT # FRAGAD0[0] = LOC(SUP$MES); # ADDR OF FIRST FRAGMENT # FOR I = 1 STEP 1 UNTIL NOFRAG - 2 DO # CREATE FRAGMENT ARRAY FOR SUP MSG # BEGIN FRAGSZ0[I] = 63; # SIZE OF FRAGMENT # FRAGAD0[I] = LOC(WSA) + (I-1)*63; # ADDR OF FRAG # END FRAGSZ0[NOFRAG-2] = NIT$CTLC[0] - (NOFRAG-3)*63; FRAGSZ0[NOFRAG-1] = 1; # SIZE OF LAST FRAGMENT # FRAGAD0[NOFRAG-1] = LOC(SUP$MES) + 1; # LAST FRAG ADR# NETPUTF(HEADER,NOFRAG,FRAG); # SEND HOP/DIS TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$10: # SEND HOP/LG SUPERVISORY MESSAGE # BEGIN IF NOT KDISPLAY THEN # APP DOES NOT SUPPORT K-DISPLAY # BEGIN NIT$S$RC[0] = S"KNOTSUP"; # STORE REASON FOR BAD CALL # END ELSE # APP SUPPORTS NAM K-DISPLAY # BEGIN IF NIT$CTLC[0] EQ 0 THEN # NO SIZE SPECIFIED FOR DAYFILE MSG # BEGIN NIT$S$RC[0] = S"NOSIZE"; # STORE REASON FOR BAD CALL # END ELSE # SIZE SPECIFIED FOR DAYFILE MESSAGE # BEGIN IF (NIT$CTLC[0] GR 8) THEN # SPECIFIED SIZE IS TOO LARGE # BEGIN NIT$S$RC[0] = S"BADSIZE"; # STORE REASON FOR BAD CALL # END ELSE # GOOD SIZE SPECIFIED FOR SUP MSG # BEGIN ABHTLC[0] = NIT$CTLC[0] + 1; # LENGTH OF HOP/LG # PFCSFC[0] = HOPLG; # PFC/SFC VALUE FOR HOP/LG # NOFRAG = 2; # NUMBER OF FRAGMENTS # FRAGSZ0[0] = 1; # SIZE OF FIRST FRAGMENT # FRAGAD0[0] = LOC(SUP$MES); # ADDR OF FIRST FRAGMENT # FRAGSZ0[1] = NIT$CTLC[0]; # SIZE OF SECOND FRAGMENT # FRAGAD0[1] = LOC(WSA); # ADDR OF SECOND FRAGMENT # NETPUTF(HEADER,NOFRAG,FRAG); # SEND HOP/LG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$11: # SEND HOP/ALT SUPERVISORY MESSAGE # BEGIN IF NOT KDISPLAY THEN # APP DOES NOT SUPPORT K-DISPLAY # BEGIN NIT$S$RC[0] = S"KNOTSUP"; # STORE REASON FOR BAD CALL # END ELSE # APP SUPPORTS NAM K-DISPLAY # BEGIN IF NOT IGNORE THEN # OPERATOR WANTS TO SEE HOP/ALT FROM APP # BEGIN ABHTLC[0] = LHOPALT; # LENGTH OF HOP/ALT SUP MSG # PFCSFC[0] = HOPALT; # PFC/SFC VALUE FOR HOP/ALT # NETPUT(HEADER,SUP$MES); # SEND LST/ON SUP MSG TO NAM # END NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$12: # SEND HOP/DAY SUPEVISORY MESSAGE # BEGIN IF NOT KDISAS THEN # APP IS NOT ASSIGNED TO K-DISPLAY # BEGIN NIT$S$RC[0] = S"KNOTASS"; # STORE REASON FOR BAD CALL # END ELSE # NAM K-DISPLAY IS ASSIGNED TO APP # BEGIN IF (NIT$PARMFLG1[0] NQ 0) AND (NIT$PARMFLG1[0] NQ 1) THEN # BAD VALUE SPECIFIED FOR PARM-FLG1 IN NIT# BEGIN NIT$S$RC[0] = S"BADDISF"; # STORE REASON FOR BAD CALL # END ELSE # GOOD VALUE SPECIFIED IN PARM-FLG1 IN NIT# BEGIN ABHTLC[0] = LHOPDAY; # LENGTH OF HOP/DAY SUP MSG # PFCSFC[0] = HOPDAY; # PFC/SFC VALUE FOR HOP/DAY # HOPDAYF[0] = NIT$PARMFLG1[0] EQ 1; # SET DAYFILING FLAG # NETPUT(HEADER,SUP$MES); # SEND HOP/DAY SUP MSG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$13: # SEND DC/STMR SUPERVISORY MESSAGE # BEGIN IF ( ACN EQ 0 ) OR ( (ACN NQ 0) AND (CHKCN ) ) THEN # OKAY TO SEND DC/STMR SUP MSG # BEGIN IF (NIT$PARMFLG1[0] NQ 0) AND (NIT$PARMFLG1[0] NQ 1) THEN # BAD VALUE SPECIFIED FOR PARM-FLG1 IN NIT# BEGIN NIT$S$RC[0] = S"BADDISF"; # STORE REASON FOR BAD CALL # END ELSE # GOOD VALUE SPECIFIED IN PARM-FLG1 IN NIT# BEGIN ABHTLC[0] = LDC; # LENGTH OF DC/STMR SUP MSG # PFCSFC[0] = DCSTMR; # PFC/SFC VALUE FOR DC/STMR # DCACN[0] = ACN; # CON NO FOR SETTING INACTIVITY TIMER # DCPERMT[0] = NIT$PARMFLG1[0] EQ 1; # PERM TIME CHNGE FLG# DCTIME[0] = WSA; # SET INACTIVITY TIMER VALUE # NETPUT(HEADER,SUP$MES); # SEND DC/STMR SUP MSG TO NAM # NIT$RC[0] = S"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$14: # SEND PRU/ON/R SUPERVISORY MESSAGE # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER WAS SPECIFIED # BEGIN IF NIT$DEVTYP[ACN] EQ DT$CONS OR # CONSOLE DEVICE # NIT$DEVTYP[ACN] EQ DT$INTA # INTRAHOST A-A # THEN # PRU INTERFACE NOT SUPPORTED FOR THIS DT # BEGIN NIT$S$RC[0] = NITSRTC"NOPRUSUP"; # REASON FOR BAD CALL # END ELSE # PRU INTERFACE ALLOWED ON THIS DEVICE TYP# BEGIN IF NIT$STATE[ACN] NQ STATE"OK" THEN # CONNECTION IS IN WRONG STATE TO CONVERT # BEGIN NIT$S$RC[0] = NITSRTC"BADSTATE"; # REASON FOR BAD CALL# END ELSE # NAM K-DISPLAY IS ASSIGNED TO APP # BEGIN IF NIT$ABL[ACN] NQ NIT$C$ABL[ACN] THEN # BACKS OUTSTANDING - CANNOT CONVERT # BEGIN NIT$S$RC[0] = NITSRTC"DBLKSO"; # REASON FOR BAD CALL# END ELSE # OKAY TO SEND PRU/ON SUPERVISORY MESSAGE # BEGIN IF NIT$PARMFLG1[0] EQ 0 OR NIT$PARMFLG1[0] GR 3 THEN # BAD PRU SIZE WAS SPECIFIED # BEGIN NIT$S$RC[0] = NITSRTC"BADPRUS"; # BAD PRU SIZ GIVEN# END ELSE # OKAY TO SEND PRU/ON/R SUPERVISORY MSG # BEGIN ABHTLC[0] = LPRU; # LENGTH OF PRU/ON/R SUP MSG # PFCSFC[0] = PRUON; # PFC/SFC VALUE FOR PRU/ON/R # PRUACN[0] = ACN; # CONNECTION NUMBER # IF NIT$DEVTYP[ACN] EQ DT$CR THEN # UPLINE (INPUT) PRU DEVICE # BEGIN PRUUPS[0] = NIT$PARMFLG1[0]; # PRU BLOCK SIZE # END ELSE # DOWNLINE (OUTPUT) PRU DEVICE # BEGIN PRUDPS[0] = NIT$PARMFLG1[0]; # PRU BLOCK SIZE # END NETPUT(HEADER,SUP$MES); # SEND PRU/ON/R SUP MSG # NIT$STATE[ACN] = STATE"AWAITPRU"; # CHANGE STATE # NIT$RC[0] = NITRTC"OK"; # NORMAL COMPLETION RC # END END END END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$15: # SEND SET/DEV SUPERVISORY MESSAGE # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER WAS SPECIFIED # BEGIN IF NIT$STATE[ACN] LS STATE"PRUCN" OR NIT$STATE[ACN] GR STATE"PRUEOO" THEN # SET/DEV SUP MSG NOT ALLOWED IN THESE STA# BEGIN NIT$S$RC[0] = NITSRTC"BADSTATE"; # REASON FOR BAD CALL # END ELSE # STATE OF CON IS OKAY FOR SET/DEV SUP MSG# BEGIN IF NIT$CTLC[0] EQ 0 THEN # SIZE OF SET/DEV TEXT WAS NOT SPECIFIED # BEGIN NIT$S$RC[0] = NITSRTC"NOSIZE"; # REASON FOR BAD CALL # END ELSE # SIZE SPECIFIED FOR SET/DEV TEXT # BEGIN IF NIT$CTLC[0] GR 410 THEN # SIZE OF SET/DEV TEXT IS TOO LARGE # BEGIN NIT$S$RC[0] = NITSRTC"BADSIZE";#STORE RC FOR BAD CALL# END ELSE # OKAY TO SEND SET/DEV SUPERVISORY MSG # BEGIN ABHTLC[0] = NIT$CTLC[0] + 1; # LENGTH OF SET/DEV SM # PFCSFC[0] = SETDEV; # PFC/SFC OF SET/DEF SUP MSG # OFCACN[0] = ACN; # APPLICATION CONNECTION NUMBER # NOFRAG = 2; # NUMBER OF FRAGMENTS # FRAGSZ0[0] = 1; # SIZE OF FIRST FRAGMENT # FRAGAD0[0] = LOC(SUP$MES); # ADDR OF FIRST FRAGMENT # FRAGSZ0[1] = NIT$CTLC[0]; # SIZE OF SECOND FRAGMENT # FRAGAD0[1] = LOC(WSA); # ADDR OF SECOND FRAGMENT # NETPUTF(HEADER,NOFRAG,FRAG); # SEND SET/DEV SUP MSG # NIT$RC[0] = NITRTC"OK"; # NORMAL COMPLETION RC # END END END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$16: # SEND SET/FILE SUPERVISORY MESSAGE # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER WAS SPECIFIED # BEGIN IF NIT$STATE[ACN] LS STATE"PRUCN" OR NIT$STATE[ACN] GR STATE"PRUEOO" THEN # SET/FILE SM NOT ALLOWED IN THESE STATES # BEGIN NIT$S$RC[0] = NITSRTC"BADSTATE"; # REASON FOR BAD CALL # END ELSE # STATE OF CON IS OK FOR SET/FILE SUP MSG # BEGIN IF NIT$CTLC[0] EQ 0 THEN # SIZE OF SET/FILE TEXT WAS NOT SPECIFIED # BEGIN NIT$S$RC[0] = NITSRTC"NOSIZE"; # REASON FOR BAD CALL # END ELSE # SIZE SPECIFIED FOR SET/FILE TEXT # BEGIN IF NIT$CTLC[0] GR 410 THEN # SIZE OF SET/FILE TEXT IS TOO LARGE # BEGIN NIT$S$RC[0] = NITSRTC"BADSIZE";#STORE RC FOR BAD CALL# END ELSE # OKAY TO SEND SET/FILE SUPERVISORY MSG # BEGIN ABHTLC[0] = NIT$CTLC[0] + 1; # LENGTH OF SET/FILE SM# PFCSFC[0] = SETFLE; # PFC/SFC OF SET/FILE SUP MSG # OFCACN[0] = ACN; # APPLICATION CONNECTION NUMBER # NOFRAG = 2; # NUMBER OF FRAGMENTS # FRAGSZ0[0] = 1; # SIZE OF FIRST FRAGMENT # FRAGAD0[0] = LOC(SUP$MES); # ADDR OF FIRST FRAGMENT # FRAGSZ0[1] = NIT$CTLC[0]; # SIZE OF SECOND FRAGMENT # FRAGAD0[1] = LOC(WSA); # ADDR OF SECOND FRAGMENT # NETPUTF(HEADER,NOFRAG,FRAG); # SEND SET/FILE SUP MSG # NIT$RC[0] = NITRTC"OK";# NORMAL COMPLETION RETURN COD# END END END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$17: # SEND OFC/DATA SUPERVISORY MESSAGE # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER WAS SPECIFIED # BEGIN IF NIT$STATE[ACN] LS STATE"PRUCN" OR NIT$STATE[ACN] GR STATE"PRUEOO" THEN # OFC/DATA SM NOT ALLOWED IN THESE STATES # BEGIN NIT$S$RC[0] = NITSRTC"BADSTATE"; # REASON FOR BAD CALL # END ELSE # STATE OF CON IS OK FOR OFC/DATA SUP MSG # BEGIN IF NIT$CTLC[0] EQ 0 THEN # SIZE OF OFC/DATA TEXT WAS NOT SPECIFIED # BEGIN NIT$S$RC[0] = NITSRTC"NOSIZE"; # REASON FOR BAD CALL # END ELSE # SIZE SPECIFIED FOR OFC/DATA TEXT # BEGIN IF NIT$CTLC[0] GR 410 THEN # SIZE OF OFC/DATA TEXT IS TOO LARGE # BEGIN NIT$S$RC[0] = NITSRTC"BADSIZE";#STORE RC FOR BAD CALL# END ELSE # OKAY TO SEND OFC/DATA SUPERVISORY MSG # BEGIN ABHTLC[0] = NIT$CTLC[0] + 1; # LENGTH OF OFC/DATA SM# PFCSFC[0] = OFCDTA; # PFC/SFC OF OFC/DATA SUP MSG # OFCACN[0] = ACN; # APPLICATION CONNECTION NUMBER # EOJFLAG[0] = NIT$PARMFLG1[0] NQ 0; # SET EOJ FLAG # NOFRAG = (NIT$CTLC[0]+62)/63 + 1; # NO OF FRAGMENTS # FRAGSZ0[0] = 1; # SIZE OF FIRST FRAGMENT # FRAGAD0[0] = LOC(SUP$MES); # ADDR OF FIRST FRAGMENT # FOR I = 1 STEP 1 UNTIL NOFRAG - 1 DO # CREATE FRAGMENT ARRAY FOR SUP MSG # BEGIN FRAGSZ0[I] = 63; # SIZE OF FRAGMENT I # FRAGAD0[I] = LOC(WSA) + (I-1)*63; # ADDR OF FRAG # END FRAGSZ0[NOFRAG-1] = NIT$CTLC[0] - (NOFRAG-2)*63; NETPUTF(HEADER,NOFRAG,FRAG); # SEND OFC/DATA SUP MSG # NIT$RC[0] = NITRTC"OK";# NORMAL COMPLETION RETURN COD# END END END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$18: # SEND OFC/STRT SUPERVISORY MESSAGE # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER WAS SPECIFIED # BEGIN IF NIT$STATE[ACN] NQ STATE"PRUCN" THEN # OFC/STRT SM NOT ALLOWED IN THESE STATES # BEGIN NIT$S$RC[0] = NITSRTC"BADSTATE"; # REASON FOR BAD CALL # END ELSE # STATE OF CON IS OK FOR OFC/STRT SUP MSG # BEGIN ABHTLC[0] = LOFCSTR; # LENGTH OF OFC/STRT SUP MSG # PFCSFC[0] = OFCSTRT; # PFC/SFC OF OFC/STRT SUP MSG # OFCACN[0] = ACN; # APPLICATION CONNECTION NUMBER # OFCCURP[0] = WSA; # PRU POSITION TO START PRINTING# NOFRAG = 2; # NUMBER OF FRAGMENTS # FRAGSZ0[0] = 1; # SIZE OF FIRST FRAGMENT # FRAGAD0[0] = LOC(SUP$MES); # ADDR OF FIRST FRAGMENT # FRAGSZ0[1] = LOFCSTR-1; # SIZE OF SECOND FRAGMENT # FRAGAD0[1] = LOC(WSA)+1; # ADDR OF SECOND FRAGMENT # NETPUTF(HEADER,NOFRAG,FRAG); # SEND OFC/STRT SUP MSG # NIT$STATE[ACN] = STATE"PRUACT"; # CHANGE STATE # NIT$RC[0] = NITRTC"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$19: # SEND OFC/RSM OR OFC/RSTR SUP MSG # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER WAS SPECIFIED # BEGIN IF NIT$STATE[ACN] LS STATE"PRUSTPN" OR NIT$STATE[ACN] GR STATE"PRUSTPP" THEN # RESTART SMS NOT ALLOWED IN THESE STATES # BEGIN NIT$S$RC[0] = NITSRTC"BADSTATE"; # REASON FOR BAD CALL # END ELSE # STATE OF CON IS OK FOR RESTART SUP MSGS # BEGIN ABHTLC[0] = LOFCRSM; # LENGTH OF RESTART SUP MSG # IF NIT$STATE[ACN] EQ STATE"PRUSTPD" THEN # NETWORK NEEDS TO BE INFORMED ABOUT RSTRT# BEGIN PFCSFC[0] = OFCRSM; # PFC/SFC OF OFC/RSTR SUP MSG # END ELSE # ONLY PIP NEEDS TO BE RESTARTED # BEGIN PFCSFC[0] = OFCRSTR; # PFC/SFC OF OFC/RSM SUP MSG # END OFCACN[0] = ACN; # APPLICATION CONNECTION NUMBER # OFCCURP[0] = WSA; # PRU POSITION TO RESTRT OUTPUT# NETPUT(HEADER,SUP$MES); # SEND OFC/RSM OR OFC/RSTR SM # NIT$STATE[ACN] = STATE"PRUACT"; # CHANGE STATE # NIT$RC[0] = NITRTC"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$20: # SEND OFC/STP/R SUPERVISORY MESSAGE # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER WAS SPECIFIED # BEGIN IF NIT$STATE[ACN] NQ STATE"PRUACT" THEN # OFC/STP/R SM NOT ALLOWED IN THESE STATES# BEGIN NIT$S$RC[0] = NITSRTC"BADSTATE"; # REASON FOR BAD CALL # END ELSE # STATE OF CON IS OK FOR OFC/STP/R SUP MSG# BEGIN ABHTLC[0] = LOFCST; # LENGTH OF OFC/STP/R SUP MSG # PFCSFC[0] = OFCSTP; # PFC/SFC OF OFC/STP/R SUP MSG # OFCACN[0] = ACN; # APPLICATION CONNECTION NUMBER # NETPUT(HEADER,SUP$MES); # SEND OFC/STP/R SUP MSG # NIT$STATE[ACN] = STATE"PRUSTOP"; # CHANGE CN STATE # NIT$RC[0] = NITRTC"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$21: # SEND OFC/ABT/R SUPERVISORY MESSAGE # # FOLLOWED BY OFC/TOM SUPERVISORY MESSAGE # BEGIN IF CHKCN THEN # GOOD CONNECTION NUMBER WAS SPECIFIED # BEGIN IF NIT$STATE[ACN] LS STATE"PRUACT" OR NIT$STATE[ACN] EQ STATE"PRUABT" THEN # OFC/ABT/R SM NOT ALLOWED IN THESE STATES# BEGIN NIT$S$RC[0] = NITSRTC"BADSTATE"; # REASON FOR BAD CALL # END ELSE # STATE OF CON IS OK FOR OFC/ABT/R SUP MSG# BEGIN ABHTLC[0] = LOFCABT; # LENGTH OF OFC/ABT/R SUP MSG # PFCSFC[0] = OFCABRT; # PFC/SFC OF OFC/ABT/R SUP MSG # OFCACN[0] = ACN; # APPLICATION CONNECTION NUMBER # NETPUT(HEADER,SUP$MES); # SEND OFC/ABT/R SUP MSG # ABHTLC[0] = LOFCTOM; # LENGTH OF OFC/TOM SUP MSG # PFCSFC[0] = OFCTOM; # PFC/SFC OF OFC/TOM SUP MSG # OFCACN[0] = ACN; # APPLICATION CONNECTION NUMBER # NETPUT(HEADER,SUP$MES); # SEND OFC/TOM SUP MSG # NIT$STATE[ACN] = STATE"PRUABT"; # CHANGE CN STATE # NIT$RC[0] = NITRTC"OK"; # NORMAL COMPLETION RETURN CODE # END END GOTO SMC$END; # GO TO END OF CASE STATEMENT # END SMC$END: # END OF CASE STATEMENT # END ELSE # BAD SUPERVISORY MESSAGE CODE WAS GIVEN # BEGIN NIT$S$RC[0] = S"UNRECOG"; # STORE REASON CODE FOR BAD CALL # END RETURN; FUNC CHKCN B; # FUNCTION TO CHECK IF FOR VALID CON NO # *IF DEF,IMS # *1DC CHKCN * * 1. PROC NAME AUTHOR DATE * CHKCN E. GEE 11/03/84 * * 2. FUNCTIONAL DESCRIPTION. * VALIDATE CONNECTION NUMBER SUPPLIED BY APPLICATION. * * 3. METHOD USED. * SET FUNCTION TO FALSE. * IF CONNECTION ENTRY IN NIT IS NOT IN USE, * STORE ERROR RETURN CODE IN SEC-RETURN-CODE FIELD IN NIT. * ELSE (CONNECTION ENTRY IN NIT IS IN USE), * IF CONNECTION WAS LOANED TO ANOTHER APPLICATION, * STORE ERROR RETURN CODE IN SEC-RETURN-CODE FIELD IN NIT. * ELSE (CONNECTION NUMBER IS OKAY), * SET FUNCTION TO TRUE. * * 4. ENTRY CONDITIONS. * ACN CONNECTION NUMBER TO VALIDATE * * 5. NORMAL EXIT CONDITIONS. * CHKCN TRUE * * 6. ABNORMAL EXIT CONDITIONS. * CHKCN FALSE * NIT$S$RC REASON CODE FOR REJECTING CALL * * 7. COMDECKS AND SYMPL TEXT USED. * NONE * * 8. ROUTINES CALLED. * NONE * * 9. DAYFILE MESSAGE OR OTHER IMPORTANT INFORMATION. * THE FUNCTION IS AN INTERAL PROC OF QTSUP. * # *ENDIF BEGIN CHKCN = FALSE; # INITIALIZE VALUE FOR RETURNING TO CALLER# IF (ACN EQ 0 ) OR (ACN GR NIT$NO$TERMS[0] ) OR (NIT$STATE[ACN] EQ S"NULL") THEN # CONNECTION DOES NOT EXIST # BEGIN NIT$S$RC[0] = S"BADCN"; # STORE REASON FOR BAD CALL # END ELSE # CONNECTION EXISTS # BEGIN IF (NIT$STATE[ACN] EQ S"LEND") OR (NIT$STATE[ACN] EQ S"LENT") THEN # CONNECTION HAS BEEN LENT TO ANOTHER APP # BEGIN NIT$S$RC[0] = S"CONLOANED"; # STORE REASON FOR BAD CALL # END ELSE # CONNECTION NUMBER IS OKAY # BEGIN CHKCN = TRUE; # RETURN TRUE VALUE TO CALLER # END END END END # END OF QTSUP # TERM