User Tools

Site Tools


cdc:nos2.source:nam5871:nlobch

NLOBCH

Table Of Contents

  • [00013] PROC NLOBCH(BUFAD,ERRORF)
  • [00065] PROC MRELS
  • [00066] PROC NXBLINK
  • [00068] PROC XTRACE

Source Code

NLOBCH.txt
  1. *DECK NLOBCH
  2. USETEXT AHEADER
  3. USETEXT BPIPBUF
  4. USETEXT DBGBUF
  5. USETEXT DRHDR
  6. USETEXT NBT
  7. USETEXT NHEADER
  8. USETEXT NIPDEF
  9. USETEXT OVERLAY
  10. USETEXT PARAMP
  11. USETEXT SUPMSG
  12. USETEXT SYSTIME
  13. PROC NLOBCH(BUFAD,ERRORF);
  14. # LINK MESSAGE TO PIP OUTBOUND CHAIN #
  15.  
  16. STARTIMS;
  17. #
  18. *1DC NLOBCH
  19. *
  20. * 1. PROC NAME AUTHOR DATE
  21. * NLOBCH E.T.WAN 81/06/08
  22. * L.T.NGUYEN 81/09/30
  23. *
  24. * 2. FUNCTIONAL DESCRIPTION
  25. * LINK SM REG/CP AND MESSAGES FROM NS,CS TO PIP OUTBOUND BUFFER.
  26. *
  27. * 3. METHOD USED
  28. * CHECK THAT THERE IS A CORRECT NBT ENTRY FOR THE SPECIFIC
  29. * COUPLER.
  30. * CHECK NPU OFF FLAG, ACTIVE FLAG, DOWN FLAG, BOOTSTRAP FLAG, AND
  31. * LLK FLAG TO ALLOW SUITABLE MESSAGES TO BE LINKED.
  32. * CONVERT APPLICATION HEADER TO NETWORK HEADER.
  33. * LINK MESSAGE TO PIP OUTBOUND CHAIN.
  34. *
  35. * 4. ENTRY PARAMETERS
  36. * BUFAD MESSAGE BUFFER ADDRESS
  37. *
  38. * 5. EXIT PARAMETERS
  39. * ERRORF
  40. *
  41. * 6. COMDECKS CALLED
  42. * AHEADER
  43. * DRHDR
  44. * NBT
  45. * NHEADER
  46. * NIPDEF
  47. * SUPMSG
  48. *
  49. * 7. ROUTINES AND OVERLAYS CALLED
  50. * NXBLINK LINK MESSAGE ON PIP OUTBOUND CHAIN
  51. * XTRACE TRACE CALLS
  52. *
  53. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  54. * THIS PROCEDURE IS CALLED BY HPPUT AND NCREGCP.
  55. *
  56.  #
  57. STOPIMS;
  58.  
  59. #
  60. **** EXTERNAL ENTRY POINTS
  61. #
  62.  
  63. XREF
  64. BEGIN
  65. PROC MRELS; # RELEASE BUFFER SPACE #
  66. PROC NXBLINK ; # LOG MESSAGE INTO PIP OUT #
  67.  
  68. PROC XTRACE; # RECORD TRACES #
  69. END
  70.  
  71. # LOCAL VARIABLES #
  72.  
  73. ITEM BUFAD; # BUFFER ADDRESS #
  74. ITEM ERRORF ; # ERROR FLAG #
  75. ITEM CNODE; # COUPLER NODE #
  76. ITEM I; # LOOP CONTROL VARIABLE #
  77. ITEM IND; # INDEX #
  78. ITEM INDX; # INDEX #
  79. ITEM TEMP; # SAVE APPLICATION BLOCK HEADER #
  80. ITEM FOUND B ; # MATCHED NPU FLAG #
  81. ITEM TEMPDN ; # TEMPORARY DEST. NODE #
  82.  
  83. #*********************************************************************#
  84.  
  85.  
  86.  
  87.  
  88.  
  89. BEGIN # NLOBCH #
  90. CONTROL IFEQ DEBUG,1;
  91. XTRACE("LOBCH") ;
  92. CONTROL FI;
  93.  
  94. P<DRHDRWD> = 0; # DATA BLOCK HEADER ADDRESS #
  95. P<SUPMSG> = BUFAD + DBHSIZE + ABHSIZE; # SM ADDRESS #
  96. P<AHEADER> = BUFAD + DBHSIZE; # APPLICATION HEADER ADDR #
  97. CNODE = ABHSN[0]; # COUPLER NODE #
  98. P<SMNIP> = P<SUPMSG>;
  99. TEMPDN = ABHDN[0] ; # DESTINATION NODE #
  100. FOUND = FALSE;
  101. ERRORF = 0; # INITIALIZE ERROR FLAG #
  102.  
  103. FOR I = 0 STEP NBTFETNO WHILE I LQ NBTMAXID
  104. AND NOT FOUND
  105. DO
  106. BEGIN # SEARCH FOR NBTE WITH HN = COUPLE #
  107. IF NBTHN[I] EQ CNODE
  108. AND NBTIUF[I]
  109. THEN
  110. BEGIN # FOUND THE ENTRY #
  111. FOUND = TRUE ;
  112. IND = I; # SAVE INDEX #
  113. END
  114. END # SEARCH FOR NBTE WITH HN = COUPLR #
  115.  
  116. I = IND;
  117. INDX = I+4; # INDEX INTO PIP FLAGS IN NBT 5TH FET #
  118.  
  119. IF FOUND # ACTIVE NBT EXISTS FOR THIS HN #
  120. AND NOT NBTOF[INDX] # NPU NOT OFF IN EST #
  121. AND ((NBTAF[INDX] # NPU ACTIVE #
  122. AND NOT NBTMF[INDX]) # AND SAMP IS NOT RUNNING #
  123. OR (PFC EQ NPU # NS DUMP-LOAD SM #
  124. AND CNODE EQ TEMPDN # FOR LOCAL NPU-S WHICH IS #
  125. AND (NOT NBTAF[INDX] # NOT ACTIVE AND SAMP NOT LOADED #
  126. OR NBTDF[INDX])) # OR IS IN NPU DUMP-LOAD PHASE #
  127. OR (NBTLF[INDX] # PIP WAITING FOR REG/CP RESPONSE #
  128. AND PFCSFC[0] EQ REGCP # REG/CP RESPONSE TO PIP ALLOWED #
  129. AND REGR[0])) # RESPONSE BIT IS ON #
  130. THEN
  131. BEGIN
  132.  
  133. # CONVERT ABH TO NETWORK HEADER #
  134.  
  135. TEMP = ABHWORD[0]; # SAVE APPLICATION HEADER #
  136. ABHWORD[0] = 0; # CLEAR APPLICATION HEADER #
  137. P<NHEADER> = BUFAD + DBHSIZE; # NETW HEADER ADDR #
  138. P<AHEADER> = LOC(TEMP); # APPLICATION HEADER #
  139. DN[0] = TEMPDN; # DESTINATION NODE #
  140. SN[0] = CNODE; # SOURCE NODE #
  141. CN[0] = 0;
  142. BT[0] = NETCMD; # BLOCK TYPE #
  143. NHACT[0] = ABHACT[0]; # CHARACTER TYPE #
  144. CC[0] = ABHTLC[0]; # TEXT LENGTH #
  145.  
  146. IND = NBTINDX[I]*NBTFETNO + OSTFET;
  147. NXBLINK(BUFAD,IND) ;
  148. END
  149. ELSE
  150. BEGIN # DISCARD MESSAGE #
  151. CONTROL IFEQ DEBUG,1;
  152. ERRORF = 1;
  153. CONTROL FI;
  154. END
  155.  
  156.  
  157. RETURN;
  158.  
  159. END
  160.  
  161. TERM
cdc/nos2.source/nam5871/nlobch.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator