User Tools

Site Tools


cdc:nos2.source:nam5871:relllcb

RELLLCB

Table Of Contents

  • [00013] PRGM RELLLCB
  • [00081] PROC MRELS
  • [00082] PROC MGETS
  • [00083] PROC OSCHAPP
  • [00084] PROC BLINK
  • [00086] PROC XTRACE
  • [00087] PROC BLDKWL

Source Code

RELLLCB.txt
  1. *DECK RELLLCB
  2. USETEXT LLCB
  3. USETEXT NHEADER
  4. USETEXT NIPDEF
  5. USETEXT AHEADER
  6. USETEXT AT
  7. USETEXT SUPMSG
  8. USETEXT PARAMS
  9. USETEXT PT
  10. USETEXT TNT
  11. USETEXT KDIS
  12. USETEXT KSTTAB
  13. PRGM RELLLCB;
  14. # DELETE LOGICAL LINK CONTROL BLOCK #
  15.  
  16. STARTIMS;
  17. #
  18. *1DC RELLLCB
  19. *
  20. * 1. PROC NAME AUTHOR DATE
  21. * RELLLCB E.T. WAN 81/03/28
  22. *
  23. * 2. FUNCTIONAL DESCRIPTION
  24. * THIS ROUTINE RELEASES A LOGICAL LINK CONTROL BLOCK.
  25. *
  26. * 3. METHOD USED
  27. * CALL MGETS TO RELEASE THE LOGICAL LINK CONTROL BLOCK.
  28. * IF ONLY ONE LINK EXISTS FOR THE TERMINAL NODE, CLEAR THE
  29. * TNT ENTRY. IF MORE THAN ONE LINK EXIST, UPDATE ALL AFFECTED
  30. * FORWARD AND BACKWARD POINTERS.
  31. * DECREMENT THE NUMBER OF LOGICAL LINKS IN TNT ENTRY.
  32. * INFORM NVF THAT A LINK WENT DOWN (FOR THE LID/PID MANEGMENT)
  33. *
  34. * 4. ENTRY PARAMETERS
  35. * PARAMS1 NETWORK BLOCK HEADER ADDRESS
  36. * PARAMS2 ADDRESS OF LOGICAL LINK CONTROL BLOCK TO
  37. * BE DELETED.
  38. *
  39. * 5. EXIT PARAMETERS
  40. * NONE
  41. *
  42. * 6. COMDECKS CALLED
  43. * LLCB
  44. * NHEADER
  45. * NIPDEF
  46. * PARAMS
  47. * PT AT
  48. * TNT AHEADER
  49. * KDIS SUPMSG
  50. * OSSIZE
  51. *
  52. * 7. ROUTINES AND OVERLAYS CALLED
  53. * MRELS RELEASE BUFFER SPACE
  54. * XTRACE TRACE CALL
  55. * BLINK LINK A MESSAGE TO APPLICATION
  56. * MGETS GET A BUFFER SPACE
  57. * OSCHAPP SCHEDULE APPLICATION
  58. * KDEL DELETE A LINE FROM STATUS DISPLAY
  59. *
  60. * 8. DAYFILE MESSAGES
  61. * NONE
  62. *
  63. * THIS PROGRAM IS A SECONDARY OVERLAY LOADED BY SUBROUTINE
  64. * OVLCALL. WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO
  65. * LOCATION RJMAIN TO RETURN TO THE CALLING PROGRAM.
  66. *
  67. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  68. *CALL OSSIZE
  69. *
  70. * THIS OVERLAY IS CALLED BY NPREGLL, NPREGCP.
  71. *
  72.  #
  73. STOPIMS;
  74.  
  75. #
  76. **** EXTERNAL ENTRY POINTS
  77. #
  78.  
  79. XREF
  80. BEGIN
  81. PROC MRELS; # RELEASE BUFFER SPACE #
  82. PROC MGETS ;
  83. PROC OSCHAPP ;
  84. PROC BLINK ;
  85. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  86. PROC XTRACE; # RECORD TRACE #
  87. PROC BLDKWL; # FORMAT KWL TO DELETE LLK ENTRY #
  88. END
  89.  
  90. #
  91. * LOCAL VARIABLES
  92. #
  93.  
  94. ITEM IDXTN; # TNT ENTRY INDEX #
  95. ITEM SAVBP; # SAVE LLCB BACKWARD POINTER #
  96. ITEM BUFADDR ;
  97. ITEM SAVFP; # SAVE LLCB FORWARD POINTER #
  98.  
  99.  
  100.  
  101.  
  102.  
  103. BEGIN # RELLLCB #
  104. CONTROL IFEQ DEBUG,1 ;
  105. XTRACE("RLLCB") ;
  106. CONTROL FI;
  107.  
  108. P<LLCB> = PARAMS2; # LOCATION OF LOGICAL LINK CONTROL BLOCK #
  109. IDXTN = LLCBTN[0] ; # INDEX INTO TNT #
  110. IF ATACBA[NVFAN] NQ 0
  111. THEN
  112. BEGIN # NVF ALREADY NETTED ON #
  113. #
  114.   GET A BUFFER FOR MESSAGE TO INFORM NVF
  115. #
  116. MGETS( LCRSLL + ABHSIZE + BLKHSIZE , BUFADDR , TRUE ) ;
  117. #
  118.   SET UP APPLICATION HEADER
  119. #
  120. P<AHEADER> = BUFADDR + BLKHSIZE ;
  121. ABHABT[0] = APPCMD ;
  122. ABHACT[0] = CT60TRANS ;
  123. ABHTLC[0] = LCRSLL ;
  124. #
  125.   SET-UP THE MESSAGE ITSELF
  126. #
  127. P<SUPMSG> = BUFADDR + ABHSIZE + BLKHSIZE ;
  128. # #
  129. PFCSFC[0] = CRSLL ;
  130. P<SMNVF> = P<SUPMSG> ;
  131. # #
  132. CRSLDN [0] = LLCBTN[0] ; # DESTINATION NODE NUMBER #
  133. CRSLSN [0] = LLCBHN[0] ; # SOURCE NODE NUMBER #
  134. CRSLST [0] = 0 ; # LOGICAL LINK DOWN SIGNAL #
  135. #
  136.   AND LINK MESSAGE TO NVF
  137. #
  138. BLINK ( BUFADDR,ATACBA[NVFAN]) ; # QUEUE TO NVF #
  139. OSCHAPP (ATACBA[NVFAN]) ;
  140. END # NVF ALREADY NETTED ON #
  141.  
  142. IF KDST[0]
  143. AND LLCBHN[0] NQ 0 # NOT INTRA-HOST LOGICAL LINK #
  144. AND LLCBTN[0] NQ 0
  145. THEN # DELETE LOGICAL LINK ENTRY FROM STATUS DISPLAY #
  146. BLDKWL(KST"LLK",LLCBKNDX[0],0,KDELIDVALUE);
  147. # #
  148. IF TNTNLL[IDXTN] EQ 1 # ONE LLCB EXISTS #
  149. THEN
  150. BEGIN
  151. MRELS(P<LLCB>); # RELEASE LLCB SPACE #
  152. IF IDXTN NQ 0
  153. THEN
  154. TNTWD[IDXTN] = 0; # CLEAR TNT ENTRY #
  155. ELSE
  156. BEGIN # ZEROETH ENTRY A-A LOGICAL LINK #
  157. TNTNLL[IDXTN] = 0;
  158. TNTLLAD[IDXTN] = 0;
  159. END
  160. END
  161.  
  162. ELSE
  163. BEGIN
  164. SAVBP = LLCBBP[0]; # SAVE BACKWARD POINTER #
  165. SAVFP = LLCBFP[0]; # SAVE FORWARD POINTER #
  166. MRELS(P<LLCB>); # RELEASE LLCB SPACE #
  167.  
  168. IF SAVBP EQ 0 # FIRST LLCB TO BE DELETED #
  169. THEN
  170. BEGIN
  171. TNTLLAD[IDXTN] = SAVFP; # UPDATE LLCB ADDRESS IN TNT #
  172. P<LLCB> = SAVFP; # MOVE TO THE FOLLOWING LLCB #
  173. LLCBBP[0] = 0; # CLEAR BACKWARD POINTER #
  174. END
  175.  
  176. ELSE
  177. BEGIN
  178. IF SAVFP EQ 0 # LAST LLCB TO BE DELETED #
  179. THEN
  180. BEGIN
  181. P<LLCB> = SAVBP; # MOVE TO THE PREVIOUS LLCB #
  182. LLCBFP[0] = 0; # CLEAR FORWARD POINTER #
  183. END
  184.  
  185. ELSE # NOT FIRST OR LAST LLCB TO BE DELETED #
  186. BEGIN
  187. P<LLCB> = SAVFP; # MOVE TO THE FOLLOWING LLCB #
  188. LLCBBP[0] = SAVBP; # UPDATE BACKWARD POINTER #
  189. P<LLCB> = SAVBP; # MOVE TO THE PREVIOUS LLCB #
  190. LLCBFP[0] = SAVFP; # UPDATE FORWARD POINTER #
  191. END
  192.  
  193. END
  194.  
  195. TNTNLL[IDXTN] = TNTNLL[IDXTN] - 1; # DECREMENT LINK NUMBER #
  196. END;
  197.  
  198. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  199.  
  200. END # RELLLCB #
  201.  
  202. TERM
cdc/nos2.source/nam5871/relllcb.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator