User Tools

Site Tools


cdc:nos2.source:nam5871:nlopip

NLOPIP

Table Of Contents

  • [00015] PRGM NLOPIP
  • [00090] PROC MRELS
  • [00091] PROC LOCLLCB
  • [00092] PROC NXBLINK
  • [00093] PROC OMSG
  • [00094] PROC OVLCALL
  • [00095] PROC XTRACE

Source Code

NLOPIP.txt
  1. *DECK NLOPIP
  2. USETEXT ACB
  3. USETEXT AHEADER
  4. USETEXT APPSTAT
  5. USETEXT DRHDR
  6. USETEXT LLCB
  7. USETEXT NBT
  8. USETEXT NHEADER
  9. USETEXT NIPDEF
  10. USETEXT OVERLAY
  11. USETEXT PARAMP
  12. USETEXT PARAMS
  13. USETEXT PT
  14. USETEXT SUPMSG
  15. PRGM NLOPIP;
  16. # LINK DOWNLINE (OUTBOUND) SUPERVISORY MESSAGE FOR PIP #
  17.  
  18. STARTIMS;
  19. #
  20. *1DC NLOPIP
  21. *
  22. * 1. PROC NAME AUTHOR DATE
  23. * NLOPIP E. GEE 85/04/02
  24. *
  25. * 2. FUNCTIONAL DESCRIPTION
  26. * LINK CS/NS SUPERVISORY MESSAGES TO OUTBOUND BUFFER.
  27. *
  28. * 3. METHOD USED
  29. * CHECK THAT THERE IS A CORRECT NBT ENTRY FOR THE SPECIFIC
  30. * COUPLER.
  31. * IF SUPERVISORY MESSAGE IS FROM CS,
  32. * CHECK THAT LOGICAL LINK EXISTS AND SUPERVISION EXISTS FOR THE
  33. * LOGICAL LINK.
  34. * CHECK NPU OFF FLAG, ACTIVE FLAG, DOWN FLAG, BOOTSTRAP FLAG, AND
  35. * LLK FLAG TO ALLOW SUITABLE MESSAGES TO BE LINKED.
  36. * IF NO ERROR ENCOUNTERED,
  37. * CONVERT APPLICATION HEADER TO NETWORK HEADER.
  38. * LINK MESSAGE TO PIP OUTBOUND CHAIN.
  39. * ELSE (BAD SUP MSG FROM CS/NS),
  40. * CALL OMSG TO ISSUE DAYFILE MESSAGE.
  41. * CALL NGIGO TO DAYFILE AND DISCARD BAD SUPERVISORY MESSAGE.
  42. *
  43. * 4. ENTRY PARAMETERS
  44. * ACBADDR ACB ADDRESS OF NS/CS
  45. * PARAMP1 MESSAGE BUFFER ADDRESS
  46. *
  47. * 5. EXIT PARAMETERS
  48. * NONE
  49. *
  50. * 6. COMDECKS CALLED
  51. * ACB APPLICATION CONTROL BLOCK TEMPLATE
  52. * AHEADER APPLICATION BLOCK HEADER WORD TEMPLATE
  53. * APPSTAT NETWORK WORKLIST PROCESSING TABLE
  54. * DRHDR DATA ENTRY HEADER WORD TEMPLATE
  55. * LLCB LOGICAL LINK CONTROL BLOCK TEMPLATE
  56. * NBT NETWORK BUFFER TABLE
  57. * NHEADER NETWORK BLOCK HEADER WORD TEMPLATE
  58. * NIPDEF NIP CONSTANT DEFINITIONS
  59. * OVERLAY OVERLAY TABLE
  60. * PARAMP PARAMETERS PASSED TO PRIMARY OVERLAY
  61. * PARAMS PARAMETERS PASSED TO SECONDARY OVERLAY
  62. * PT POINTER TABLE
  63. * SUPMSG SUPERVISORY MESSAGE TEMPLATES
  64. *
  65. * 7. ROUTINES AND OVERLAYS CALLED
  66. * LOCLLCB LOCATE LOGICAL LINK
  67. * NXBLINK LINK MESSAGE ON PIP OUTBOUND CHAIN
  68. * OMSG ISSUE DAYFILE MESSAGE
  69. * OVLCALL LOAD AND EXECUTE OVERLAY
  70. * XTRACE TRACE CALLS
  71. *
  72. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  73. *
  74. * * BAD SUP MSG FROM NS/CS DISCARDED *
  75. *
  76. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  77. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
  78. * TO RETURN TO THE CALLING PROGRAM.
  79. *
  80. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  81. * OVERLAY BUFFER SIZE MINUS 5 (560B WORDS).
  82. *
  83. * THIS OVERLAY IS CALLED BY HPPUT.
  84. *
  85.  #
  86. STOPIMS;
  87.  
  88. XREF
  89. BEGIN
  90. PROC MRELS; # RELEASE BUFFER SPACE #
  91. PROC LOCLLCB; # LOCATE LOGICAL LINK #
  92. PROC NXBLINK ; # LOG MESSAGE INTO PIP OUT #
  93. PROC OMSG; # ISSUE DAYFILE MESSAGE #
  94. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  95. PROC XTRACE; # RECORD TRACES #
  96. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  97. END
  98.  
  99. # LOCAL VARIABLES #
  100.  
  101. ITEM BUFAD; # BUFFER ADDRESS #
  102. ITEM ERRORF B; # ERROR FLAG #
  103. ITEM CNODE; # COUPLER NODE #
  104. ITEM I; # LOOP CONTROL VARIABLE #
  105. ITEM IND; # INDEX #
  106. ITEM INDX; # INDEX #
  107. ITEM TEMP; # SAVE APPLICATION BLOCK HEADER #
  108. ITEM FOUND B ; # MATCHED NPU FLAG #
  109. ITEM TEMPDN ; # TEMPORARY DEST. NODE #
  110.  
  111. ARRAY MSG01 S(4);
  112. BEGIN
  113. ITEM MSG011 C(0,0,34) = [" BAD SUP MSG FROM NS/CS DISCARDED."];
  114. ITEM MSG01E U(3,24,36) = [0];
  115. END
  116.  
  117. #**********************************************************************#
  118.  
  119. BEGIN # NLOPIP #
  120. CONTROL IFEQ DEBUG,1;
  121. XTRACE("LOPIP") ;
  122. CONTROL FI;
  123.  
  124. P<DRHDRWD> = 0; # DATA BLOCK HEADER ADDRESS #
  125. P<ACB> = ACBADDR; # ADDRESS OF CS/NS ACB #
  126. ERRORF = TRUE; # INITIALIZE ERROR FLAG #
  127. P<SUPMSG> = PARAMP1 + DBHSIZE + ABHSIZE; # SM ADDRESS #
  128. P<AHEADER> = PARAMP1 + DBHSIZE; # APPLICATION HEADER ADDR #
  129. CNODE = ABHSN[0]; # COUPLER NODE #
  130. P<SMNIP> = P<SUPMSG>;
  131. TEMPDN = ABHDN[0]; # DESTINATION NODE #
  132. FOUND = FALSE;
  133. #
  134.   SEARCH FOR NBT ENTRY WITH MATCHING COUPLER NODE NUMBER
  135. #
  136. FOR I = 0 STEP NBTFETNO WHILE I LQ NBTMAXID
  137. AND NOT FOUND
  138. DO
  139. BEGIN # SEARCH FOR NBTE WITH HN = COUPLE #
  140. IF NBTHN[I] EQ CNODE
  141. AND NBTIUF[I]
  142. THEN
  143. BEGIN # FOUND THE ENTRY #
  144. FOUND = TRUE ;
  145. IND = I; # SAVE INDEX #
  146. END
  147. END # SEARCH FOR NBTE WITH HN = COUPLR #
  148.  
  149. I = IND;
  150. INDX = I+4; # INDEX INTO PIP FLAGS IN NBT 5TH FET #
  151. #
  152.   CHECK IF OKAY TO SEND SUPERVISORY MESSAGE TO NPU
  153. #
  154. IF FOUND AND # ACTIVE NBT EXISTS #
  155. NOT NBTOF[INDX] AND # NPU NOT OFF IN EST#
  156. ( ( NBTAF[INDX] AND # NPU ACTIVE #
  157. NOT NBTMF[INDX] ) OR # AND SAMP IS NOT RUNNING#
  158. ( PFC EQ NPU AND # NS DUMP-LOAD SM FOR #
  159. CNODE EQ TEMPDN AND # LOCAL NPU-S WHICH IS #
  160. ( NOT NBTAF[INDX] OR # NOT AC AND SAM NOT LOAD#
  161. NBTDF[INDX] ) ) OR # OR IS IN NPU DUMP-LOAD #
  162. ( NBTLF[INDX] AND # PIP WAIT FOR REG/CP RSP#
  163. PFCSFC[0] EQ REGCP AND # REG/CP RSP TO PIP ALLOW#
  164. REGR[0] ) ) # RESPONSE BIT IS ON #
  165. THEN
  166. BEGIN
  167. ERRORF = FALSE; # NO ERROR ENCOUNTERED #
  168. END
  169. IF ACBAN[0] EQ PROCAN[CSORD]
  170. THEN # SUPERVISORY MESSAGE IS FROM CS #
  171. BEGIN
  172. ERRORF = TRUE;
  173. LOCLLCB(ABHSN[0],ABHDN[0],P<LLCB>) ;
  174. IF P<LLCB> NQ 0 AND # LOGICAL LINK EXISTS #
  175. LLCBCS[0] # CS HAS SUPERVISION OF THIS NPU #
  176. THEN # VALID SUPERVISORY MESSAGE TO SEND TO PIP#
  177. BEGIN
  178. ERRORF = FALSE; # VALID FOR CS TO SEND SUP MSG TO THIS NPU#
  179. END
  180. END
  181. IF NOT ERRORF
  182. THEN # NO ERROR WAS FOUND IN SUP MSG #
  183. BEGIN
  184. #
  185.   CONVERT ABH TO NETWORK HEADER
  186. #
  187. TEMP = ABHWORD[0]; # SAVE APPLICATION HEADER #
  188. ABHWORD[0] = 0; # CLEAR APPLICATION HEADER #
  189. P<NHEADER> = PARAMP1 + DBHSIZE; # NETW HEADER ADDR #
  190. P<AHEADER> = LOC(TEMP); # APPLICATION HEADER #
  191. DN[0] = TEMPDN; # DESTINATION NODE #
  192. SN[0] = CNODE; # SOURCE NODE #
  193. CN[0] = 0;
  194. BT[0] = NETCMD; # BLOCK TYPE #
  195. NHACT[0] = ABHACT[0]; # CHARACTER TYPE #
  196. CC[0] = ABHTLC[0]; # TEXT LENGTH #
  197. IND = NBTINDX[I]*NBTFETNO + OSTFET;
  198. NXBLINK(PARAMP1,IND); # LINK MESSAGE TO PIP OUTBOUND QUEUE #
  199. END
  200. ELSE # DISCARD BAD SUPERVISORY MESSAGE #
  201. BEGIN
  202. OMSG(MSG01,0); # ISSUE DIAGNOSTICS DAYFILE MESSAGE #
  203. PARAMS1 = PARAMP1;
  204. P<DRHDRWD> = PARAMP1;
  205. PARAMS2 = BLKBS[0]; # SIZE OF BAD SUP MSG BLOCK #
  206. OVLNAME = ODAYFLP; # NAME OF OVERLAY TO LOAD #
  207. OVLCALL;
  208. END
  209. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  210. END
  211. TERM
cdc/nos2.source/nam5871/nlopip.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator