User Tools

Site Tools


cdc:nos2.source:nam5871:bldacnb

BLDACNB

Table Of Contents

  • [00016] PROC BLDACNB
  • [00079] PROC HALLOCN
  • [00080] PROC KPUT
  • [00081] PROC MGETS
  • [00082] PROC MGROW
  • [00083] PROC OMSG
  • [00084] PROC OVLCALL
  • [00085] PROC ABORT
  • [00086] PROC XTRACE

Source Code

BLDACNB.txt
  1. *DECK BLDACNB
  2. USETEXT NIPDEF
  3. USETEXT ACNT
  4. USETEXT ACNB
  5. USETEXT ACB
  6. USETEXT AT
  7. USETEXT MSGIDX
  8. USETEXT NCNB
  9. USETEXT OVERLAY
  10. USETEXT PARAMP
  11. USETEXT PT
  12. USETEXT KDIS
  13. USETEXT KHDRX
  14. USETEXT SUPMSG
  15. USETEXT SYSTIME
  16. PROC BLDACNB; # BUILD ACNB #
  17. STARTIMS;
  18. #
  19. *1DC BLDACNB
  20. * 1. PROC NAME AUTHOR DATE
  21. * BLDACNB C. BITTNER 81/03/12
  22. *
  23. * 2. FUNCTIONAL DESCRIPTION
  24. * CREATE ACNB AND UPDATE ASSOCIATED HEADER AND ENTRY
  25. * PARAMETERS. ALSO UPDATE ACNT ENTRY.
  26. *
  27. * 3. METHOD
  28. * ALLOCATE A CONNECTION NUMBER.
  29. * CHECK IF APPLICATION CONNECTION TABLE (ACNT) IS FULL.
  30. * IF FULL, REQUEST FOR AN EXTENDED BUFFER (CALLING MGETS)
  31. * AND UPDATE ACNT ADDRESS IN ACB. UPDATE ACNT HEADER
  32. * AND INITIALIZE ENTRY PARAMETERS. REQUEST A
  33. * BUFFER FOR THE APPLICATION CONNECTION BLOCK(ACNB).
  34. * FILL IN INFORMATION FOR ACNB AND LINK TO ACNT AND NCNB.
  35. * UPDATE TOTAL NUMBER OF CONNECTIONS CURRENTLY HELD BY
  36. * THIS APPLICATION IN THE ACB.
  37. *
  38. * 4. ENTRY PARAMETERS
  39. * PARAMP1 - ADDRESS OF SM BUFFER (TEXT) ICN/TE/R
  40. * PARAMP2 - ACB ADDRESS
  41. *
  42. * 5. EXIT PARAMETERS
  43. * PARAMP3 - ACNB ADDRESS
  44. * PARAMP4 - ACNT ADDRESS
  45. *
  46. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  47. * ACNT NIPDEF
  48. * ACNB ACB
  49. * AT
  50. * MSGIDX NCNB
  51. * PARAMP PARAMS
  52. * PT SUPMSG
  53. * SYSTIME
  54. *
  55. * 7. ROUTINES AND OVERLAYS CALLED
  56. * MGROW - EXPAND BUFFER
  57. * MGETS - ALLOCATE A BUFFER
  58. * HALLOCN - ALLOCATE CONNECTION NUMBER
  59. * OMSG - OUTPUT DAYFILE MESSAGE
  60. * OVLCALL - LOAD AND EXECUTE OVERLAY
  61. * RDUMP - DUMP NIP
  62. * XTRACE - RECORD PROCEDURE CALL
  63. *
  64. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  65. * "NIP INTERNAL ERROR - BLDACNB"
  66. * THIS PROCEDURE IS CALLED BY PRIMARY OVERLAY STRTCON VIA
  67. * HCSTTP.
  68. *
  69. *
  70.  #
  71. STOPIMS;
  72.  
  73.  
  74. #
  75.   EXTERNAL VARIABLES
  76. #
  77. XREF
  78. BEGIN
  79. PROC HALLOCN ;
  80. PROC KPUT ;
  81. PROC MGETS; # ALLOCATE A BUFFER #
  82. PROC MGROW; # EXPAND BUFFER #
  83. PROC OMSG; # DAYFILE MESSAGE #
  84. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  85. PROC ABORT ;
  86. PROC XTRACE; # RECORD PROCEDURE CALLS #
  87. END
  88. #
  89.   INTERNAL VARIABLES
  90. #
  91. ITEM ACNBADDR; # ACNB ADDRESS #
  92. ITEM ACNTINDX; # INDEX INTO ACNT #
  93. ITEM FLAG; # FLAG RET IF MOVE SUCCESSFUL - MGROW #
  94. ITEM INDX; # INDUCTION LOOP VARIABLE #
  95. ITEM SIZE ;
  96. ITEM ACNX; # APPLICATION CONNECTION NUMBER #
  97.  
  98. #**********************************************************************#
  99.  
  100.  
  101.  
  102.  
  103.  
  104. BEGIN
  105. CONTROL IFEQ DEBUG,1;
  106. XTRACE("BACNB") ;
  107. CONTROL FI;
  108.  
  109. P<ACB> = PARAMP2;
  110. HALLOCN(P<ACB>,ACNX); # ALLOCATE NEW CONNECTION NUMBER #
  111. ACBNCN[0] = ACBNCN[0] + 1 ; # UPDATE NUMBER OF CONN TO APP#
  112. IF KDIS$RT
  113. AND ACBKNDX[0] NQ 0
  114. AND ACBKNDX[0] GQ KDAPPST[0]
  115. AND ACBKNDX[0] LQ KDAPPND[0]
  116. THEN
  117. KPUT(KHDRNP[0],ACBKNDX[0]-KDAPPST[0],KPAPNCN,ACBNCN[0]);
  118. P<ACNT> = ACBACNT[0]; # BASE ACNT #
  119. ACNTINDX = ACNX + ACNTHSIZE - ACNTMINACN[0]; # ACNT INDX #
  120.  
  121. # BUILD ACNB #
  122. IF PARAMP1 EQ 0
  123. THEN
  124. SIZE = ACNBSIZE + ACNBAPEN ;
  125. ELSE
  126. SIZE = ACNBSIZE ;
  127. MGETS(SIZE,ACNBADDR,TRUE); # ALLOCATE ACNB BUFFER #
  128. P<ACNB> = ACNBADDR; # BASE ACNB #
  129. ACNBID[0] = ACNBIDVALUE; # SET ID OF ACNB #
  130. ACNBAN[0] = ACNTAN[0]; # APPLICATION NUMBER #
  131. ACNBACN[0] = ACNX; # APPLICATION CONNECTION NUMBER #
  132. ACNBD[0] = ATT[ACNBAN[0]]; # DATA TRUNCATION FLAG #
  133. ACNBH[0] = ATH[ACNBAN[0]]; # HALF DUPLEX FLAG #
  134. ACNBTLO[0] = ATDIS[ACNBAN[0]]; # TEMP LIST OFF FLAG #
  135. ACNBTIMERP[0] = ACBTIMERP[0]; # SET APP SPECIFIED TIMEOUT FLAG #
  136. ACNBTIMERF[0] = ACBTIMERP[0]; # SET APP SPECIFIED TIMEOUT FLAG #
  137. IF ACNBTIMERP[0]
  138. THEN # APP SPECIFIED TIMEOUT INTERVAL #
  139. BEGIN
  140. ACNBTIMER[0] = ACBTIMER[0]; # SAVE TIMEOUT INTERVAL IN ACNB #
  141. ACNBINACT[0] = RTSECS[0] + ACNBTIMER[0]; # TIMEOUT RTIME VALUE#
  142. END
  143. ELSE # USE NETWORK TIMEOUT INTERVAL #
  144. BEGIN
  145. ACNBINACT[0] = RTSECS[0] + INACTVAL; # TIMEOUT RTIME VALUE #
  146. END
  147. ACNBINTR[0] = 0 ; # CLEAR INTERUPT CHARACTER #
  148.  
  149. IF PARAMP1 NQ 0 # REQUEST TRIGGERED FROM NETWORK SIDE #
  150. THEN
  151. BEGIN
  152. P<SUPMSG> = PARAMP1 ;
  153. P<SMNIP> = PARAMP1; # BASE SM TEXT ICN/TE/R #
  154. IF PFCSFC[0] EQ ICNTE
  155. THEN
  156. ACNBABL[0] = ICNABL[0]; # SET ABL FROM ICN/TE/R #
  157. ACNBNCNB[0] = NCNBADD; # LINK NCNB ADDRESS #
  158. P<NCNB> = NCNBADD;
  159.  
  160. CONTROL IFEQ DEBUG,1;
  161. IF P<NCNB> EQ 0
  162. THEN
  163. BEGIN
  164. D27M2[0] = "BLDACNB";
  165. OMSG(DFMSG27,0); # DAYFILE "NIP INTERNAL ERROR" #
  166. ABORT(0,0) ;
  167. END
  168. CONTROL FI;
  169.  
  170. NCNBACNB[0] = P<ACNB>; # LINK ACNB ADDRESS #
  171. ACNBDT[0] = NCNBDT[0]; # DEVICE TYPE #
  172. ACNBTC[0] = NCNBTC[0]; # TERMINAL CLASS #
  173. END
  174. ACNTACNB[ACNTINDX] = ACNBADDR; # LINK ACNB ADDR IN ACNT #
  175. # SET EXIT PARAMETERS #
  176. PARAMP3 = ACNBADDR; # ACNB ADDRESS #
  177. PARAMP4 = P<ACNT>; # ACNT ADDRESS #
  178. RETURN ;
  179. END
  180. TERM
cdc/nos2.source/nam5871/bldacnb.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator