User Tools

Site Tools


cdc:nos2.source:nam5871:hconreq

HCONREQ

Table Of Contents

  • [00012] PROC HCONREQ
  • [00069] PROC ABORT
  • [00070] PROC BLINK
  • [00071] PROC LOCLLCB
  • [00072] PROC LOCNCNT
  • [00073] PROC OSCHAPP
  • [00074] PROC MRELS
  • [00075] PROC XTRACE

Source Code

HCONREQ.txt
  1. *DECK HCONREQ
  2. USETEXT ACB
  3. USETEXT ACNB
  4. USETEXT AT
  5. USETEXT LLCB
  6. USETEXT NCNB
  7. USETEXT NCNT
  8. USETEXT NIPDEF
  9. USETEXT PARAMS
  10. USETEXT PT
  11. USETEXT SUPMSG
  12. PROC HCONREQ;
  13. STARTIMS;
  14. #
  15. *1DC HCONREQ
  16. * 1. PROC NAME AUTHOR DATE
  17. * HCONREQ C. BITTNER 81/12/01
  18. *
  19. * 2. FUNCTIONAL DESCRIPTION
  20. * FORMAT AND SEND CON/REQ/R TO APPLICATION
  21. *
  22. * 3. METHOD
  23. * USE CR/SWH/R BUFFER
  24. * SET UP CON/REQ/R
  25. * SET FUNCTION CODE
  26. * SET NEW ACN ASSIGNED TO THIS APPLICATION
  27. * QUEUE CON/REQ/R ON APPLICATION-S ACB
  28. *
  29. * 4. ENTRY PARAMETERS
  30. * PARAMS1 - SM BUFFER OF CR/SWH/R
  31. * PARAMS2 - ACNB OF NEW CONNECTION
  32. *
  33. * 5. EXIT PARAMETERS
  34. * NONE
  35. *
  36. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  37. * ACB APPLICATION CONTROL BLOCK TEMPLATE
  38. * ACNB
  39. * AT
  40. * LLCB LOGICAL LINK CONTROL BLOCK TEMPLATE
  41. * NCNB
  42. * NCNT NETWORK CONNECTION TABLE TEMPLATE
  43. * NIPDEF
  44. * PARAMS
  45. * PT
  46. * SUPMSG
  47. *
  48. * 7. ROUTINES AND OVERLAYS CALLED
  49. * ABORT - ISSUE DAYFILE MESSAGE AND ABORT NIP
  50. * BLINK - QUEUE MSG ON APPL-S ACB
  51. * LOCLLCB - LOCATE LOGICAL LINK CONTROL BLOCK
  52. * LOCNCNT - LOCATE NETWORK CONNECTION TABLE
  53. * OSCHAPP - SCHEDULE APPLICATION
  54. * MRELS - RELEASE BUFFER SPACE
  55. * XTRACE - RECORD PROCEDURE CALL
  56. *
  57. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  58. * THIS PROCEDURE IS CALLED BY SECONDARY OVERLAY STRTSW
  59. * VIA HCSTTP.
  60. *
  61.  #
  62. STOPIMS;
  63.  
  64. #
  65.   EXTERNAL VARIABLES
  66. #
  67. XREF
  68. BEGIN
  69. PROC ABORT; # ISSUE DAYFILE MESSAGE AND ABORT NIP #
  70. PROC BLINK; # QUEUE MSG ON APPL-S ACB #
  71. PROC LOCLLCB; # LOCATE LOGICAL LINK CONTROL BLOCK #
  72. PROC LOCNCNT; # LOCATE NETWORK CONNECTION TABLE #
  73. PROC OSCHAPP; # SCHEDULE APPLICATION #
  74. PROC MRELS ;
  75. PROC XTRACE; # RECORD PROCEDURE CALL #
  76. END
  77.  
  78.  
  79. #
  80.   INTERNAL VARIABLES
  81. #
  82. ITEM BUFADDR; # SM BUFFER ADDRESS #
  83. ITEM ERROR; # INTERNAL ERROR FLAG #
  84.  
  85. #**********************************************************************#
  86.  
  87. BEGIN
  88.  
  89. CONTROL IFEQ DEBUG,1;
  90. XTRACE("HCONR") ;
  91. CONTROL FI;
  92.  
  93. BUFADDR = PARAMS1; # SM BUFFER CR/SWH/R #
  94. P<SMNVF> = BUFADDR + BLKHSIZE + ABHSIZE; # FWA OF CR/SWH/R #
  95. P<SUPMSG> = P<SMNVF>; # BASE CON/REQ #
  96.  
  97. # SET UP CON/REQ/R #
  98.  
  99. PFCSFC[0] = CONREQ; # SET FUNCTION CODE #
  100. P<ACNB> = PARAMS2;
  101. CONACN[0] = ACNBACN[0]; # NEW ACN ASSIGNED TO THIS APPL #
  102. IF ACNBBS[0] EQ (ACNBSIZE+ACNBAPEN)
  103. THEN # A-A CONNECTION SENDING APPL #
  104. BEGIN
  105. IF ACNBDT[0] EQ DT$INTA
  106. THEN # INTRAHOST A-A CONNECTION #
  107. BEGIN # ADD CALLED APP NAME TO CON/REQ #
  108. CONANM[0] = ACNBANM[0]; # NAME OF CALLED APPLICATION #
  109. END
  110. CONABN[0] = ACNBABN[0]; # APPLICATION BLOCK NUMBER #
  111. ACNBBS [0] = ACNBSIZE; # GET RID NOW OF APPENDIX ACNB #
  112. ACNBABS[0] = ACNBAPEN; # GET READY FOR MRELS CALL ON APPENDIX#
  113. MRELS (PARAMS2+ACNBSIZE);# AND RELEASE THE APPENDIX FROM ACNB #
  114. END
  115. ELSE # APPLICATION RECEIVING NEW CONNECTION #
  116. BEGIN
  117. IF ACNBDT[0] EQ DT$INTA
  118. THEN # INTRAHOST A-A CONNECTION #
  119. BEGIN # ADD CALLED APP NAME TO CON/REQ #
  120. P<NCNB> = ACNBNCNB[0]; # ADDR OF CORRESPONDING NCNB #
  121. ERROR = 0; # INITIALIZE INTERNAL ERROR FLAG #
  122. IF P<NCNB> EQ 0
  123. THEN # INTERNAL ERROR - NCNB SHOULD EXIST #
  124. BEGIN
  125. ERROR = 1; # SET INTERNAL ERROR FLAG #
  126. END
  127. ELSE # NCNB EXISTS #
  128. BEGIN
  129. LOCLLCB(NCNBTN[0],NCNBHN[0],P<LLCB>); # FIND REVERSE LLCB #
  130. # FOR INTRAHOST A-A CONNECTION #
  131. IF P<LLCB> EQ 0
  132. THEN # INTERNAL ERROR - LLCB SHOULD EXIST #
  133. BEGIN
  134. ERROR = 2; # SET INTERNAL ERROR FLAG #
  135. END
  136. ELSE # REVERSE LLCB EXISTS #
  137. BEGIN
  138. LOCNCNT(P<LLCB>,NCNBCN[0],P<NCNT>); # FIND REVERSE NCNT #
  139. IF P<NCNT> EQ 0
  140. THEN # INTERNAL ERR - REVERSE NCNT SHOULD EXIST#
  141. BEGIN
  142. ERROR = 3; # SET INTERNAL ERROR FLAG #
  143. END
  144. ELSE # NCNT EXISTS #
  145. BEGIN
  146. P<NCNB> = NCNTNCNB[0]; # ADDRESS OF REVERSE NCNB #
  147. IF P<NCNB> EQ 0
  148. THEN # NIP ERR - REVERSE NCNB SHOULD EXIST #
  149. BEGIN
  150. ERROR = 4; # SET INTERNAL ERROR FLAG #
  151. END
  152. ELSE # NCNB EXISTS #
  153. BEGIN
  154. P<ACNB> = NCNBACNB[0]; # ADDR OF REVERSE ACNB #
  155. IF P<NCNB> EQ 0
  156. THEN # NIP ERR - REVERSE ACNB SHOULD EXIST #
  157. BEGIN
  158. ERROR = 5; # SET INTERNAL ERROR FLAG #
  159. END
  160. ELSE # ACNB EXISTS #
  161. BEGIN
  162. IF ACNBBS[0] EQ (ACNBSIZE+ACNBAPEN)
  163. THEN # CONNECTION NOT SWITCHED FROM NVF YET #
  164. BEGIN
  165. P<ACB> = ATACBA[ACNBIAN[0]]; # ACB ADDRESS #
  166. END
  167. ELSE # CONNECTION SWITCHED TO INITIATING APP #
  168. BEGIN
  169. P<ACB> = ATACBA[ACNBAN[0]]; # ACB ADDRESS #
  170. END
  171. CONANM[0] = ACBANAME[0]; # NAME OF OTHER APP #
  172. P<ACNB> = PARAMS2; # RESTORE ACNB BASE ARRAY #
  173. END
  174. END
  175. END
  176. END
  177. END
  178. IF ERROR NQ 0
  179. THEN # INTERNAL NIP ERROR HAS OCCURRED #
  180. BEGIN
  181. ABORT("NIP INTERNAL ERROR - HCONREQ",0);
  182. END
  183. END
  184. END
  185.  
  186. # QUEUE ON APPLICATION-S ACB #
  187.  
  188. BLINK(BUFADDR,ATACBA[ACNBAN[0]]); # QUEUE MSG ON APPL-S ACB #
  189. OSCHAPP(ATACBA[ACNBAN[0]]); # SCHEDULE APPLICATION #
  190. RETURN ;
  191. END
  192. TERM
cdc/nos2.source/nam5871/hconreq.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator