User Tools

Site Tools


cdc:nos2.source:nam5871:nfob

Table of Contents

NFOB

Table Of Contents

  • [00013] PROC NFOB(BUFADDR,NCNBAD)
  • [00083] PROC BLINK
  • [00084] PROC LOCLLCB
  • [00085] PROC NFOB1
  • [00086] PROC NXBLINK
  • [00087] PROC TWRITE
  • [00088] PROC XTRACE

Source Code

NFOB.txt
  1. *DECK NFOB
  2. USETEXT NIPDEF
  3. USETEXT AHEADER
  4. USETEXT ACNB
  5. USETEXT BPIPBUF
  6. USETEXT DBGBUF
  7. USETEXT DRHDR
  8. USETEXT NHEADER
  9. USETEXT LLCB
  10. USETEXT NCNB
  11. USETEXT STATTAB
  12. USETEXT SYSTIME
  13. PROC NFOB(BUFADDR,NCNBAD) ; # LINK BLOCK TO PIP OUTBOUND #
  14.  
  15. STARTIMS;
  16. #
  17. *1DC NFOB
  18. *
  19. * 1. PROC NAME AUTHOR DATE
  20. * NFOB P.C.TAM 80/02/08
  21. * C. BITTNER 81/07/13
  22. *
  23. * 2. FUNCTIONAL DESCRIPTION.
  24. * THIS ROUTINE IS RESPONSIBLE FOR LINKING MESSAGES TO THE PIP
  25. * OUTBOUND BUFFER CHAIN AND THE A-A INTRA-HOST
  26. * MESSAGE QUEUE.
  27. *
  28. * 3. METHOD USED.
  29. * CN NON-ZERO
  30. * ABT = BLK,MSG,CMD (SYNCHRONOUS SM)
  31. * IN REGULATION OR DOWNLINE BLOCK LIMIT REACHED
  32. * LINK MSG TO NCNB
  33. * NOT IN REGULATION
  34. * SET-UP NETWORK HEADER
  35. * ADD BSN TO DOWNLINE MESSAGES
  36. * CREATE ACKNOWLEDGE QUEUE ENTRY
  37. * RESET HOSTSIDE INACTIVITY TIMER
  38. * ABT = APPNET (ONE WORD NETWORK MSG-INITR,RST,TERM,...)
  39. * CN = 0
  40. * SET UP NETWORK HEADER
  41. * UPDATE STATISTICS
  42. * IF THE MESSAGE IS AN A-A INTRA-HOST MESSAGE
  43. * (DN OR SN = 0) THEN CALL NFOB1 TO QUEUE
  44. * THE MESSAGE TO THE A-A INTRA-HOST QUEUE
  45. * ELSE (IF NOT A-A INTRA-HOST MESSAGE)
  46. * CALL NXBLINK TO QUEUE THE MESSAGE TO
  47. * THE PIP OUTBOUND CHAIN.
  48. *
  49. * 4. ENTRY PARAMETERS.
  50. * BUFADD ADDRESS OF DATA MESSAGE
  51. * NCNBAD ADDRESS OF NCNB/LLCB
  52. *
  53. * 5. EXIT PARAMETERS.
  54. * NONE
  55. *
  56. *
  57. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  58. * BPIPBUF DRHDR DBGBUF NHEADER
  59. * NIPDEF ACNB NCNB STATTAB
  60. * SYSTIME AHEADER LLCB
  61. *
  62. * 7. ROUTINES CALLED.
  63. * BLINK LINK DATA MESSAGE TO NCNB
  64. * LOCLLCB LOCATE LLCB
  65. * NFOB1 INTRA-HOST LINK PROCESSOR
  66. * NXBLINK LINK MSG TO PIP OUTBOUND CHAIN
  67. * XTRACE TRACES CALLS
  68. *
  69. * 8. DAYFILE MESSAGES. NONE
  70. *
  71.  #
  72. STOPIMS;
  73. #
  74.   FORMAL PARAMS
  75. #
  76. ITEM BUFADDR ; # FWA OF BLOCK TO SEND TO NPU #
  77. ITEM NCNBAD ; # FWA OF NCNB/LLCB #
  78.  
  79. #
  80.   EXTERNAL VARIABLES
  81. #
  82. XREF BEGIN
  83. PROC BLINK; # LINK DATA MESSAGE TO NCNB #
  84. PROC LOCLLCB; # LOCATE LLCB #
  85. PROC NFOB1 ; # INTRA-HOST LINK PROCESSOR #
  86. PROC NXBLINK ; # LOG MESSAGE INTO PIP OUT #
  87. PROC TWRITE; # RECORD MESSAGE IN ZZZZZDN FILE #
  88. PROC XTRACE; # TRACE CALL #
  89. END
  90. #
  91.   INTERNAL VARIABLES
  92. #
  93. ITEM FETINDEX; # PRIORITY INDEX #
  94. ITEM INDEX2; # NBT FET INDEX FOR DOWNLINE DATA #
  95. ITEM ABHTEMP U; # TEMPORARY TO STORE ABH #
  96.  
  97. #**********************************************************************#
  98. BEGIN
  99. CONTROL IFEQ DEBUG,1 ;
  100. XTRACE("NFOB ") ;
  101. CONTROL FI;
  102.  
  103. P<DRHDRWD> = 0;
  104.  
  105. P<NCNB> = NCNBAD;
  106. P<AHEADER> = BUFADDR + BLKHSIZE ;
  107. ABHTEMP = ABHWORD[0] ; # SAVE ABH #
  108. P<NHEADER> = P<AHEADER> ;
  109. P<AHEADER> = LOC(ABHTEMP) ;
  110. FETINDEX = 0; # INITIALIZE FET INDEX #
  111.  
  112. IF NCNBID[0] EQ NCNBIDVALUE
  113. THEN
  114. BEGIN # CN NON-ZERO #
  115. LOCLLCB(NCNBHN[0],NCNBTN[0],P<LLCB>); # FIND MATCHING LLCB #
  116.  
  117. IF ABHABT[0] NQ 0
  118. THEN # IT IS BLK, MSG, OR SYNCHRONOUS COMAND #
  119. BEGIN
  120.  
  121. IF (NCNBNBO[0] GQ NCNBDBL[0]) OR NCNBHR[0] OR NCNBNR[0]
  122. THEN
  123. BEGIN # IN REGULATION OR NBL REACHED #
  124. BLINK(BUFADDR,NCNBAD); # LINK MSG TO NCNB #
  125. GOTO NFOB77;
  126. END
  127. ELSE
  128. BEGIN # SEND CONNECTION DATA TO NPU #
  129. NHWORD[0] = 0; # CLEAR NETWORK HEADER #
  130. IF ABHABT[0] NQ APPCMD
  131. THEN # DATA MESSAGE #
  132. BEGIN
  133. BT[0] = ABHABT[0] ; # BLOCK TYPE #
  134. NHDBC[0] = ABHDBC[0] ; # DATA BLOCK CLARIFIER #
  135. END
  136. ELSE
  137. BT[0] = NETCMD ; # SYNCH MESSAGE #
  138.  
  139. # ADD BSN TO DOWNLINE MESSAGES #
  140. IF NCNBDBSN[0] LS 7
  141. THEN # BSN RANGES FROM 1 TO 7 #
  142. NCNBDBSN[0] = NCNBDBSN[0] + 1;
  143. ELSE
  144. NCNBDBSN[0] = 1;
  145. NHBSN[0] = NCNBDBSN[0]; # INSERT BSN INTO NETW HEADER #
  146. NCNBNBO[0] = NCNBNBO[0] + 1; # INCR DOWNLN BLK CTR #
  147.  
  148. # CREATE ACKNOWLEDGE QUEUE ENTRY #
  149. # THE APPLICATION BLOCK HEADER WITH ADR=BSN IS ACKQ ENTRY #
  150. ABHADR[0] = NCNBDBSN[0]; # SAVE BSN IN ACKQ ENTRY #
  151. CMWORD[NCNBACKQ[0]+ACKHSIZE+NCNBAKIN[0]] = ABHWORD[0];
  152. IF (NCNBAKIN[0] + 1) GQ NCNBDBL[0]
  153. THEN
  154. NCNBAKIN[0] = 0; # RESET OFFSET TO BEGIN OF BUFFER #
  155. ELSE
  156. NCNBAKIN[0] = NCNBAKIN[0] + 1; # UPDATE IN PRT OFFSET #
  157.  
  158. # RESET THE INACTIVITY COUNTER IN THE ACNB #
  159. P<ACNB> = NCNBACNB[0];
  160. IF P<ACNB> NQ 0
  161. THEN
  162. ACNBINACT[0] = RTSECS[0] + INACTVAL;
  163.  
  164. CONTROL IFEQ STAT,1;
  165. NCNBTOTB[0] = NCNBTOTB[0] + 1;
  166. NCNBTOTC[0] = NCNBTOTC[0] + ABHTLC[0];
  167. CONTROL FI;
  168. END
  169. END
  170.  
  171. NHADDR[0] = NCNBNADR[0]; # SET NETWORK NADRESS DN/SN/CN #
  172. IF BT[0] NQ NETBACK
  173. THEN # DELIVER BLOCK PROTOCOL ELEMENTS ON CONNECTION PRIORITY #
  174. BEGIN
  175. FETINDEX = NCNBPRI[0]; JCL1109 9
  176. IF FETINDEX EQ 1
  177. THEN # HIGH PRIORITY CONNECTION #
  178. BEGIN
  179. NHPRI[0] = TRUE;
  180. END
  181. ELSE
  182. BEGIN
  183. NHPRI[0] = FALSE;
  184. END
  185. END
  186.  
  187. END
  188.  
  189. ELSE # ASYNCHRONOUS SUPERVISORY MESSAGE #
  190. BEGIN
  191. P<LLCB> = NCNBAD ; # FWA OF LLCB #
  192. NHWORD[0] = 0; # CLEAR NETWORK HEADER #
  193. DN[0] = LLCBTN[0]; # DESTINATION NODE #
  194. SN[0] = LLCBHN[0]; # SOURCE NODE #
  195. BT[0] = NETCMD; # BLOCK TYPE #
  196. END
  197.  
  198. INDEX2 = (LLCBNBTE[0]*NBTFETNO) + OSTFET + FETINDEX;
  199. NHACT[0] = ABHACT[0] ; # SET TEXT LENGTH #
  200. CC[0] = ABHTLC[0] ; # CHARACTER COUNT #
  201.  
  202. CONTROL IFEQ STAT,1; # STATISTICS ON #
  203. LLCBCMTC[0] = LLCBCMTC[0] + CC[0];
  204. CONTROL FI;
  205.  
  206.  
  207. IF DN[0] EQ 0
  208. OR SN[0] EQ 0
  209. THEN # INTRA-HOST A TO A #
  210. NFOB1(BUFADDR) ;
  211. ELSE # NETWORK OUTBOUND DATA #
  212. NXBLINK(BUFADDR,INDEX2) ;
  213.  
  214. NFOB77:
  215. RETURN;
  216. END
  217. TERM
cdc/nos2.source/nam5871/nfob.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator