User Tools

Site Tools


cdc:nos2.source:nam5871:nvfavvd

NVFAVVD

Table Of Contents

  • [00009] PROC NVFAVVD
  • [00010] NVFAVVD - VERIFY A-A VALIDATION DATA
  • [00014] VERIFY A-A VALIDATION DATA.
  • [00056] PROC NVFUMQE
  • [00057] PROC NVFUFVO
  • [00058] PROC SSTRTS
  • [00059] PROC NVFAIAM
  • [00060] PROC NVFSCAD
  • [00061] PROC MOVE
  • [00062] PROC NVFUCRS
  • [00063] PROC SSCATR
  • [00064] PROC MESSAGE
  • [00065] PROC ABORT
  • [00066] PROC SSTAQE
  • [00067] PROC NVFCFCE
  • [00095] VDATBUF - VALIDATION DATA UTILITY ARRAY DEF.
  • [00104] T1TEMP - TEMP ARRAY DEFINITION FOR MOVE.
  • [00113] T2TEMP - TEMP ARRAY DEFINITION FOR MOVE.
  • [00136] TMBBUF - TIMER REQUEST BUFFER.

Source Code

NVFAVVD.txt
  1. *DECK NVFAVVD
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXSMNVF
  5. USETEXT TXTSUSS
  6. USETEXT TXTANVF
  7. USETEXT TXTAPSS
  8.  
  9. PROC NVFAVVD;
  10. # TITLE NVFAVVD - VERIFY A-A VALIDATION DATA #
  11.  
  12. BEGIN # NVFAVVD #
  13. #
  14. ** NVFAVVD - VERIFY A-A VALIDATION DATA.
  15. *
  16. * C. BRION 82/12/03. 82/12/18. 83/01/14. 83/03/24.
  17. * 83/05/09.
  18. *
  19. * THIS PROCEDURE RECEIVES THE VALIDATION DATA FOR AN A-A
  20. * CONNECTION AT THE RECEIVING HOST. VALIDATION PROCESSING
  21. * IS PERFORMED AND FURTHUR CONNECTION PROCESSING IS THEN
  22. * PERFORMED DEPENDENT UPON THE VALIDATION RESULTS AND THE
  23. * TYPE OF APPLICATION AND THE STATUS OF THE CALLED APPLICATION.
  24. *
  25. * PROC NVFAVVD
  26. *
  27. * ENTRY:
  28. * WORD COUNT WORD OF VALIDATION DATA IN WCBUF.
  29. * ACN OF CONNECTION FOR WHICH VALIDATION DATA INTENDED IN ABHBUF.
  30. * VALIDATION DATA RESIDES IN MSGBUF.
  31. *
  32. * EXIT:
  33. * ONE OF THE FOLLOWING:
  34. *
  35. * SUCCESSFUL VALIDATION:
  36. * CR/RAP/N SM SENT TO OTQ.
  37. * CR/SWH/R SM SENT TO CTQ.
  38. * PAAC ENTRY UPDATED WITH VALIDATION INFO.
  39. * ABAC ACCOUNT MESSAGE ISSUED.
  40. *
  41. * UNSUCCESSFUL VALIDATION:
  42. * CR/RAP/A SM SENT TO CTQ.
  43. * ABAR ACCOUNT MESSAGE ISSUED.
  44. * AST ENTRY FOR CALLED APPLICATION UPDATED.
  45. * DECREMENT FAMILY COUNT CPM CALL ISSUED.
  46. * APPLICATION DEPARTURE PROCESSING PERFORMED.
  47. * VCB ORDINAL AND PAAC ENTRY RELEASED.
  48. #
  49.  
  50. #
  51. **** PROC NVFAVVD XREF LIST
  52. #
  53.  
  54. XREF
  55. BEGIN
  56. PROC NVFUMQE; # MAKE QUEUE ENTRY #
  57. PROC NVFUFVO; # FREE VCB ORDINAL #
  58. PROC SSTRTS; # SS-RELEASE TABLE SPACE #
  59. PROC NVFAIAM; # A-A ISSUE ACCOUNT MSG #
  60. PROC NVFSCAD; # COMPLETE APPL DEPARTURE #
  61. PROC MOVE; # SS-MOVE WORDS #
  62. PROC NVFUCRS; # CHECK RQST START STATUS #
  63. PROC SSCATR; # SS - ACCEPT TIMER REQUEST #
  64. PROC MESSAGE;
  65. PROC ABORT;
  66. PROC SSTAQE; # ACCEPT QUEUE ENTRY #
  67. PROC NVFCFCE; # FIND CONNECTION ENTRY #
  68. END
  69.  
  70. #
  71. ****
  72. #
  73.  
  74. #
  75. * ITEM LIST AND ARRAY DEFINITIONS.
  76. #
  77.  
  78. ITEM NENTRY I; # LOCAL COUNT VAR #
  79. ITEM PAC I; # PAAC ENTRY INDEX #
  80. ITEM I I; # LOOP VAR #
  81. ITEM MTYP I; # TYPE AND COUNT VAR #
  82. ITEM AORD I; # AST ORDINAL #
  83. ITEM VCB I; # VCB ORDINAL #
  84. ITEM ASENTRY I; # NUMBER AST ENTRIES #
  85. ITEM PAS I; # PRIMARY AST ORDINAL #
  86. ITEM RAS I; # RETURN AST ORDINAL #
  87. ITEM STAT I; # RETURN STATUS #
  88. ITEM ERRCODE I; # CR/RAP/A SM ERROR CODE #
  89. ITEM CTYP I; # CONNECTION TYPE VARIABLE #
  90. ITEM ACNN I; # TEMPORARY CONNECTION NUM #
  91. ITEM AE I; # INDEX TO ACN TABLE #
  92. ITEM NEWACN B; # TRUE IF ACN NOT FOUND #
  93.  
  94. #
  95. ** VDATBUF - VALIDATION DATA UTILITY ARRAY DEF.
  96. #
  97.  
  98. BASED ARRAY VDATBUF [00:00] S(1);
  99. BEGIN
  100. ITEM VDA$WORD U(00,00,60);
  101. END
  102.  
  103. #
  104. ** T1TEMP - TEMP ARRAY DEFINITION FOR MOVE.
  105. #
  106.  
  107. BASED ARRAY T1TEMP [00:00] S(1);
  108. BEGIN
  109. ITEM T1T$WORD U(00,00,60);
  110. END
  111.  
  112. #
  113. ** T2TEMP - TEMP ARRAY DEFINITION FOR MOVE.
  114. #
  115.  
  116. BASED ARRAY T2TEMP [00:00] S(1);
  117. BEGIN
  118. ITEM T2T$WORD U(00,00,60);
  119. END
  120.  
  121. $BEGIN
  122.  
  123. #
  124. * RHFMSG - RHF NVF DEBUG MESSAGE ARRAY.
  125. #
  126.  
  127. ARRAY RHFMSG [00:00] S(4);
  128. BEGIN
  129. ITEM RHF$RTN C(00,00,10) = ["NVFAVVD: "];
  130. ITEM RHF$TEXT C(01,00,30);
  131. ITEM RHF$ZB U(04,00,60) = [0];
  132. END
  133. $END
  134.  
  135. #
  136. ** TMBBUF - TIMER REQUEST BUFFER.
  137. *
  138. * TMBBUF IS THE BUFFER USED TO HOLD A TIMER REQUEST.
  139. #
  140.  
  141. ARRAY TMBBUF [00:00] S(TMBSIZ$);
  142. BEGIN
  143. ITEM TMB$SMID S:CTQSTAT(00,00,12) = [S"SINA"];
  144. ITEM TMB$WC U(00,48,12) = [TMBSIZ$];
  145. ITEM TMB$ABT U(01,00,06) = [APPCMD];
  146. ITEM TMB$CNUM U(01,18,18);
  147. ITEM TMB$PFCSFC U(02,00,16) = [FCINA];
  148. ITEM TMB$ACN U(02,24,12);
  149. ITEM TMB$DELAY U(03,24,18) = [NETPTIME$];
  150. ITEM TMB$QNUM U(03,42,18);
  151. END
  152.  
  153. CONTROL EJECT;
  154.  
  155. #
  156. * LOCATE PAAC ENTRY FOR VALIDATION DATA BASED ON THE ACN OF THE
  157. * VALIDATION DATA.
  158. #
  159.  
  160. NENTRY = PACLNGTH / PAACSIZ$;
  161. FOR PAC = 0 STEP 1 WHILE ((PA$VCB[PAC] NQ ABHADR[0]) AND
  162. (PAC LS NENTRY))
  163. DO
  164. BEGIN END
  165.  
  166. $BEGIN
  167.  
  168. IF PAC EQ NENTRY
  169. THEN
  170. BEGIN
  171. RHF$TEXT[0] = "PAAC ENTRY NOT FOUND";
  172. MESSAGE(RHFMSG,0);
  173. ABORT;
  174. END
  175.  
  176. $END
  177.  
  178. #
  179. * DETERMINE THE AST ORDINAL OF THE CALLED APPLICATION.
  180. #
  181.  
  182. ASENTRY = (ASTLNGTH/ASTSIZ$);
  183. FOR AORD = 0 STEP 1 WHILE
  184. ((AORD LS ASENTRY) AND
  185. (AST$PANAM[AORD] NQ PA$RAPNM[PAC]))
  186. DO
  187. BEGIN
  188. END
  189.  
  190. $BEGIN
  191. IF AORD EQ ASENTRY
  192. THEN
  193. BEGIN
  194. RHF$TEXT[0] = "AST ENTRY NOT FOUND";
  195. MESSAGE(RHFMSG,0);
  196. ABORT;
  197. END
  198. $END
  199.  
  200. PAS = AORD;
  201. RAS = AORD;
  202.  
  203. #
  204. * CHECK IF AST ENTRY[AORD] IS PRIMARY OR NOT.
  205. * IF NOT, LOCATE PRIMARY AST ENTRY.
  206. #
  207. IF AST$PANAM[PAS] NQ AST$SANAM[PAS]
  208. THEN
  209. BEGIN
  210. RAS = PAS;
  211. FOR PAS = 0 STEP 1 WHILE
  212. ((AST$PANAM[PAS] NQ AST$SANAM[RAS]) AND
  213. (PAS LS ASENTRY))
  214. DO
  215. BEGIN
  216. END
  217.  
  218. $BEGIN
  219. IF PAS EQ ASENTRY
  220. THEN
  221. BEGIN
  222. RHF$TEXT[0] = "PRI AST NOT FOUND";
  223. MESSAGE(RHFMSG,0);
  224. ABORT;
  225. END
  226. $END
  227.  
  228. END
  229.  
  230. #
  231. * COPY VALIDATION DATA INTO THE PAAC ENTRY.
  232. #
  233.  
  234. P<VDATBUF> = LOC(PA$FWORD[PAC]);
  235. FOR I = 0 STEP 1 UNTIL (WCB$WC[0] - 3)
  236. DO
  237. BEGIN
  238. VDA$WORD[I] = MSG$WORD[I];
  239. END
  240.  
  241. #
  242. * PRESET THE ERROR CODE FOR ABNORMAL CASES.
  243. #
  244.  
  245. ERRCODE = RCRA"MMF";
  246.  
  247. #
  248. * CHECK FOR VALIDATION STATUS (SUCCESS OR NOT).
  249. #
  250.  
  251. MTYP = 59 - AST$AWBP[PAS];
  252. IF ((B<MTYP,1>PA$AAVW[PAC] EQ 1) AND
  253. (PA$SCINV[PAC] EQ 0) AND ((PA$AAVW[PAC] LAN VAPMASK) NQ 0))
  254. THEN
  255.  
  256. #
  257. * SUCCESSFUL FAM/USER VALIDATION. CHECK APPLICATION NAME VALIDATION.
  258. * CALLED APPLICATION NAME CANNOT BE ONE OF THE SUPERVISORY
  259. * NETWORK PROGRAMS (NVF,NS,CS).
  260. #
  261.  
  262. BEGIN
  263. IF PA$RAPNM[PAC] NQ "NVF" AND
  264. PA$RAPNM[PAC] NQ "NS" AND
  265. PA$RAPNM[PAC] NQ "CS"
  266. THEN
  267. BEGIN
  268.  
  269. #
  270. * NOT A SUPERVISORY APPLICATION. CHECK IF CALLED APPLICATION
  271. * IS REQUEST STARTABLE.
  272. #
  273. STAT = CONNOK$;
  274. IF AST$RS[AORD]
  275. THEN
  276. BEGIN
  277.  
  278. #
  279. * REQUEST STARTABLE APPLICATION TYPE. CALL NVFUCRS TO DETERMINE
  280. * THE STATUS OF THE CALLED APPLICATION.
  281. * SET THE LOCAL AST ORDINAL TO THE RETURN AST ORDINAL.
  282. * SET THE PAAC ENTRY REQUESTED APPLICATION NAME & NUMBER.
  283. #
  284.  
  285. CTYP = AACON$;
  286. NVFUCRS(PAS,RAS,STAT,CTYP);
  287. PA$RAPNM[PAC] = AST$PANAM[RAS];
  288. PA$RAPAN[PAC] = AST$AN[RAS];
  289. END
  290.  
  291. IF STAT EQ NETP$
  292. THEN
  293. BEGIN
  294.  
  295. #
  296. * WAITING ON CALLED APPLICATION NETON.
  297. * SET PAAC STATE TO NETON PENDING.
  298. * SET UP AND ISSUE TIMER REQUEST FOR CONNECTION.
  299. * RECORD THE TIMER CANCELLATION NUMBER IN THE PAAC ENTRY.
  300. * SET THE SWITCHED APPLICATION NAME OF THE PAAC ENTRY.
  301. #
  302.  
  303. PA$STATE[PAC] = PAACST"PANETP";
  304. TMB$ACN[0] = PA$NACN[PAC];
  305. TMB$QNUM[0] = LOC(P<AAINPQ>);
  306. SSCATR(TMBBUF[0]);
  307. PA$CNUM[PAC] = TMB$CNUM[PAC];
  308. PA$SWAP[PAC] = AST$PANAM[PAS];
  309. END
  310. ELSE IF STAT EQ NOCONN$ OR
  311. STAT EQ MCLIMIT$
  312. THEN
  313.  
  314. #
  315. * CONNECTION NOT POSSIBLE. SET CR/RAP/A SM REASON CODE.
  316. #
  317.  
  318. ERRCODE = RCRA"ANA";
  319. ELSE
  320. BEGIN
  321.  
  322. #
  323. * CONNECTION OK.
  324. * SET CONNECT TIME IN PAAC ENTRY.
  325. * ISSUE ACCOUNT MESSAGE.
  326. * SET SWITCHED APPLICATION NAME AND NUMBER IN PAAC ENTRY.
  327. * SET STATE OF PAAC ENTRY.
  328. * SET UP AND SEND CR/RAP/N SM.
  329. * SET UP AND SEND CR/SWH/R SM TO CONNECTION TRAFFIC QUEUE.
  330. #
  331.  
  332. PA$CNTIME[PAC] = CTM$PDT[0];
  333. MTYP = ABAC$;
  334. NVFAIAM(PAC,MTYP);
  335. PA$SWAP[PAC] = PA$RAPNM[PAC];
  336. PA$SWAPAN[PAC] = PA$RAPAN[PAC];
  337. PA$STATE[PAC] = PAACST"PARAP";
  338. SPMSG0[1] = PA$RAPSM0[PAC];
  339. SPMSG1[1] = PA$RAPSM1[PAC];
  340. SPMSG2[1] = PA$RAPSM2[PAC];
  341. CRICT[1] = CT60TRANS;
  342. RB[1] = TRUE;
  343. CRVCB[1] = PA$VCB[PAC];
  344. NVFUMQE(P<CTQ>,APSM[1],APPPR$,0,LCRRAPN);
  345. #
  346. * SEND THE CR/RAP/N SM TO THE OTQ, BYPASSING THE CTQ.
  347. #
  348. WCB$WORD[0] =0;
  349. WCB$WC[0] = LCRRAPN + 2;
  350.  
  351. ABHWORD[0] = 0;
  352. ABHABT[0] = APPCMD;
  353. ABHADR[0] = 0;
  354. ABHTLC[0] = LCRRAPN;
  355. ABHACT[0] = 1;
  356.  
  357. SSTAQE (P<OTQ>, WCBUF, ABHBUF, APSM[1]);
  358. #
  359. * CHANGE ACN STATE FROM CREATE TO ACTIVE.
  360. #
  361. ACNN = PA$NACN[PAC];
  362. NVFCFCE (ACNN,AE,NEWACN);
  363. IF NEWACN # COULD NOT FIND ACN ENTRY, SERIOUS PROBLEM #
  364. THEN
  365. BEGIN
  366. $BEGIN
  367. RHF$TEXT[0] = "COULD NOT FIND ACN ENTRY";
  368. MESSAGE(RHFMSG,0);
  369. ABORT;
  370. $END
  371. END
  372. ELSE # AND ENTRY EXIST, UPDATE ITS STATE #
  373. ACN$STATE[AE] = ACNST"ACTIVE";
  374. #
  375. * SEND CR/SWH/R.
  376. #
  377. FOR I = 0 STEP 1 UNTIL (MSBFNVL - 1)
  378. DO
  379. BEGIN
  380. MSG$WORD[I] = 0;
  381. END
  382. PFCSFC[0] = CRSWH;
  383. CRNACN[0] = CRNACN[1];
  384. CRABL[0] = CRRAABL[1];
  385. CRDT[0] = PA$DT[PAC];
  386. CRSNAME[0] = " ";
  387. CRSWHID[0] = PA$URHID[PAC];
  388. CRSWSL[0] = AASECLEV$;
  389. CRSWDBZ[0] = CRADBZ[1];
  390. CRSWUBZ[0] = CRAUBZ[1];
  391. CRSWAN[0] = PA$SWAPAN[PAC];
  392. NVFUMQE(P<CTQ>,APSM[0],APPPR$,0,LCRSWH);
  393. AST$AACN[RAS] = AST$AACN[RAS] + 1;
  394. IF RAS NQ PAS
  395. THEN
  396. BEGIN
  397. AST$AACN[PAS] = AST$AACN[PAS] + 1;
  398. END
  399. END
  400. END
  401. END # IF PA$SCINV #
  402.  
  403. #
  404. * IF ERRORS DETECTED VIA STATE OF PAAC ENTRY, THEN ISSUE THE
  405. * CR/RAP/A SM, ISSUE THE ABAR ACCOUNT MESSAGE, DECREMENT THE
  406. * NUMBER OF A-A CONNECTIONS FOR THE CALLED APPLICATION, ISSUE
  407. * A DECREMENT FAMILY COUNT CPM FUNCTION REQUEST IF REQUIRED,
  408. * COMPLETE APPLICATION DEPARTURE PROCESSING, FREE UP THE VCB
  409. * ORDINAL AND PAAC ENTRY BEFORE EXIT.
  410. #
  411.  
  412. IF PA$STATE[PAC] NQ PAACST"PARAP" AND
  413. PA$STATE[PAC] NQ PAACST"PANETP"
  414. THEN
  415. BEGIN
  416. SPMSG0[1] = PA$RAPSM[PAC];
  417. EB[1] = TRUE;
  418. CRRRAP[1] = ERRCODE;
  419. NVFUMQE(P<CTQ>,APSM[1],APPPR$,0,LCRRAPA);
  420. MTYP = ABAR$;
  421. NVFAIAM(PAC,MTYP);
  422. IF PA$UPFCF[PAC]
  423. THEN
  424. BEGIN
  425. P<CRQBUF> = LOC(MSGBUF[0]);
  426. CRQ$FCWORD[0] = 0;
  427. CRQ$FWORD[0] = 0;
  428. CRQ$FC[0] = CPM73B$;
  429. CRQ$ACN[0] = 0;
  430. CRQ$FNAM[0] = PA$FAM[PAC];
  431. MTYP = CRQDSIZ$ * 10;
  432. NVFUMQE(P<CPMRQ>,CRQBUF[0],APPTTX$,0,MTYP);
  433. END
  434. NVFSCAD(PAS);
  435. IF PAS NQ RAS
  436. THEN
  437. NVFSCAD(RAS);
  438. VCB = PA$VCB[PAC];
  439. NVFUFVO(VCB);
  440. PAC = PAC * PAACSIZ$;
  441. SSTRTS(P<PAAC>,PAC,PAACSIZ$);
  442. END
  443.  
  444. END # NVFAVVD #
  445. TERM
  446. *ENDIF
cdc/nos2.source/nam5871/nvfavvd.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator