*DECK NVFAVVD USETEXT TEXTNVF USETEXT TEXTSS USETEXT TXSMNVF USETEXT TXTSUSS USETEXT TXTANVF USETEXT TXTAPSS PROC NVFAVVD; # TITLE NVFAVVD - VERIFY A-A VALIDATION DATA # BEGIN # NVFAVVD # # ** NVFAVVD - VERIFY A-A VALIDATION DATA. * * C. BRION 82/12/03. 82/12/18. 83/01/14. 83/03/24. * 83/05/09. * * THIS PROCEDURE RECEIVES THE VALIDATION DATA FOR AN A-A * CONNECTION AT THE RECEIVING HOST. VALIDATION PROCESSING * IS PERFORMED AND FURTHUR CONNECTION PROCESSING IS THEN * PERFORMED DEPENDENT UPON THE VALIDATION RESULTS AND THE * TYPE OF APPLICATION AND THE STATUS OF THE CALLED APPLICATION. * * PROC NVFAVVD * * ENTRY: * WORD COUNT WORD OF VALIDATION DATA IN WCBUF. * ACN OF CONNECTION FOR WHICH VALIDATION DATA INTENDED IN ABHBUF. * VALIDATION DATA RESIDES IN MSGBUF. * * EXIT: * ONE OF THE FOLLOWING: * * SUCCESSFUL VALIDATION: * CR/RAP/N SM SENT TO OTQ. * CR/SWH/R SM SENT TO CTQ. * PAAC ENTRY UPDATED WITH VALIDATION INFO. * ABAC ACCOUNT MESSAGE ISSUED. * * UNSUCCESSFUL VALIDATION: * CR/RAP/A SM SENT TO CTQ. * ABAR ACCOUNT MESSAGE ISSUED. * AST ENTRY FOR CALLED APPLICATION UPDATED. * DECREMENT FAMILY COUNT CPM CALL ISSUED. * APPLICATION DEPARTURE PROCESSING PERFORMED. * VCB ORDINAL AND PAAC ENTRY RELEASED. # # **** PROC NVFAVVD XREF LIST # XREF BEGIN PROC NVFUMQE; # MAKE QUEUE ENTRY # PROC NVFUFVO; # FREE VCB ORDINAL # PROC SSTRTS; # SS-RELEASE TABLE SPACE # PROC NVFAIAM; # A-A ISSUE ACCOUNT MSG # PROC NVFSCAD; # COMPLETE APPL DEPARTURE # PROC MOVE; # SS-MOVE WORDS # PROC NVFUCRS; # CHECK RQST START STATUS # PROC SSCATR; # SS - ACCEPT TIMER REQUEST # PROC MESSAGE; PROC ABORT; PROC SSTAQE; # ACCEPT QUEUE ENTRY # PROC NVFCFCE; # FIND CONNECTION ENTRY # END # **** # # * ITEM LIST AND ARRAY DEFINITIONS. # ITEM NENTRY I; # LOCAL COUNT VAR # ITEM PAC I; # PAAC ENTRY INDEX # ITEM I I; # LOOP VAR # ITEM MTYP I; # TYPE AND COUNT VAR # ITEM AORD I; # AST ORDINAL # ITEM VCB I; # VCB ORDINAL # ITEM ASENTRY I; # NUMBER AST ENTRIES # ITEM PAS I; # PRIMARY AST ORDINAL # ITEM RAS I; # RETURN AST ORDINAL # ITEM STAT I; # RETURN STATUS # ITEM ERRCODE I; # CR/RAP/A SM ERROR CODE # ITEM CTYP I; # CONNECTION TYPE VARIABLE # ITEM ACNN I; # TEMPORARY CONNECTION NUM # ITEM AE I; # INDEX TO ACN TABLE # ITEM NEWACN B; # TRUE IF ACN NOT FOUND # # ** VDATBUF - VALIDATION DATA UTILITY ARRAY DEF. # BASED ARRAY VDATBUF [00:00] S(1); BEGIN ITEM VDA$WORD U(00,00,60); END # ** T1TEMP - TEMP ARRAY DEFINITION FOR MOVE. # BASED ARRAY T1TEMP [00:00] S(1); BEGIN ITEM T1T$WORD U(00,00,60); END # ** T2TEMP - TEMP ARRAY DEFINITION FOR MOVE. # BASED ARRAY T2TEMP [00:00] S(1); BEGIN ITEM T2T$WORD U(00,00,60); END $BEGIN # * RHFMSG - RHF NVF DEBUG MESSAGE ARRAY. # ARRAY RHFMSG [00:00] S(4); BEGIN ITEM RHF$RTN C(00,00,10) = ["NVFAVVD: "]; ITEM RHF$TEXT C(01,00,30); ITEM RHF$ZB U(04,00,60) = [0]; END $END # ** TMBBUF - TIMER REQUEST BUFFER. * * TMBBUF IS THE BUFFER USED TO HOLD A TIMER REQUEST. # ARRAY TMBBUF [00:00] S(TMBSIZ$); BEGIN ITEM TMB$SMID S:CTQSTAT(00,00,12) = [S"SINA"]; ITEM TMB$WC U(00,48,12) = [TMBSIZ$]; ITEM TMB$ABT U(01,00,06) = [APPCMD]; ITEM TMB$CNUM U(01,18,18); ITEM TMB$PFCSFC U(02,00,16) = [FCINA]; ITEM TMB$ACN U(02,24,12); ITEM TMB$DELAY U(03,24,18) = [NETPTIME$]; ITEM TMB$QNUM U(03,42,18); END CONTROL EJECT; # * LOCATE PAAC ENTRY FOR VALIDATION DATA BASED ON THE ACN OF THE * VALIDATION DATA. # NENTRY = PACLNGTH / PAACSIZ$; FOR PAC = 0 STEP 1 WHILE ((PA$VCB[PAC] NQ ABHADR[0]) AND (PAC LS NENTRY)) DO BEGIN END $BEGIN IF PAC EQ NENTRY THEN BEGIN RHF$TEXT[0] = "PAAC ENTRY NOT FOUND"; MESSAGE(RHFMSG,0); ABORT; END $END # * DETERMINE THE AST ORDINAL OF THE CALLED APPLICATION. # ASENTRY = (ASTLNGTH/ASTSIZ$); FOR AORD = 0 STEP 1 WHILE ((AORD LS ASENTRY) AND (AST$PANAM[AORD] NQ PA$RAPNM[PAC])) DO BEGIN END $BEGIN IF AORD EQ ASENTRY THEN BEGIN RHF$TEXT[0] = "AST ENTRY NOT FOUND"; MESSAGE(RHFMSG,0); ABORT; END $END PAS = AORD; RAS = AORD; # * CHECK IF AST ENTRY[AORD] IS PRIMARY OR NOT. * IF NOT, LOCATE PRIMARY AST ENTRY. # IF AST$PANAM[PAS] NQ AST$SANAM[PAS] THEN BEGIN RAS = PAS; FOR PAS = 0 STEP 1 WHILE ((AST$PANAM[PAS] NQ AST$SANAM[RAS]) AND (PAS LS ASENTRY)) DO BEGIN END $BEGIN IF PAS EQ ASENTRY THEN BEGIN RHF$TEXT[0] = "PRI AST NOT FOUND"; MESSAGE(RHFMSG,0); ABORT; END $END END # * COPY VALIDATION DATA INTO THE PAAC ENTRY. # P = LOC(PA$FWORD[PAC]); FOR I = 0 STEP 1 UNTIL (WCB$WC[0] - 3) DO BEGIN VDA$WORD[I] = MSG$WORD[I]; END # * PRESET THE ERROR CODE FOR ABNORMAL CASES. # ERRCODE = RCRA"MMF"; # * CHECK FOR VALIDATION STATUS (SUCCESS OR NOT). # MTYP = 59 - AST$AWBP[PAS]; IF ((BPA$AAVW[PAC] EQ 1) AND (PA$SCINV[PAC] EQ 0) AND ((PA$AAVW[PAC] LAN VAPMASK) NQ 0)) THEN # * SUCCESSFUL FAM/USER VALIDATION. CHECK APPLICATION NAME VALIDATION. * CALLED APPLICATION NAME CANNOT BE ONE OF THE SUPERVISORY * NETWORK PROGRAMS (NVF,NS,CS). # BEGIN IF PA$RAPNM[PAC] NQ "NVF" AND PA$RAPNM[PAC] NQ "NS" AND PA$RAPNM[PAC] NQ "CS" THEN BEGIN # * NOT A SUPERVISORY APPLICATION. CHECK IF CALLED APPLICATION * IS REQUEST STARTABLE. # STAT = CONNOK$; IF AST$RS[AORD] THEN BEGIN # * REQUEST STARTABLE APPLICATION TYPE. CALL NVFUCRS TO DETERMINE * THE STATUS OF THE CALLED APPLICATION. * SET THE LOCAL AST ORDINAL TO THE RETURN AST ORDINAL. * SET THE PAAC ENTRY REQUESTED APPLICATION NAME & NUMBER. # CTYP = AACON$; NVFUCRS(PAS,RAS,STAT,CTYP); PA$RAPNM[PAC] = AST$PANAM[RAS]; PA$RAPAN[PAC] = AST$AN[RAS]; END IF STAT EQ NETP$ THEN BEGIN # * WAITING ON CALLED APPLICATION NETON. * SET PAAC STATE TO NETON PENDING. * SET UP AND ISSUE TIMER REQUEST FOR CONNECTION. * RECORD THE TIMER CANCELLATION NUMBER IN THE PAAC ENTRY. * SET THE SWITCHED APPLICATION NAME OF THE PAAC ENTRY. # PA$STATE[PAC] = PAACST"PANETP"; TMB$ACN[0] = PA$NACN[PAC]; TMB$QNUM[0] = LOC(P); SSCATR(TMBBUF[0]); PA$CNUM[PAC] = TMB$CNUM[PAC]; PA$SWAP[PAC] = AST$PANAM[PAS]; END ELSE IF STAT EQ NOCONN$ OR STAT EQ MCLIMIT$ THEN # * CONNECTION NOT POSSIBLE. SET CR/RAP/A SM REASON CODE. # ERRCODE = RCRA"ANA"; ELSE BEGIN # * CONNECTION OK. * SET CONNECT TIME IN PAAC ENTRY. * ISSUE ACCOUNT MESSAGE. * SET SWITCHED APPLICATION NAME AND NUMBER IN PAAC ENTRY. * SET STATE OF PAAC ENTRY. * SET UP AND SEND CR/RAP/N SM. * SET UP AND SEND CR/SWH/R SM TO CONNECTION TRAFFIC QUEUE. # PA$CNTIME[PAC] = CTM$PDT[0]; MTYP = ABAC$; NVFAIAM(PAC,MTYP); PA$SWAP[PAC] = PA$RAPNM[PAC]; PA$SWAPAN[PAC] = PA$RAPAN[PAC]; PA$STATE[PAC] = PAACST"PARAP"; SPMSG0[1] = PA$RAPSM0[PAC]; SPMSG1[1] = PA$RAPSM1[PAC]; SPMSG2[1] = PA$RAPSM2[PAC]; CRICT[1] = CT60TRANS; RB[1] = TRUE; CRVCB[1] = PA$VCB[PAC]; NVFUMQE(P,APSM[1],APPPR$,0,LCRRAPN); # * SEND THE CR/RAP/N SM TO THE OTQ, BYPASSING THE CTQ. # WCB$WORD[0] =0; WCB$WC[0] = LCRRAPN + 2; ABHWORD[0] = 0; ABHABT[0] = APPCMD; ABHADR[0] = 0; ABHTLC[0] = LCRRAPN; ABHACT[0] = 1; SSTAQE (P, WCBUF, ABHBUF, APSM[1]); # * CHANGE ACN STATE FROM CREATE TO ACTIVE. # ACNN = PA$NACN[PAC]; NVFCFCE (ACNN,AE,NEWACN); IF NEWACN # COULD NOT FIND ACN ENTRY, SERIOUS PROBLEM # THEN BEGIN $BEGIN RHF$TEXT[0] = "COULD NOT FIND ACN ENTRY"; MESSAGE(RHFMSG,0); ABORT; $END END ELSE # AND ENTRY EXIST, UPDATE ITS STATE # ACN$STATE[AE] = ACNST"ACTIVE"; # * SEND CR/SWH/R. # FOR I = 0 STEP 1 UNTIL (MSBFNVL - 1) DO BEGIN MSG$WORD[I] = 0; END PFCSFC[0] = CRSWH; CRNACN[0] = CRNACN[1]; CRABL[0] = CRRAABL[1]; CRDT[0] = PA$DT[PAC]; CRSNAME[0] = " "; CRSWHID[0] = PA$URHID[PAC]; CRSWSL[0] = AASECLEV$; CRSWDBZ[0] = CRADBZ[1]; CRSWUBZ[0] = CRAUBZ[1]; CRSWAN[0] = PA$SWAPAN[PAC]; NVFUMQE(P,APSM[0],APPPR$,0,LCRSWH); AST$AACN[RAS] = AST$AACN[RAS] + 1; IF RAS NQ PAS THEN BEGIN AST$AACN[PAS] = AST$AACN[PAS] + 1; END END END END # IF PA$SCINV # # * IF ERRORS DETECTED VIA STATE OF PAAC ENTRY, THEN ISSUE THE * CR/RAP/A SM, ISSUE THE ABAR ACCOUNT MESSAGE, DECREMENT THE * NUMBER OF A-A CONNECTIONS FOR THE CALLED APPLICATION, ISSUE * A DECREMENT FAMILY COUNT CPM FUNCTION REQUEST IF REQUIRED, * COMPLETE APPLICATION DEPARTURE PROCESSING, FREE UP THE VCB * ORDINAL AND PAAC ENTRY BEFORE EXIT. # IF PA$STATE[PAC] NQ PAACST"PARAP" AND PA$STATE[PAC] NQ PAACST"PANETP" THEN BEGIN SPMSG0[1] = PA$RAPSM[PAC]; EB[1] = TRUE; CRRRAP[1] = ERRCODE; NVFUMQE(P,APSM[1],APPPR$,0,LCRRAPA); MTYP = ABAR$; NVFAIAM(PAC,MTYP); IF PA$UPFCF[PAC] THEN BEGIN P = LOC(MSGBUF[0]); CRQ$FCWORD[0] = 0; CRQ$FWORD[0] = 0; CRQ$FC[0] = CPM73B$; CRQ$ACN[0] = 0; CRQ$FNAM[0] = PA$FAM[PAC]; MTYP = CRQDSIZ$ * 10; NVFUMQE(P,CRQBUF[0],APPTTX$,0,MTYP); END NVFSCAD(PAS); IF PAS NQ RAS THEN NVFSCAD(RAS); VCB = PA$VCB[PAC]; NVFUFVO(VCB); PAC = PAC * PAACSIZ$; SSTRTS(P,PAC,PAACSIZ$); END END # NVFAVVD # TERM *ENDIF