User Tools

Site Tools


cdc:nos2.source:nam5871:npregcp

NPREGCP

Table Of Contents

  • [00013] PRGM NPREGCP
  • [00084] PROC LOCLLCB
  • [00085] PROC RELCONN
  • [00086] PROC MRELS
  • [00087] PROC OVLCALL
  • [00088] PROC XTRACE

Source Code

NPREGCP.txt
  1. *DECK NPREGCP
  2. USETEXT LLCB
  3. USETEXT NBT
  4. USETEXT NHEADER
  5. USETEXT NIPDEF
  6. USETEXT OVERLAY
  7. USETEXT PARAMP
  8. USETEXT PARAMS
  9. USETEXT PT
  10. USETEXT SUPMSG
  11. USETEXT TNT
  12. USETEXT DUMPFLG
  13. PRGM NPREGCP;
  14. # PROCESS SUPERVISORY MESSAGE REG/CP FROM PIP #
  15.  
  16. STARTIMS;
  17. #
  18. *1DC NPREGCP
  19. *
  20. * 1. PROC NAME AUTHOR DATE
  21. * NPREGCP E.T. WAN 81/05/26
  22. *
  23. * 2. FUNCTIONAL DESCRIPTION
  24. * PROCESS SUPERVISORY MESSAGE REG/CP
  25. *
  26. * 3. METHOD USED
  27. * VALIDATE THAT NS/CS INDICATORS AND BUFFER LEVEL ARE ZERO IN THE
  28. * MESSAGE.
  29. * CLEAN UP ALL LOGICAL LINKS THAT GO THROUGH THE COUPLER AND SEND
  30. * SM REG/CP TO PIP.
  31. * IF LLCB CANNOT BE RELEASED BECAUSE OF OUTSTANDING
  32. * PRU CONNECTIONS THAN JUST MARK THE LLCB.
  33. * WHEN CONNECTIONS WILL BE TERMINATED (NPPCT)
  34. * THOSE LLCBS WILL BE DISCARDED.
  35. *
  36. * 4. ENTRY PARAMETERS
  37. * PARAMP1 DATA BLOCK HEADER ADDRESS
  38. *
  39. * 5. EXIT PARAMETERS
  40. * NONE
  41. *
  42. * 6. COMDECKS CALLED
  43. * LLCB
  44. * NHEADER
  45. * NIPDEF
  46. * OVERLAY
  47. * PARAMP
  48. * PARAMS
  49. * PT
  50. * SUPMSG
  51. * TNT
  52. * OPSIZE
  53. * NBT
  54. *
  55. * 7. ROUTINES AND OVERLAYS CALLED
  56. * HCSUPCB SEND SM SUP/CB TO CS
  57. * LOCLLCB LOCATE LLCB
  58. * NCREGCP OVL CREATE AND SEND REG/CP TO PIP
  59. * OVLCALL LOAD OVERLAY
  60. * RELCONN PROC RELEASE CONNECTIONS
  61. * RELLLCB OVL RELEASE LLCB
  62. * XTRACE TRACE CALLS
  63. *
  64. * 8. DAYFILE MESSAGES
  65. * NONE
  66. *
  67. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  68. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
  69. * TO RETURN TO THE CALLING PROGRAM.
  70. *
  71. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  72. *CALL OPSIZE
  73. * THIS OVERLAY IS CALLED BY NPNIPSM.
  74. *
  75.  #
  76. STOPIMS;
  77.  
  78. #
  79. **** EXTERNAL VARIABLES
  80. #
  81.  
  82. XREF
  83. BEGIN
  84. PROC LOCLLCB; # LOCATE LLCB #
  85. PROC RELCONN ; # RELEASE ALL CONNECTIONS #
  86. PROC MRELS; # RETURN ADDRESS IN OVLCALL #
  87. PROC OVLCALL; # LOAD OVERLAY #
  88. PROC XTRACE; # TRACE CALLS #
  89. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  90. END
  91.  
  92. #
  93. * LOCAL VARIABLES
  94. #
  95.  
  96. ITEM I; # LOOP CONTROL VARIABLE #
  97. ITEM SENDCPN B=TRUE ; # FLAG TO DECIDE IF TO SEND REG/CP/U #
  98. ITEM NBIND I = 0 ; # INDEX INTO NBT TABLE #
  99. LABEL EXIT; # EXIT FROM PROGRAM #
  100.  
  101. #*********************************************************************#
  102.  
  103.  
  104.  
  105.  
  106.  
  107. BEGIN # NPREGCP #
  108. CONTROL IFEQ DEBUG,1;
  109. XTRACE("NPRCP") ;
  110. CONTROL FI;
  111.  
  112. P<NHEADER> = PARAMP1 + DBHSIZE; # NETWORK BLOCK HEADER ADDRESS #
  113. P<SMNIP> = P<NHEADER> + NBHSIZE; # SM REG/CP ADDRESS #
  114. PARAMP2 = 0; # INITIALIZE RETURN PARAMETER #
  115. IF DN[0] EQ SN[0] # VALID REG/CP RECEIVED FROM PIP #
  116. THEN
  117. BEGIN
  118. SENDCPN = TRUE; # INITIALIZE SEND REG/CP FLAG #
  119. FOR I = TNTHSIZE STEP 1 UNTIL TNTBS - TNTHSIZE
  120. DO # LOOP THROUGH ALL TN'S IN TNT #
  121. BEGIN
  122.  
  123. # LOCATE LLCB WITH HN = SPECIFIC COUPLER NODE FOR EACH TN #
  124.  
  125. IF TNTTN[I] NQ 0 # TERMINAL NODE EXISTS #
  126. THEN
  127. BEGIN
  128. LOCLLCB(DN[0],TNTTN[I],P<LLCB>);
  129. IF P<LLCB> NQ 0 # LLCB EXISTS #
  130. THEN
  131. BEGIN
  132. IF LLCBCS[0] # LINK WAS USED TO COMMUNICATE WITH CS #
  133. AND PROCAN[CSORD] NQ 0
  134. THEN
  135. BEGIN
  136. # SEND SM SUP/CB TO CS #
  137. OVLNAME = HCSUPCBP ;
  138. PARAMS1 = DN[0] ;
  139. PARAMS2 = TNTTN[I] ;
  140. OVLCALL ;
  141. END
  142.  
  143. RCBRK = RCCB"LLF" ; # RC = 15 FOR CR/CB/U IF NEED #
  144. IF NOT LLCBWOF[0] # FIRST TIME TO RELEASE LLINK #
  145. THEN
  146. RELCONN(P<LLCB>,LLFAIL) ; # RELEASE CONN #
  147.  
  148.  
  149. IF LLCBNPC[0] EQ 0
  150. THEN
  151. BEGIN
  152. PARAMS2 = P<LLCB> ;
  153. OVLNAME = RELLLCBP; # RELEASE LLCB #
  154. OVLCALL;
  155. END
  156. ELSE
  157. BEGIN
  158. LLCBWOF[0] = TRUE ;
  159. NBIND = LLCBNBTE[0] * NBTFETNO;
  160. NBTREGW[NBIND] = NBTREGW[NBIND] + 1 ;
  161. SENDCPN = FALSE ;
  162. END
  163. END
  164.  
  165. END
  166.  
  167. END
  168.  
  169. IF SENDCPN
  170. THEN
  171. BEGIN
  172. OVLNAME = NCREGCPP; # SEND REG/CP TO PIP #
  173. PARAMS1 = DN[0]; # COUPLER NODE #
  174. PARAMS2 = 1 ; # FLAG TO SET THE RESPONSE BIT #
  175. OVLCALL;
  176. END
  177. END
  178.  
  179. EXIT:
  180. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  181. END # NPREGCP #
  182.  
  183. TERM
cdc/nos2.source/nam5871/npregcp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator