User Tools

Site Tools


cdc:nos2.source:nam5871:nvfcaut

NVFCAUT

Table Of Contents

  • [00007] PROC NVFCAUT
  • [00008] NVFCAUT - ACCEPT USER TEXT.
  • [00012] ACCEPT USER TEXT.
  • [00067] PROC ABORT
  • [00068] PROC MESSAGE
  • [00069] PROC MOVE
  • [00070] PROC NVFCFCE
  • [00071] PROC SSSAWR
  • [00072] PROC SSTAQE
  • [00073] PROC SSTATS
  • [00074] PROC SSTRTS
  • [00075] PROC NVFTETC

Source Code

NVFCAUT.txt
  1. *DECK NVFCAUT
  2. USETEXT TEXTSS
  3. USETEXT TEXTNVF
  4. USETEXT TXINNVF
  5. USETEXT TXTANVF
  6. USETEXT TXTAPSS
  7. PROC NVFCAUT;
  8. # TITLE NVFCAUT - ACCEPT USER TEXT. #
  9.  
  10. BEGIN # NVFCAUT #
  11. #
  12. ** NVFCAUT - ACCEPT USER TEXT.
  13. *
  14. * S. H. FISCHER. 81/12/04.
  15. *
  16. * THIS PROCEDURE HANDLES INBOUND DATA (SYNCHRONOUS) BLOCKS FROM THE
  17. * NETWORK. ITS FUNCTION IS TO FORWARD THE TYPEIN TO THE I-LAYER
  18. * (FOR LOGIN PROCESSING) OR DISCARD IT, AS APPROPRIATE.
  19. *
  20. * PROC NVFCAUT
  21. *
  22. * ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
  23. * TRAFFIC QUEUE (*CTQ*) ENTRY.
  24. * ABHBUF[0] = APPLICATION BLOCK (EVENT) HEADER FOR THE DATA
  25. * (BASED ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
  26. * MSGBUF[0] = DISPLAY CODED TEXT LINE (BASED ARRAY *APSM*
  27. * IN *TXTAPSS* POINTS HERE).
  28. *
  29. * EXIT ONE OR MORE OF THE FOLLOWING ACCORDING TO THE BLOCK TYPE
  30. * OF THE INPUT DATA AND THE STATE OF THE ACN LIST ENTRY FOR
  31. * THE USER IN QUESTION.
  32. * - AN ENTRY FOR THE TYPEIN HAS BEEN PLACED IN THE TERMINAL-
  33. * TO-APPLICATION CONNECTION INPUT QUEUE (*TAINPQ*).
  34. * - THE TYPEIN HAS BEEN DISCARDED.
  35. * - A TERMINAL TEXT ENTRY CONTAINING THE MESSAGE
  36. * *INPUT IGNORED* HAS BEEN PLACED IN THE CONNECTION
  37. * TRAFFIC QUEUE (*CTQ*).
  38. * - A TERMINAL TEXT ENTRY FOR A ZERO LENGTH *MSG* TYPE
  39. * NETWORK BLOCK HAS BEEN PLACED IN THE *CTQ* (TO TURN
  40. * AROUND THE HALF DUPLEX OPERATION).
  41. * - THE STATE OF THE ACN LIST ENTRY HAS BEEN UPDATED.
  42. * - IF THIS IS A BLK BLOCKS, CHECK TO IF WE HAVE RECEIVED
  43. * UP TO 20 BLK BLOCKS. IF WE HAVE, TERMINATE THE
  44. * CONNECTION BECAUSE SOMETHING HAS GONE WRONG AT THE
  45. * TERMINAL TO CAUSE IT TO SEND THAT MANY BLK BLOCKS
  46. * UPLINE.
  47. *
  48. * NOTES 1. NVF ONLY PROCESSES *MSG* TYPE NETWORK BLOCKS, THE
  49. * CTRL/TCD SYNCHRONOUS SM AND NULL BLOCKS. ANY
  50. * OTHER TYPE OF SYNCHRONOUS INBOUND DATA (*BLK* BLOCKS
  51. * AND TRANSPARENT MODE INPUT) IS IGNORED AND THE MESSAGE
  52. * *INPUT IGNORED* IS SENT TO THE TERMINAL.
  53. * 2. NVF DISCARDS ALL SYNCHRONOUS INBOUND BLOCKS THAT WERE
  54. * TYPED AHEAD OF A USER BREAK.
  55. * 3. THE PROCESSING IS DEFINED BY THE NVF/USER C-LAYER
  56. * STATE DIAGRAM.
  57. #
  58.  
  59.  
  60.  
  61.  
  62. #
  63. **** PROC NVFCAUT - XREF LIST.
  64. #
  65. XREF
  66. BEGIN
  67. PROC ABORT; # ABORT PROGRAM #
  68. PROC MESSAGE; # SEND MESSAGE TO DAYFILE #
  69. PROC MOVE; # MOVE CM WORDS #
  70. PROC NVFCFCE; # FIND CONNECTION ENTRY #
  71. PROC SSSAWR; # ACCEPT WORKLIST REQUEST #
  72. PROC SSTAQE; # ACCEPT QUEUE ENTRY #
  73. PROC SSTATS; # ALLOCATE TABLE SPACE #
  74. PROC SSTRTS; # REMOVE TABLE SPACE #
  75. PROC NVFTETC; # END TERMINAL CONNECTION #
  76. END
  77. #
  78. ****
  79. #
  80.  
  81.  
  82.  
  83.  
  84. ITEM ACNN I; # ACN TO SEARCH FOR #
  85. ITEM AE I; # ORD OF MATCHED (OR NEW) LIST ENTRY #
  86. ITEM NEWACN B; # TRUE IF ACN NOT FOUND IN ACN LIST #
  87. ITEM RORD I; # INBOUND WAITING BLOCK QUEUE ORDINAL #
  88. ITEM TAINDX I; # INDEX INTO THE T-A INPUT QUEUE #
  89. ITEM PT I; # INDEX TO THE PTAC TABLE #
  90. ITEM NENTRY I; # NUMBER OF ENTRIES IN PTAC TABLE #
  91.  
  92. ARRAY BLKIGH[00:00] S(1);
  93. BEGIN
  94. ITEM BLKH$ABT U(00,00,06) = [APPTTX$];
  95. ITEM BLKH$ADR U(00,06,12);
  96. ITEM BLKH$ACT U(00,36,04) = [CT6DISPLAY];
  97. ITEM BLKH$TLC U(00,48,12) = [20];
  98. END
  99.  
  100. ARRAY BLKIGM[00:00] S(2);
  101. BEGIN
  102. ITEM BLKM C(00,00,14) = [".INPUT IGNORED"];
  103. END
  104.  
  105.  
  106.  
  107.  
  108.  
  109. ACNN = ABHADR[0];
  110. NVFCFCE( ACNN, AE, NEWACN ); # LOCATE ACN LIST ENTRY #
  111.  
  112. IF NEWACN
  113. THEN
  114. BEGIN
  115. $BEGIN
  116. MESSAGE( " ACN LOST NVFCAUT", 0 );
  117. ABORT;
  118. $END
  119. RETURN; # DISCARD INBOUND DATA BLOCK #
  120. END
  121.  
  122.  
  123.  
  124.  
  125. #
  126. * PROCESS INPUT ACCORDING TO BLOCK TYPE MSG, BLK AND NULL INBOUND
  127. * DATA BLOCKS PLUS SYNCHRONOUS SUPERVISORY MESSAGES INBOUND.
  128. #
  129.  
  130.  
  131.  
  132.  
  133. #
  134. * MSG BLOCKS ARE TEXT INPUT FROM THE USER AT THE TERMINAL.
  135. * THE MSG BLOCK IS PASSED TO THE PROGRAM IF THE CONNECTION IS IN
  136. * THE ACTIVE OR BRKOUT STATE AND THE MSG BLOCK HAS NOT BEEN
  137. * CANCELED BY THE USER. IF THE BLOCK HAS BEEN CANCELLED THEN A
  138. * EMPTY MSG BLOCK IS OUTPUT TO ALLOW THE NEXT BLOCK TO BE DELIVERED.
  139. #
  140.  
  141.  
  142. IF ABHABT[0] EQ APMSG
  143. THEN
  144. BEGIN
  145. IF ACN$STATE[AE] EQ ACNST"ACTIVE"
  146. OR ACN$STATE[AE] EQ ACNST"CLEARI"
  147. THEN
  148. BEGIN
  149. IF ACN$STATE[AE] EQ ACNST"CLEARI"
  150. OR ABHCAN[0] NQ 0
  151. THEN # MUST TURN AROUND HALF DUPLEX #
  152. BEGIN
  153. WCB$WORD[1] = LLST + 2; # SEND LST/ON TO GET NEXT MSG BK#
  154. ABHWORD[1] = LLST;
  155. ABHABT[1] = APPCMD;
  156. ABHACT[1] = ACLST;
  157. SPMSG0[1] = 0;
  158. PFCSFC[1] = LSTON;
  159. LSTACN[1] = ACNN;
  160. SSTAQE( P<OTQ>,WCBUF[1],ABHBUF[1],APSM[1]); # PASS OUTBOUND#
  161.  
  162. IF ACN$BLKF[AE]
  163. THEN
  164. BEGIN
  165. ACN$BLKF[AE] = FALSE;
  166.  
  167. FOR RORD=0 STEP IWQ$WC[RORD] WHILE IWQ$ACN[RORD+1] NQ ACNN
  168. DO
  169. BEGIN
  170. END
  171.  
  172. SSTRTS(P<IWBQ>,RORD,IWQ$WC[RORD]);
  173. END
  174. END
  175.  
  176. ELSE
  177. BEGIN
  178. IF ACN$BLKF[AE]
  179. THEN
  180. BEGIN
  181. ACN$BLKF[AE] = FALSE;
  182.  
  183. FOR RORD=0 STEP IWQ$WC[RORD] WHILE ACNN NQ IWQ$ACN[RORD+1]
  184. DO
  185. BEGIN
  186. END
  187.  
  188. TAINDX = TAQLNGTH;
  189. SSTATS(P<TAINPQ>,IWQ$WC[RORD]);
  190. MOVE(IWQ$WC[RORD],IWBQ[RORD],TAINPQ[TAINDX]);
  191. SSTRTS(P<IWBQ>,RORD,IWQ$WC[RORD]);
  192. SSSAWR(WWDF"NTDQE");
  193. END
  194.  
  195. ELSE
  196. BEGIN
  197. SSTAQE( P<TAINPQ>, WCBUF, ABHBUF, MSGBUF );
  198. END
  199. END
  200. END
  201.  
  202. ELSE IF ACN$STATE[AE] EQ ACNST"BRKOUT"
  203. THEN
  204. BEGIN
  205. IF ACN$BKCNT[AE] EQ 0
  206. AND ABHCAN[0] EQ 0
  207. THEN
  208. BEGIN
  209. SSTAQE( P<TAINPQ>, WCBUF, ABHBUF, MSGBUF );
  210. ACN$STATE[AE] = ACNST"BRKCMD";
  211. END
  212. END
  213. END
  214.  
  215.  
  216.  
  217.  
  218. #
  219. * COUNT THE NUMBER OF UPLINE BLK BLOCKS. IF THE NUMBER REACH
  220. * 20, TERMINATE THE CONNECTION BECAUSE SOMETHING MUST HAVE
  221. * GONE WRONG AT THE TERMINAL TO CAUSE THAT MANY BLK BLOCKS
  222. * COME UPLINE.
  223. * ONLY THE FIRST BLK BLOCK IS QUEUE. THE REST IS DISCARDED.
  224. #
  225. ELSE IF ABHABT[0] EQ APPBLK
  226. THEN
  227. BEGIN
  228. ACN$BLKCNT[AE] = ACN$BLKCNT[AE] + 1; # INCRMT BLK COUNT#
  229. IF ACN$BLKCNT[AE] GQ 20
  230. THEN
  231. BEGIN
  232. NENTRY = PTALNGTH / PTACSIZ$; # CALCULATE NUMBER OF ENTRIES#
  233. FOR PT = 0 STEP 1 WHILE ( PT LS NENTRY) AND
  234. (PTA$ACN[PT] NQ ACNN)
  235. DO
  236. BEGIN
  237. END
  238. IF PT LS NENTRY # ENTRY FOUND, TERMINATE CONNECTION #
  239. THEN
  240. BEGIN
  241. NVFTETC (PT);
  242. RETURN;
  243. END
  244. END
  245. IF ACN$STATE[AE] EQ ACNST"ACTIVE"
  246. THEN
  247. BEGIN
  248. IF NOT ACN$BLKF[AE]
  249. THEN
  250. BEGIN
  251. ACN$BLKF[AE] = TRUE;
  252. SSTAQE(P<IWBQ>,WCBUF,ABHBUF,MSGBUF);
  253. END
  254. END
  255. END
  256.  
  257.  
  258.  
  259.  
  260. #
  261. * NULL BLOCKS SERVE TWO PURPOSES, MARKING THE POINT IN THE INPUT
  262. * STREAM WHERE A USER BREAK OCCURED SO TEXT CAN BE DISCARDED UP TO
  263. * THAT POINT AND INDICATING TO NVF THAT DISCARDED UPLINE ASCII
  264. * TEXT DESTINED TO A FAILED APPLICATION THAT CANNOT BE DELIVERED
  265. * TO NVF. NVF ALERTS THE USER TO THE IGNORED TEXT ONLY IN THE
  266. * ACTIVE STATE.
  267. #
  268.  
  269.  
  270. ELSE IF ABHABT[0] EQ APPNULL
  271. THEN
  272. BEGIN
  273. IF ABHXPT[0] EQ 1
  274. THEN
  275. BEGIN
  276. IF ACN$STATE[AE] EQ ACNST"ACTIVE"
  277. THEN
  278. BEGIN
  279. WCB$WORD[0] = 4;
  280. BLKH$ADR[0] = ACNN;
  281. SSTAQE( P<CTQ>, WCBUF, BLKIGH, BLKIGM ); # PASS TO OUTBOUND#
  282. END
  283. END
  284. END
  285.  
  286. END # NVFCAUT #
  287. TERM
cdc/nos2.source/nam5871/nvfcaut.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator