User Tools

Site Tools


cdc:nos2.source:nam5871:nvfcbpa

NVFCBPA

Table Of Contents

  • [00009] PROC NVFCBPA
  • [00010] NVFCBPA - BEGIN PROTOCOL ACTION.
  • [00014] BEGIN PROTOCOL ACTION.
  • [00063] PROC MOVE
  • [00064] PROC NVFASWN
  • [00065] PROC NVFCFCE
  • [00066] PROC SSTATS
  • [00067] PROC SSTAQE
  • [00068] PROC SSTRTS
  • [00069] PROC SSSAWR

Source Code

NVFCBPA.txt
  1. *DECK NVFCBPA
  2. USETEXT TEXTSS
  3. USETEXT TXSMNVF
  4. USETEXT TXTAPSS
  5. USETEXT TXTANVF
  6. USETEXT TXTSUSS
  7. USETEXT TXINNVF
  8. USETEXT TEXTNVF
  9. PROC NVFCBPA;
  10. # TITLE NVFCBPA - BEGIN PROTOCOL ACTION. #
  11.  
  12. BEGIN # NVFCBPA #
  13. #
  14. ** NVFCBPA - BEGIN PROTOCOL ACTION.
  15. *
  16. * S. H. FISCHER. 81/11/09.
  17. * D. G. DEPEW. 81/12/17.
  18. * C. J. BRION. 82/06/01.
  19. *
  20. * THIS PROCEDURE PERFORMS ALL THE CONNECTION(C) LAYER PROCESSING
  21. * REQUIRED FOR ALL INBOUND, CONNECTION/USER RELATED SUPERVISORY
  22. * MESSAGES.
  23. *
  24. * PROC NVFCBPA
  25. *
  26. * ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
  27. * TRAFFIC QUEUE (*CTQ*) ENTRY.
  28. * ABHBUF[0] = APPLICATION BLOCK HEADER FOR THE SM (BASED
  29. * ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
  30. * MSGBUF[0] = BODY OF THE SM (BASED ARRAY *APSM* IN
  31. * *TXTAPSS* POINTS HERE). THE POSSIBLE PFC/SFC
  32. * VALUES ARE: CR/ITE/R, CR/IAP/R, CR/RAP/R,
  33. * CR/RCN/R, CR/SWH/N, CR/TRM/N, CR/ACC, CR/CB,
  34. * AND TCH/TCHAR.
  35. *
  36. * EXIT ANY OF THE FOLLOWING IN VARIOUS COMBINATIONS ACCORDING TO
  37. * THE SM RECEIVED AND THE STATE OF THE ACN LIST ENTRY FOR
  38. * THE USER IN QUESTION.
  39. * - THE ACN LIST ENTRY HAS BEEN CREATED.
  40. * - THE ACN LIST ENTRY HAS BEEN DELETED.
  41. * - THE STATE OF THE ACN LIST ENTRY HAS BEEN UPDATED.
  42. * - AN ENTRY HAS BEEN PLACED IN THE OUTGOING TRAFFIC QUEUE
  43. * (*OTQ*).
  44. * - AN ENTRY HAS BEEN PLACED IN THE TERMINAL-TO-APPLICATION
  45. * CONNECTION INPUT QUEUE (*TAINPQ*).
  46. * - AN ENTRY HAS BEEN PLACED IN THE APPLICATION-TO-
  47. * APPLICATION CONNECTION INPUT QUEUE (*AAINPQ*).
  48. * - ALL OUTPUT ENQUEUED (IN THE *WBQ*) FOR THE USER IN
  49. * QUESTION HAS BEEN DISCARDED.
  50. *
  51. * NOTE THE PROCESSING IS DEFINED BY THE NVF/USER C-LAYER STATE
  52. * DIAGRAM.
  53. #
  54.  
  55.  
  56.  
  57.  
  58. #
  59. **** PROC NVFCBPA - XREF LIST.
  60. #
  61. XREF
  62. BEGIN
  63. PROC MOVE; # MOVE BLOCK OF MEMORY #
  64. PROC NVFASWN; # PROCESS CR/SWH/N SM #
  65. PROC NVFCFCE; # FIND CONNECTION TABLE ENTRY #
  66. PROC SSTATS; # ALLOCATE TABLE STACE #
  67. PROC SSTAQE; # ACCEPT QUEUE ENTRY #
  68. PROC SSTRTS; # REMOVE TABLE SPACE #
  69. PROC SSSAWR; # ACCEPT WORKLIST REQUEST #
  70. END
  71. #
  72. ****
  73. #
  74.  
  75.  
  76.  
  77.  
  78. ITEM I I; # LOOP VARIABLE #
  79. ITEM DTLOC I; # LOCAL DEVICE TYPE #
  80. ITEM NEWACN B; # TRUE IF ACN NOT FOUND IN ACN LIST #
  81. ITEM RORD I; # ORDINAL OF ENTRY LOCATED IN WBQ #
  82. ITEM AE I; # ORD OF MATCHED (OR NEW) ACN LIST ENTRY #
  83. ITEM ACNN I; # ACN FROM ENTRY WE ARE LOOKING FOR #
  84. ITEM SIZ I; # SIZE OF ENTRY BEING MOVED TO *OTQ* #
  85. ITEM OORD I; # ORDINAL OF ENTRY POSITION IN *OTQ* #
  86. ITEM SMID S:CTQSTAT; # SUBSCRIPT FOR GOTO SWITCH #
  87.  
  88.  
  89.  
  90.  
  91. SWITCH UCSWT:CTQSTAT
  92. LLCRITE: SITE, # CR/ITE #
  93. LLCRCB: SCB, # CR/CB #
  94. LLCRTRMN: STRMN, # CR/TRM/N #
  95. LLCRSWHN: SSWHN, # CR/SWH/N #
  96. LLCRACC: SACC, # CR/ACC #
  97. LLTCHAR: STCHAR, # TCH/TCAR #
  98. LLCRIAP: SIAP, # CR/IAP #
  99. LLCRRAP: SRAP, # CR/RAP #
  100. LLCRRCN: SRCN; # CR/RCN #
  101.  
  102.  
  103.  
  104.  
  105. #
  106. * IF NEWACN THEN IF CR/ITE/R THEN OK
  107. * ELSE ACN MUST EXIST.
  108. #
  109.  
  110.  
  111.  
  112.  
  113. ACNN =CRACN[0];
  114. IF ACNN NQ 0
  115. THEN
  116. NVFCFCE( ACNN, AE, NEWACN );
  117.  
  118. SMID = WCB$SMID[0]; # GET INTERNAL SM IDENTIFIER #
  119. IF SFC[0] EQ ITE # IF CR/ITE DT IN DIFF FIELD #
  120. THEN
  121. DTLOC = CRITDT[0];
  122. ELSE
  123. DTLOC = CRDT[0];
  124.  
  125. GOTO UCSWT[SMID];
  126.  
  127.  
  128.  
  129.  
  130. LLCRRCN:
  131. LLCRITE:
  132. SSTATS( P<ACN>, ACNLSIZ$ );
  133. ACN$WORD0[AE] = 0;
  134. ACN$STATE[AE] = ACNST"CREATE";
  135. IF SMID EQ CTQSTAT"SITE"
  136. THEN
  137. ACN$ABL[AE] = CRITABL[0];
  138. ELSE
  139. ACN$ABL[AE] = CRABL[0];
  140. ACN$ABN[AE] = 1;
  141. ACN$DBZ[AE] = 500;
  142. ACN$ACN[AE] = CRACN[0];
  143. ACN$WORD1[AE] = 0;
  144.  
  145. #
  146. * CHECK THE DEVICE TYPE OF THE INPUT SM. IF DEVICE TYPE
  147. * IS FOR A-A TYPE CONNECTION, SEND TO A-A INPUT QUEUE.
  148. * OTHERWISE, TO THE T-A INPUT QUEUE.
  149. #
  150.  
  151. IF DTLOC EQ DT$INTA OR
  152. DTLOC EQ DT$INTE
  153. THEN
  154. SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF);
  155. ELSE
  156. SSTAQE(P<TAINPQ>,WCBUF,ABHBUF,MSGBUF);
  157.  
  158.  
  159. GOTO ENDTAS;
  160.  
  161. LLCRCB:
  162. IF ACNN NQ 0
  163. THEN
  164. BEGIN # CONNECTION BELONGS TO NVF #
  165. IF ACN$STATE[AE] EQ ACNST"ACTIVE"
  166. OR ACN$STATE[AE] EQ ACNST"CLEARI"
  167. OR ACN$STATE[AE] EQ ACNST"SWTPEND"
  168. OR ACN$STATE[AE] EQ ACNST"BRKCMD"
  169. OR ACN$STATE[AE] EQ ACNST"TRMPEND"
  170. THEN
  171. BEGIN
  172. RORD = 0; # MUST DISCARD ANY WAITING OUTPUT #
  173. FOR I = 1 STEP 1 UNTIL ACN$WBCNT[AE]
  174. DO
  175. BEGIN
  176. FOR RORD = RORD STEP WBQ$ESIZE[RORD]
  177. WHILE WBQ$ABHACN[RORD] NQ ACNN
  178. DO
  179. BEGIN END # FIND ORD OF ENTRY TO DELETE #
  180.  
  181. SIZ = WBQ$ESIZE[RORD]; # SIZE OF ENTRY TO DELETE #
  182. SSTRTS( P<WBQ>, RORD, SIZ ); # DELETE ENTRY #
  183. END
  184. ACN$WBCNT[AE] = 0;
  185. END
  186.  
  187. IF ACN$STATE[AE] EQ ACNST"TRMPEND"
  188. OR ACN$STATE[AE] EQ ACNST"SWTPEND"
  189. THEN
  190. BEGIN # FIND AND SEND CR/TRM OR DELETE CR/SWH #
  191. FOR RORD = RORD STEP WBQ$ESIZE[RORD]
  192. WHILE (WBQ$ABHACN[RORD] NQ 0 OR WBQ$CRSACN[RORD] NQ ACNN)
  193. AND (RORD LS WBQLNGTH )
  194. DO
  195. BEGIN END # FIND ORD OF ASYNCHRONOUS ENTRY #
  196.  
  197. IF RORD LS WBQLNGTH # CR/SWH OR CR/TRM FOUND IN WBQ #
  198. THEN
  199. BEGIN
  200. SIZ = WBQ$ESIZE[RORD]; # SIZE OF ENTRY TO BE PROCESSED #
  201.  
  202. IF ACN$STATE[AE] EQ ACNST"TRMPEND"
  203. THEN
  204. BEGIN
  205. OORD = OTQLNGTH;
  206. SSTATS( P<OTQ>, SIZ );
  207. MOVE( SIZ, WBQ[RORD], OTQ[OORD] );
  208. IF OORD EQ 0
  209. THEN
  210. SSSAWR( WWDF"SACNI" );
  211. ACN$STATE[AE] = ACNST"ENDED";
  212. END
  213. SSTRTS( P<WBQ>, RORD, SIZ );
  214. END
  215. END
  216.  
  217.  
  218. IF ACN$STATE[AE] EQ ACNST"ACTIVE"
  219. OR ACN$STATE[AE] EQ ACNST"CLEARI"
  220. OR ACN$STATE[AE] EQ ACNST"SWTPEND"
  221. OR ACN$STATE[AE] EQ ACNST"BRKCMD"
  222. OR ACN$STATE[AE] EQ ACNST"BRKOUT"
  223. OR ACN$STATE[AE] EQ ACNST"SWSTART"
  224. THEN
  225. BEGIN
  226. IF DTLOC EQ DT$INTA OR
  227. DTLOC EQ DT$INTE
  228. THEN
  229. SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF); # A-A INPUT #
  230. ELSE
  231. SSTAQE(P<TAINPQ>,WCBUF,ABHBUF,MSGBUF); # T-A INPUT #
  232. ACN$STATE[AE] = ACNST"BROKEN";
  233. END
  234. END
  235.  
  236. ELSE
  237. BEGIN # CR/CB FOR CONNECTION TO OTHER APPL #
  238. IF DTLOC EQ DT$INTA OR
  239. DTLOC EQ DT$INTE
  240. THEN
  241. SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF); # A-A INPUT #
  242. ELSE
  243. SSTAQE(P<TAINPQ>,WCBUF,ABHBUF,MSGBUF); # T-A INPUT #
  244. END
  245.  
  246. GOTO ENDTAS;
  247.  
  248.  
  249.  
  250.  
  251. LLCRSWHN:
  252. IF DTLOC EQ DT$INTA OR # IF A-A CONNECTION, #
  253. DTLOC EQ DT$INTE # ADDITIONAL PAAC #
  254. THEN # PROCESSING ID NEEDED#
  255. BEGIN
  256. NVFASWN(ACNN); # PROCESS CR/SWH/N #
  257. END
  258. SSTRTS(P<ACN>, AE*ACNLSIZ$, ACNLSIZ$);
  259.  
  260. GOTO ENDTAS;
  261.  
  262.  
  263.  
  264.  
  265. LLCRTRMN:
  266. SSTRTS( P<ACN>, AE*ACNLSIZ$, ACNLSIZ$ );
  267. GOTO ENDTAS;
  268.  
  269.  
  270.  
  271.  
  272. LLCRACC:
  273. IF DTLOC EQ DT$INTA OR
  274. DTLOC EQ DT$INTE
  275. THEN
  276. SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF); # A-A INPUT #
  277. ELSE
  278. SSTAQE(P<TAINPQ>,WCBUF,ABHBUF,MSGBUF); # T-A INPUT #
  279. GOTO ENDTAS;
  280.  
  281.  
  282.  
  283.  
  284. LLTCHAR:
  285. IF ACN$STATE[AE] EQ ACNST"ACTIVE"
  286. OR ACN$STATE[AE] EQ ACNST"BRKOUT"
  287. OR ACN$STATE[AE] EQ ACNST"CLEARI"
  288. OR ACN$STATE[AE] EQ ACNST"BRKCMD"
  289. THEN
  290. SSTAQE( P<TAINPQ>, WCBUF, ABHBUF, MSGBUF );
  291. GOTO ENDTAS;
  292.  
  293.  
  294.  
  295. LLCRIAP:
  296. LLCRRAP:
  297.  
  298. #
  299. * IF THE INCOMING SM IS A CR/IAP/R, CHECK IF ACN EXISTS. IF SO, THEN
  300. * A REPEAT SM SEEN. FLUSH THE CR/SWH/R SM IN THE WAITING BLOCK QUEUE.
  301. * IF PAAC EXISTS, CHECK STATE OF ACN.
  302. * IF THE STATE IS "SWITCH PENDING", THEN THE CR/SWH/R SM IN THE
  303. * WAITING BLOCK QUEUE MUST BE FLUSHED AND THE STATE OF THE ACN SET
  304. * TO "CREATE".
  305. #
  306.  
  307.  
  308. #
  309.   IF AN INCOMING CR/RAP/R SM, SET UP ACN AND SEND TO AAINPQ.
  310. #
  311.  
  312. IF NEWACN
  313. THEN
  314. BEGIN
  315. SSTATS(P<ACN>,ACNLSIZ$);
  316. ACN$WORD0[AE] = 0;
  317. ACN$WORD1[AE] = 0;
  318. ACN$ACN[AE] = CRACN[0];
  319. END
  320. ELSE
  321. BEGIN
  322.  
  323. #
  324.   ACN EXISTS, MUST BE A REPEAT CR/IAP/R SM.
  325.   CHECK STATE FOR "SWITCH PENDING".
  326.   IF SO, FIND CR/SWH/R SM FOR THIS ACN AND DISPOSE OF.
  327. #
  328.  
  329. IF ACN$STATE[AE] EQ ACNST"SWTPEND"
  330. THEN
  331. BEGIN
  332. RORD = 0;
  333.  
  334. FOR RORD = RORD STEP WBQ$ESIZE[RORD] WHILE
  335. WBQ$CRSACN[RORD] NQ ACNN OR
  336. WBQ$ABHACN[RORD] NQ 0
  337. DO
  338. BEGIN
  339. END
  340.  
  341. SIZ = WBQ$ESIZE[RORD];
  342. SSTRTS(P<WBQ>,RORD,SIZ);
  343. END
  344. END
  345.  
  346.  
  347. #
  348.   SET NEW ACN STATE AND SEND CR/XXX AS PROTOCOL EVENT TO AAINPQ.
  349. #
  350.  
  351. ACN$STATE[AE] =ACNST"CREATE";
  352. SSTAQE(P<AAINPQ>,WCBUF,ABHBUF,MSGBUF);
  353. GOTO ENDTAS;
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360. ENDTAS:
  361.  
  362. END # NVFCBPS #
  363. TERM
cdc/nos2.source/nam5871/nvfcbpa.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator