User Tools

Site Tools


cdc:nos2.source:nam5871:hvllcb

HVLLCB

Table Of Contents

  • [00014] PRGM HVLLCB
  • [00063] PROC LOCLLCB
  • [00064] PROC XTRACE
  • [00065] PROC OVLCALL
  • [00066] PROC BLINK
  • [00067] PROC MGETS
  • [00068] PROC OSCHAPP

Source Code

HVLLCB.txt
  1. *DECK HVLLCB
  2. USETEXT NIPDEF
  3. USETEXT PARAMP
  4. USETEXT PARAMS
  5. USETEXT SUPMSG
  6. USETEXT PT
  7. USETEXT TNT
  8. USETEXT AT
  9. USETEXT ACB
  10. USETEXT ACNB
  11. USETEXT LLCB
  12. USETEXT NCNT
  13. USETEXT OVERLAY
  14. PRGM HVLLCB; # VALIDATE LLCB AND SELECT CONNECTION #
  15. STARTIMS;
  16. #
  17. *1DC HVLLLCB
  18. *
  19. * 1. PROC NAME AUTHOR DATE
  20. * HVLLCB A. BEN-ARZI 82/05/05
  21. *
  22. * 2. FUNCTIONAL DESCRIPTION
  23. * VALIDATE LOGICAL LINK AND SELECT CONNECTION NUMBER
  24. *
  25. * 3. METHOD USED
  26. * - VALIDATE THE LOGICAL LINK IN CR/IAP/N
  27. * - IF NOT EXISTING RETURN ADDRESS = 0 SEND CR/IAP/R TO NVF
  28. * WITH A SPECIAL FORMAT OF A "RETRY" CASE.
  29. * - IF IT EXISTS CHOOSE A CONNECTION NUMBER, USING THE RULE -
  30. *
  31. * * IF SN < DN START LOOKING FROM CN=1
  32. * * IF SN > DN START LOOKING FROM CN=255
  33. *
  34. * 4. ENTRY PARAMETERS
  35. * PARAMP1 - ADDRESS OF CR/IAP/N MESSAGE FROM NVF
  36. * PARAMP2 - ADDRESS OF THE CONNECTION-S ACNB
  37. *
  38. * 5. EXIT PARAMETERS
  39. * PARAMP3 - LLCB ADDRESS
  40. * PARAMP4 - NUMBER OF CONNECTION TO USE
  41. *
  42. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  43. * NIPDEF SUPMSG PT OPSIZE
  44. * LLCB PARAMP PARAMS NCNT
  45. *
  46. * 7. ROUTINES CALLED
  47. * LOCLLCB - FIND LLCB ADDRESS
  48. * XTRACE - TRACE PROCEDURE CALL
  49. * OVLCALL - LOAD AND EXECUTE OVERLAY
  50. *
  51. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  52. * THIS PROGRAM IS A PRIMARY OVERLAY CALLED BY HCSTTP.
  53. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  54. *CALL OPSIZE
  55. *
  56.  #
  57. STOPIMS;
  58. #
  59.   EXTERNAL VARIABLES
  60. #
  61. XREF
  62. BEGIN
  63. PROC LOCLLCB; # LOCATE LLCB #
  64. PROC XTRACE ; # DEBUG TRACE CALL #
  65. PROC OVLCALL; # LOAD AND EXECUTE AN OVERLAY #
  66. PROC BLINK ; # SEND MESSAGE TO APPLICATION #
  67. PROC MGETS ; # GET A BUFFER #
  68. PROC OSCHAPP; # SCHEDULE APPLICATION #
  69. LABEL RJMAIN;
  70. END
  71. #
  72.   INTERNAL VARIABLES
  73. #
  74. ITEM COUNT ;
  75. ITEM LLCBAD ; # LOGICAL LINK ADDRESS #
  76. ITEM TEMPLL ; # LAST LOGICAL LINK ADDRESS #
  77. ITEM I ; # LOOP INDEX #
  78. ITEM FIRST ; # FIRST CONNECTION TO START LOOKING FROM #
  79. ITEM STPSZ ; # STEP DIRECTION (+1 OR -1) #
  80. ITEM FOUND B; # LOOP TERMINATOR WHEN WE FIND THE REQUESTED CONN#
  81. ARRAY CNX;
  82. BEGIN
  83. ITEM NCN U(0,0,60); # NETWORK CONNECTION NUMBER #
  84. ITEM CN1 U(0,52,4); # INDEX TO NCNT #
  85. ITEM CN2 U(0,56,4); # INDEX TO NCNB #
  86. END
  87. #**********************************************************************#
  88. BEGIN
  89. CONTROL IFEQ DEBUG,1;
  90. XTRACE("VLLCB") ;
  91. CONTROL FI ;
  92. LLCBAD = 0 ; # PRE - SETTING #
  93. FOUND = FALSE ;
  94. PARAMS1 = 0 ;
  95. PARAMP3 = 0 ;
  96. P<SUPMSG> = PARAMP1 + BLKHSIZE + AIPHSIZE ;
  97. P<SMNVF> = P<SUPMSG> ; # CR/IAP/N FROM NVF #
  98. IF CRISNOD[0] EQ 0 AND CRIDNOD[0] EQ 0
  99. THEN # THIS IS INTRA HOST #
  100. BEGIN
  101. IF TNTLLAD[0] EQ 0
  102. THEN # NO INTRA HOST DUMMY LLCB YET #
  103. BEGIN
  104.  
  105. MGETS(LLCBSIZE,LLCBAD,TRUE) ;
  106. P<LLCB> = LLCBAD ;
  107. LLCBID [0] = LLCBIDVALUE ; # FORMAT BASIC FIELDS #
  108. LLCBHN [0] = 0 ;
  109. LLCBTN [0] = 1 ;
  110. LLCBHH[0] = TRUE ;
  111. LLCBHRL[0]= 3 ;
  112. LLCBNRL[0]= 3 ;
  113. LLCBFP [0] = 0 ; # THIS IS THE LAST IN THE LLCB-RING #
  114. IF TNTNLL[1] NQ 0
  115. THEN # BUT IT IS NOT THE FIRST #
  116. BEGIN
  117. P<LLCB> = TNTLLAD[1] ; # THIS IS THE FIRST #
  118. FOR I = 1 STEP 1 WHILE LLCBFP[0] NQ 0 DO
  119. BEGIN
  120. P<LLCB> = LLCBFP[0] ; # THAT IS THE NEXT #
  121. END
  122. LLCBFP[0] = LLCBAD ; # CAIN TO NEW ONE #
  123. TEMPLL = P<LLCB> ;
  124. P<LLCB> = LLCBAD ;
  125. LLCBBP[0] = TEMPLL ; # AND CHAIN BACK #
  126. END
  127. ELSE
  128. BEGIN
  129. TNTLLAD[1] = LLCBAD; # STORE LLCB ADDR IN TNT TABLE #
  130. LLCBBP[0] = 0 ; # IT IS THE FIRST ONE #
  131. END
  132. TNTNLL[1] = TNTNLL[1] + 1 ;
  133.  
  134. MGETS(LLCBSIZE,LLCBAD,TRUE) ;
  135. P<LLCB> = LLCBAD ; # THIS IS THE SECOND DUMMY #
  136. LLCBID [0] = LLCBIDVALUE ;
  137. LLCBHN [0] = 1 ;
  138. LLCBTN [0] = 0 ;
  139. LLCBHH[0] = TRUE ;
  140. LLCBHRL[0]= 3 ;
  141. LLCBNRL[0]= 3 ;
  142. LLCBFP [0] = 0 ;
  143. LLCBBP [0] = 0 ; # CANNOT BE MORE THAN 1 LIKE THIS #
  144. TNTNLL [0] = 1 ;
  145. TNTLLAD[0] = LLCBAD ;
  146.  
  147. END
  148. ELSE
  149. LLCBAD = TNTLLAD[0] ;
  150. END
  151. ELSE
  152. LOCLLCB(CRISNOD[0],CRIDNOD[0],LLCBAD) ;
  153. P<LLCB> = LLCBAD ;
  154. IF P<LLCB> EQ 0 # NO LLCB AVAILABLE #
  155. OR ( LLCBAD NQ 0 AND LLCBWOF[0] ) # LLCB BUT FAILURE IN #
  156. # PROGRESS #
  157. THEN
  158. BEGIN # NO SUCH LLCB EXISTS #
  159. PARAMS1 = RCIA"NLL" ; # REASON CODE = 35, NO LLCB EXISTS #
  160. END
  161. # #
  162. ELSE
  163. # #
  164. BEGIN # THIS LOGICAL LINK EXISTS.LET"S CHOOSE A CONNECTION #
  165. PARAMP3 = LLCBAD ;
  166. P<LLCB> = LLCBAD ; # BASE LLCB #
  167. IF CRISNOD[0] GR CRIDNOD[0]
  168. THEN
  169. BEGIN # WE START LOOKING FROM HIGHEST CONNECTION#
  170. FIRST = 1 ; # START LOOKING FROM CONNECTION = 1 #
  171. STPSZ = 1 ;
  172. END
  173. ELSE
  174. BEGIN
  175. FIRST = LLCBESIZE * ( NCNTSIZE-NCNTHSIZE) - 1 ;
  176. STPSZ = -1 ; # SEARCH BACKWARDS #
  177. END
  178. #
  179.   NOW LOOP FOR SEARCH UNTIL FIRST NCNB ADDRESS IS ZERO
  180. #
  181. COUNT = 0 ; # PRESET COUNT FROM 1 TO 255 #
  182. FOR I = FIRST STEP STPSZ WHILE ( NOT FOUND )
  183. AND COUNT LS
  184. ( ( LLCBESIZE *
  185. (NCNTSIZE - NCNTHSIZE)) - 1 )
  186.  
  187. # COUNT ONLY GO FROM 1 TO 255 MAX #
  188. DO
  189. BEGIN
  190. NCN = I ; # TRY THIS CONNECTION NUMBER #
  191. COUNT = COUNT + 1 ;
  192. IF LLCBNCNT[LLCBHSIZE + CN1] EQ 0 # NO NCNT FOR THIS ENTRY#
  193. THEN
  194. FOUND = TRUE ;
  195. ELSE # THERE IS A NCNT EXISTING #
  196. BEGIN
  197. P<NCNT> = LLCBNCNT[LLCBHSIZE + CN1] ;
  198. IF NCNTNCNB[NCNTHSIZE + CN2] EQ 0 # NO NCNB TO NCNT ENTRY #
  199. THEN
  200. FOUND = TRUE ;
  201. END
  202. END # SEARCH LOOP #
  203. IF NOT FOUND # DID NOT FIND ANY ENTRY FOR NCNT #
  204. THEN
  205. BEGIN # NO NCNT AVAILABLE, SEND RC = TEMP #
  206. PARAMP3 = 0 ; # UNVAILABLE. #
  207. PARAMS1 = RCIA"NLL" ;
  208. END
  209. ELSE
  210. PARAMP4 = NCN ; # ENTRY FOUND #
  211.  
  212. END # CONNECTION CHOOSING #
  213. # #
  214. IF PARAMS1 NQ 0
  215. THEN
  216. BEGIN # ERROR OCCURED #
  217. P<ACNB> = PARAMP2 ;
  218. PARAMS2 = ACNBACN[0] ; # APPLICATION CONNECTION NUMBER #
  219. PARAMS3 = 0 ; # APPLICATION NUMBER=0 MEANS NOT FIRST CALL #
  220. PARAMS4 = PARAMP2 ; # ACNB ADDRESS #
  221. PARAMS7 = 0; # NO EXTRA WORDS PASSED #
  222. OVLNAME = HCRIAPRP ; # OVERLAY TO SEND CR/IAP/R TO NVF #
  223. OVLCALL ; # LOAD AND EXECUTE OVERLAY #
  224. END # ERROR OCCURED #
  225. GOTO RJMAIN ;
  226. END # MAIN #
  227. TERM
cdc/nos2.source/nam5871/hvllcb.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator