User Tools

Site Tools


cdc:nos2.source:nam5871:nvfccpa

NVFCCPA

Table Of Contents

  • [00009] PROC NVFCCPA
  • [00010] NVFCCPA - COMPLETE PROTOCOL ACTION.
  • [00014] COMPLETE PROTOCOL ACTION.
  • [00070] PROC ABORT
  • [00071] PROC MESSAGE
  • [00072] PROC NVFCFCE
  • [00073] PROC NVFCTRM
  • [00074] PROC SSTAQE
  • [00075] PROC SSTRTS

Source Code

NVFCCPA.txt
  1. *DECK NVFCCPA
  2. USETEXT TEXTSS
  3. USETEXT TXCMDNV
  4. USETEXT TXSMNVF
  5. USETEXT TXTAPSS
  6. USETEXT TXTSUSS
  7. USETEXT TXTANVF
  8. USETEXT TEXTNVF
  9. PROC NVFCCPA;
  10. # TITLE NVFCCPA - COMPLETE PROTOCOL ACTION. #
  11.  
  12. BEGIN # NCFCCPA #
  13. #
  14. ** NVFCCPA - COMPLETE PROTOCOL ACTION.
  15. *
  16. * S. H. FISCHER. 81/12/03.
  17. * D. G. DEPEW. 81/12/21.
  18. * C. B. BRION 82/06/02, 84/01/09.
  19. *
  20. * THIS PROCEDURE PERFORMS ALL THE CONNECTION(C) LAYER PROCESSING
  21. * REQUIRED FOR ALL HOP AND CONNECTION/USER RELATED ASYNCHRONOUS
  22. * SUPERVISORY MESSAGES THAT EMANATE FROM THE INNER(I) LAYER
  23. * (TERMED PROTOCOL RESPONSES).
  24. *
  25. * PROC NVFCCPA
  26. *
  27. * ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
  28. * TRAFFIC QUEUE (*CTQ*) ENTRY.
  29. * ABHBUF[0] = APPLICATION BLOCK HEADER FOR THE SM (BASED
  30. * ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
  31. * MSGBUF[0] = BODY OF THE SM (BASED ARRAY *APSM* IN
  32. * *TXTAPSS* POINTS HERE). THE POSSIBLE PFC/SFC
  33. * VALUES ARE: HOP/START/N, HOP/END/N, FC/RST,
  34. * CR/ITE/N, CR/ITE/A, CR/IAP/N, CR/IAP/A,
  35. * CR/RAP/N, CR/RAP/A, CR/RCN/N, CR/SWH/R, AND
  36. * CR/TRM/R.
  37. *
  38. * EXIT ANY OF THE FOLLOWING IN VARIOUS COMBINATIONS ACCORDING TO
  39. * THE SM (PROTOCOL RESPONSE) RECEIVED AND THE STATE OF THE
  40. * ACN LIST ENTRY FOR THE HOP OR USER IN QUESTION:
  41. * - THE STATE OF THE ACN LIST ENTRY HAS BEEN UPDATED.
  42. * - AN ENTRY FOR THE SM HAS BEEN PLACED IN THE OUTGOING
  43. * TRAFFIC QUEUE (*OTQ*).
  44. * - IF THE PROTOCOL RESPONSE IS A CR/SWH/R OR A CR/TRM/R,
  45. * AND THE CONNECTION HAS NOT YET BEEN INITIALIZED (NO
  46. * FC/INIT RECEIVED) OR UNACKNOWLEDGED SYNCHRONOUS BLOCKS
  47. * ARE EXTANT FOR THE CONNECTION, AN ENTRY FOR THE SM HAS
  48. * BEEN MADE IN THE WAITING BLOCK QUEUE (*WBQ*). (THE SM
  49. * WILL BE ISSUED WHEN THE CONNECTION HAS BEEN INITIALIZED
  50. * AND ALL BLOCKS ARE ACKNOWLEDGED.)
  51. * - A HOP/START SM (ESSENTIALLY) HAS BEEN PLACED IN THE
  52. * PROTOCOL EVENT QUEUE (*PEQ*).
  53. *
  54. * NOTES 1. THERE ARE NO REAL HOP/START/N AND HOP/END/N SMS.
  55. * THESE ARE STRICTLY NVF INTERNAL CODES THAT INDICATE
  56. * THAT THE I-LAYER HAS COMPLETED ITS PROCESSING OF THE
  57. * CORRESPONDING INBOUND SUPERVISORY MESSAGES.
  58. * 2. THE PROCESSING IS DEFINED BY THE NVF/HOP AND NVF/USER
  59. * C-LAYER STATE DIAGRAMS.
  60. #
  61.  
  62.  
  63.  
  64.  
  65. #
  66. **** PROC NVFCCPA - XREF LIST.
  67. #
  68. XREF
  69. BEGIN
  70. PROC ABORT; # ABORT PROGRAM #
  71. PROC MESSAGE; # SEND MESSAGE TO DAYFILE #
  72. PROC NVFCFCE; # FIND CONNECTION ENTRY #
  73. PROC NVFCTRM; # PROCESS CR/TRM SUPERVISORY MESSAGE #
  74. PROC SSTAQE; # ACCEPT QUEUE ENTRY #
  75. PROC SSTRTS; # REMOVE TABLE SPACE #
  76. END
  77. #
  78. ****
  79. #
  80.  
  81.  
  82. ITEM NEWACN B; # TRUE IF ACN NOT FOUND IN ACN LIST #
  83. ITEM NORMTRM B; # SET TRUE, SINCE CR/TRM IS FROM C-LAYER #
  84. ITEM AE I; # ORD OF MATCHER (OR NEW) ACN LIST ENTRY #
  85. ITEM ACNN I; # ACN FROM ENTRY WE ARE LOOKING FOR #
  86. ITEM SMID I; # INTERNAL SM IDENTIFIER #
  87.  
  88. #
  89. * NOACN - NO ACN ENTRY WAS FOUND.
  90. #
  91. ARRAY NOACN [00:00] S(4);
  92. BEGIN
  93. ITEM NO$MSG C(00,00,31) =
  94. [" NVFCCPA - ACN ENTRY NOT FOUND."];
  95. ITEM NO$ZERO U(03,06,54) = [0];
  96. END
  97.  
  98. #
  99. * FOLLOWING STATUS LIST ORDER AND NUMBER OF ENTRIES MUST MATCH
  100. * ORDER OF ARRAY PRPFCSFC IN NVFUMQE.
  101. *
  102. #
  103. STATUS CTQSTAT1
  104. SITEA, # CR/ITE/A #
  105. SITEN, # CR/ITE/N #
  106. SIAPN, # CR/IAP/A #
  107. SIAPA, # CR/IAP/N #
  108. SRAPN, # CR/RAP/A #
  109. SRAPA, # CR/RAP/N #
  110. SRCNN, # CR/RCN/N #
  111. SRCNA, # CR/RCN/A #
  112. SSWH, # CR/SWH/R #
  113. STRM, # CR/TRM/R #
  114. SRST, # FC/RST #
  115. HPSTN, # HOP/START/N P.R. #
  116. HPENN, # HOP/END/N P.R. #
  117. ;
  118.  
  119.  
  120.  
  121. SWITCH CPSWT:CTQSTAT1
  122. LLCRITEA: SITEA, # CR/ITE/A #
  123. LLCRITEN: SITEN, # CR/ITE/N #
  124. LLCRIAPA: SIAPA, # CR/IAP/A #
  125. LLCRIAPN: SIAPN, # CR/IAP/N #
  126. LLCRRAPA: SRAPA, # CR/RAP/A #
  127. LLCRRAPN: SRAPN, # CR/RAP/N #
  128. LLCRSWH: SSWH, # CR/SWH #
  129. LLFCRST: SRST, # FC/RST #
  130. LLFCRTRM: STRM, # CR/TRM/R #
  131. LLCRRCNN: SRCNN, # CR/RCN/N #
  132. LLCRRCNA: SRCNA, # CR/RCN/A #
  133. LLHPSRTN: HPSTN, # HOP/START/N P.R. #
  134. LLHPENDN: HPENN; # HOP/END/N P.R. #
  135.  
  136.  
  137.  
  138.  
  139. ABHABT[0] = APPCMD;
  140. ACNN = CRACN[0];
  141.  
  142.  
  143. IF ACNN NQ 0
  144. THEN # SEARCH ONLY IF TERMINAL USER (NOT HOP) #
  145. BEGIN
  146. NVFCFCE (ACNN, AE, NEWACN);
  147. IF NEWACN # ABORT IF THE ACN ENTRY CANNOT BE FOUND #
  148. THEN
  149. BEGIN
  150. MESSAGE(NOACN[0],0);
  151. ABORT;
  152. END
  153. END
  154.  
  155.  
  156.  
  157. SMID = WCB$SMID[0]; # GET INTERNAL SM IDENTIFIER #
  158. GOTO CPSWT[SMID];
  159.  
  160.  
  161.  
  162.  
  163. LLCRITEN:
  164. LLCRIAPN:
  165. LLCRRAPN:
  166. ACN$STATE[AE] = ACNST"ACTIVE";
  167. SSTAQE( P<OTQ>, WCBUF, ABHBUF, MSGBUF );
  168. GOTO ENDTAS;
  169.  
  170.  
  171.  
  172.  
  173. LLCRITEA:
  174. LLCRIAPA:
  175. LLCRRAPA:
  176. LLCRRCNA:
  177. #
  178. * PROCESS THESE ABNORMAL RESPONSES ONLY IF A CR/TRM/R HAS NOT
  179. * YET BEEN SENT OUT FOR THE CONNECTION.
  180. #
  181. IF ACN$STATE[AE] NQ ACNST"ENDED"
  182. THEN
  183. BEGIN
  184. SSTRTS( P<ACN>, AE*ACNLSIZ$, ACNLSIZ$ );
  185. SSTAQE( P<OTQ>, WCBUF, ABHBUF, MSGBUF );
  186. END
  187. GOTO ENDTAS;
  188.  
  189.  
  190.  
  191.  
  192. LLFCRTRM:
  193. #
  194. * CALL NVFCTRM TO PERFORM ALL CR/TRM PROCESSING. PASS A PARAMETER
  195. * OF "TRUE" TO INDICATE THAT THIS CR/TRM IS COMING FROM THE C-LAYER
  196. * INSTEAD OF FROM THE INNER LAYER. THE RETURN PARAMETER (NEWACN) IS
  197. * JUST A DUMMY PARAMETER AS IT IS OF NO INTEREST TO THE C-LAYER.
  198. #
  199. NORMTRM = TRUE;
  200. NVFCTRM(NORMTRM, NEWACN);
  201.  
  202. GOTO ENDTAS;
  203.  
  204.  
  205.  
  206.  
  207. LLCRSWH:
  208. IF ACN$STATE[AE] EQ ACNST"ACTIVE"
  209. OR ACN$STATE[AE] EQ ACNST"CLEARI"
  210. OR ACN$STATE[AE] EQ ACNST"BRKCMD"
  211. THEN
  212. BEGIN
  213. IF ACN$INIT[AE] AND ACN$BLCNT[AE] EQ 0
  214. THEN
  215. BEGIN
  216. SSTAQE( P<OTQ>, WCBUF, ABHBUF, MSGBUF );
  217. ACN$STATE[AE] = ACNST"SWSTART";
  218. END
  219. ELSE
  220. BEGIN
  221. SSTAQE( P<WBQ>, WCBUF, ABHBUF, MSGBUF );
  222. ACN$STATE[AE] = ACNST"SWTPEND";
  223. END
  224. END
  225. ELSE IF ACN$STATE[AE] EQ ACNST"BRKOUT"
  226. THEN
  227. BEGIN
  228. SSTAQE( P<OTQ>, WCBUF, ABHBUF, MSGBUF );
  229. ACN$STATE[AE] = ACNST"SWSTART";
  230. END
  231.  
  232. GOTO ENDTAS;
  233.  
  234.  
  235.  
  236.  
  237. LLCRRCNN:
  238. ACN$STATE[AE] = ACNST"ACTIVE";
  239. SSTAQE( P<OTQ>, WCBUF, ABHBUF, MSGBUF );
  240. GOTO ENDTAS;
  241.  
  242. LLFCRST:
  243. IF ACN$STATE[AE] EQ ACNST"BRKOUT" OR
  244. ACN$STATE[AE] EQ ACNST"BRKCMD"
  245. THEN
  246. BEGIN
  247. # SEND RO/MARK SM TO RESUME OUTPUT #
  248. WCB$WORD[1] = 3;
  249. ABHWORD[1] = LROMARK;
  250. ABHABT[1] = APPCMD;
  251. ABHADR[1] = ACNN;
  252. ABHACT[1] = CT8ASCII;
  253.  
  254. SPMSG0[1] = 0;
  255. PFCSFC[1] = ROMARK;
  256.  
  257. IF ACN$BLCNT[AE] LS ACN$ABL[AE]
  258. THEN
  259. BEGIN
  260. ABHABN[1] = ACN$ABN[AE];
  261. ACN$ABN[AE] = ACN$ABN[AE] + 1;
  262. ACN$BLCNT[AE] = ACN$BLCNT[AE] + 1;
  263.  
  264. SSTAQE(P<OTQ>, WCBUF[1], ABH[1], APSM[1]);
  265. END
  266.  
  267. ELSE # MUST ENQUEUE THE SM #
  268. BEGIN
  269. SSTAQE(P<WBQ>, WCBUF[1], ABH[1], APSM[1]);
  270. ACN$WBCNT[AE] = ACN$WBCNT[AE] + 1;
  271. END
  272.  
  273. IF ACN$STATE[AE] EQ ACNST"BRKOUT"
  274. THEN
  275. BEGIN
  276. IF ACN$BKCNT[AE] EQ 0
  277. THEN
  278. BEGIN
  279. ACN$STATE[AE] = ACNST"ACTIVE";
  280.  
  281. WCB$WORD[1] = LINTR + 2;
  282.  
  283. ABHWORD[1] = LINTR;
  284. ABHABT[1] = APPCMD;
  285. ABHACT[1] = CT60TRANS;
  286.  
  287. SPMSG0[1] = 0;
  288. PFCSFC[1] = INTRRSP;
  289. INTRACN[1] = ACNN;
  290.  
  291. SSTAQE( P<OTQ>, WCBUF[1], ABH[1], APSM[1] );
  292. END
  293.  
  294. ELSE
  295. BEGIN
  296. ACN$STATE[AE] = ACNST"CLEARI";
  297. END
  298. END
  299.  
  300. ELSE IF ACN$STATE[AE] EQ ACNST"BRKCMD"
  301. THEN
  302. BEGIN
  303. WCB$WORD[1] = LINTR + 2;
  304.  
  305. ABHWORD[1] = LINTR;
  306. ABHABT[1] = APPCMD;
  307. ABHACT[1] = CT60TRANS;
  308.  
  309. SPMSG0[1] = 0;
  310. PFCSFC[1] = INTRRSP;
  311. INTRACN[1] = ACNN;
  312.  
  313. SSTAQE(P<OTQ>, WCBUF[1], ABH[1], APSM[1]);
  314. END
  315. END
  316.  
  317. GOTO ENDTAS;
  318.  
  319.  
  320.  
  321. LLHPSRTN:
  322.  
  323. #
  324. * SIMPLY UPDATE THE STATE OF THE HOP PSEUDO ACN IN ACCORDANCE
  325. * WITH ITS EXISTING STATE.
  326. #
  327. IF ACN$HOPST[HOPORD$] EQ S"CREATE"
  328. THEN # MOST USUAL CIRCUMSTANCE #
  329. ACN$HOPST[HOPORD$] = S"COMMAND"; # HISTORY BUFFER TO FOLLOW #
  330.  
  331. ELSE IF ACN$HOPST[HOPORD$] EQ S"STARTEND"
  332. THEN
  333. ACN$HOPST[HOPORD$] = S"ENDED"; # WILL END AFTER HIST BUFF #
  334.  
  335. ELSE # MUST BE HOP/BRK AFT HOP/START #
  336. ACN$HOPST[HOPORD$] = S"BREAK"; # WILL DISCARD HIST BUFFER #
  337.  
  338. GOTO ENDTAS;
  339.  
  340.  
  341.  
  342.  
  343. LLHPENDN:
  344.  
  345. #
  346. * THE HOP/END/N PROTOCOL RESPONSE ALWAYS RESULTS FROM A HOP/END SM
  347. * HAVING BEEN PROCESSED. THERE IS NO DEFINED RESPONSE TO A HOP/END
  348. * SM. THE HOP/END/N PROTOCOL RESPONSE IS AN NVF INTERNAL SIGNAL
  349. * FROM THE I-LAYER TO THE C-LAYER INDICATING ALL CLEANUP FOR THE
  350. * HOP IS COMPLETE. IF A SUBSEQUENT HOP/START SM HAS ALREADY BEEN
  351. * ENCOUNTERED, IT CAN NOW BE SENT TO THE I-LAYER (AS A PROTOCOL
  352. * EVENT). UPDATE THE STATE OF THE HOP PSEUDO ACN.
  353. #
  354. IF ACN$HOPST[HOPORD$] EQ S"ENDED"
  355. THEN # MOST USUAL CIRCUMSTANCE #
  356. ACN$HOPST[HOPORD$] = S"INACT";
  357.  
  358. ELSE # MUST SND HOP/START TO I-LAYER #
  359. BEGIN
  360. WCB$WORD[0] = 3; # MIN QUEUE ENTRY SIZE #
  361. WCB$SMID[0] = HPESTAT"HOPSRT";
  362. HOPLPL[0] = LEFTPL; # SET RIGHT AND LEFT PAGE #
  363. HOPRPL[0] = RIGHTPL; # SIZE FOR K-DISPLAY #
  364. SSTAQE (P<PEQ>, WCBUF[0], ABH[0], APSM[0]); # TO I-LAYER #
  365. IF ACN$HOPST[HOPORD$] EQ S"RESTART"
  366. THEN
  367. ACN$HOPST[HOPORD$] = S"CREATE";
  368. ELSE
  369. ACN$HOPST[HOPORD$] = S"STARTBRK";
  370. END
  371.  
  372.  
  373.  
  374.  
  375. ENDTAS:
  376.  
  377.  
  378. END # NVFCCPA #
  379. TERM
cdc/nos2.source/nam5871/nvfccpa.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator