User Tools

Site Tools


cdc:nos2.source:nam5871:neib1

Table of Contents

NEIB1

Table Of Contents

  • [00021] PROC NEIB1 (BUFADDR,NBTHNN)
  • [00091] PROC NPPWL
  • [00092] PROC LOCLLCB
  • [00093] PROC MRELS
  • [00094] PROC NBSTTP
  • [00095] PROC LOCNCNT
  • [00096] PROC BLINK
  • [00097] PROC HFASTQ
  • [00098] PROC OSCHAPP
  • [00099] PROC OVLCALL
  • [00100] PROC NPNIPSM
  • [00101] PROC XTRACE

Source Code

NEIB1.txt
  1. *DECK NEIB1
  2. USETEXT NIPDEF
  3. USETEXT DRHDR
  4. USETEXT NHEADER
  5. USETEXT NCNB
  6. USETEXT LLCB
  7. USETEXT NCNT
  8. USETEXT SUPMSG
  9. USETEXT AHEADER
  10. USETEXT ACB
  11. USETEXT ACNB
  12. USETEXT ACNT
  13. USETEXT AT
  14. USETEXT NBT
  15. USETEXT PT
  16. USETEXT STATTAB
  17. USETEXT OVERLAY
  18. USETEXT PARAMP
  19. USETEXT PARAMS
  20.  
  21. PROC NEIB1 (BUFADDR,NBTHNN) ;
  22. STARTIMS;
  23. #
  24. *1DC NEIB1
  25. *
  26. * 1. PROC NAME AUTHOR DATE
  27. * NEIB1 C. BITTNER 82/06/18
  28. *
  29. * 2. FUNCTIONAL DESCRIPTION
  30. * CALL APPROPRIATE PROCESSOR TO PROCESS
  31. * MESSAGES IN THE PIP INBOUND BUFFER
  32. * AND MESSAGES IN THE A-A MESSAGE QUEUE.
  33. *
  34. * 3. METHOD USED
  35. * JUMP ON ACTION ORDINAL DERIVED FROM
  36. * PFC/SFC MATCH
  37. *
  38. * 4. ENTRY PARAMETERS
  39. * BUFADDR - ADDRESS OF MESSAGE BLOCK
  40. * NBTHNN - HOST NODE ON INBOUND BLOCK
  41. * NBTIDX - INDEX OF CURRENT NBT ENTRY BEING PROCESSED
  42. *
  43. * 5. EXIT PARAMETERS
  44. * NONE
  45. *
  46. * 6. SYMPL TEXTS USED
  47. * NIPDEF DRHDR
  48. * NHEADER NCNB
  49. * LLCB NCNT
  50. * SUPMSG AHEADER
  51. * ACB AT
  52. * NBT NETWORK BUFFER TABLE
  53. * PT STATTAB
  54. * OVERLAY PARAMP
  55. * ACNB ACNT
  56. * PIT PARAMS
  57. *
  58. * 7. ROUTINES CALLED
  59. * BLINK - LINK MESSAGE ON APPLICATION-S ACB
  60. * LOCLLCB - LOCATE LLCB
  61. * LOCNCNT - LOCATE NCNT ENTRY
  62. * NBSTTP - NETWORK BLOCK STATE TABLE
  63. * NPNIPSM - PROCESS NIP SM
  64. * NPPWL - PROCESS PRU WORKLIST FROM PIP
  65. * OSCHAPP - SCHEDULE APPLICATION
  66. * OVLCALL - LOAD AND EXECUTE OVERLAY
  67. * FINDPIT OVL ALLOCATE PIT ENTRY INDEX
  68. * NGIGO OVL PROCESS GARBAGE MESSAGE
  69. * HFASTQ - QUEUE UPLINE MESSAGE TO ACNB
  70. * MRELS - RELEASE BUFFER SPACE
  71. * XTRACE - TRACE PROCEDURE CALL
  72. *
  73. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  74. *
  75. * THIS PROCEDURE IS CALLED BY NEIB.
  76. *
  77.  #
  78. STOPIMS;
  79.  
  80. #
  81.   INPUT PARAMETERS
  82. #
  83. ITEM BUFADDR; # ADDRESS OF MSG BLOCK #
  84. ITEM NBTHNN ; # HOST NODE NUMBER FROM THE NBT #
  85.  
  86. #
  87.   EXTERNAL VARIABLES
  88. #
  89. XREF
  90. BEGIN
  91. PROC NPPWL; # PROCESS PRU WORKLIST FROM PIP #
  92. PROC LOCLLCB; # LOCATE LLCB #
  93. PROC MRELS; # RELEASE BUFFER #
  94. PROC NBSTTP; # NETWORK BLOCK STATE TABLE #
  95. PROC LOCNCNT; # LOCATE NCNT ENTRY #
  96. PROC BLINK; # LINK MSG ON APPLICATION-S ACB #
  97. PROC HFASTQ ;
  98. PROC OSCHAPP; # SCHEDULE APPLICATION #
  99. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  100. PROC NPNIPSM; # PROCESS NIP SM #
  101. PROC XTRACE; # TRACE PROCEDURE CALL #
  102. END
  103.  
  104. #
  105.   INTERNAL VARIABLES
  106. #
  107. ITEM BADNBLK B; # FLAG FOR BAD NETWORK BLOCK #
  108. ITEM DISCSNS B; # FLAG FOR JUST DISCARDING DUMP/LOAD #
  109. ITEM I; # INDEX OF PFCSFC FOUND #
  110. ITEM BLKT; # TEMPORARY FOR BLOCK TYPE #
  111. ITEM DNNUM ;
  112. ITEM FOUND B; # PFCSFC MATCH FOUND FLAG #
  113. ITEM NBSTRIG; # NBSTTP TRIGGER #
  114. ITEM TWORD; # TEMPORARY TO HOLD NETWORK HEADER #
  115. ITEM ACNTINDX ; # INDEX INTO ACNB IN ACNT #
  116.  
  117. DEF ERR1 #77#; # ERROR CASE - NO VALID STATE TABLE TRIG #
  118.  
  119. SWITCH MSGDESTJT SMC0,SMC1,SMC2;
  120.  
  121. ARRAY NBTRIGTAB [NETBLK:NETICMDR] S(1);
  122. BEGIN # NETW BLOCK STATE TABLE TRIGGER FOR NETW BLK #
  123. ITEM NBS$TRIG U(0,0,60) = [ NBRMSG,
  124. NBRMSG,
  125. NBRBACK,
  126. NBRMSG,
  127. NBRBRK,
  128. NBRMSG,
  129. NBRMSG,
  130. NBRRST,
  131. RINITR,
  132. RINITN,
  133. RTERM,
  134. NBRICMD,
  135. ICMDR
  136. ];
  137. END
  138.  
  139.  
  140.  
  141. BEGIN
  142.  
  143. CONTROL IFEQ DEBUG,1;
  144. XTRACE("NEIB1");
  145. CONTROL FI;
  146.  
  147. P<DRHDRWD> = BUFADDR;
  148. P<NHEADER> = P<DRHDRWD> + BLKHSIZE;
  149. PARAMP4 = DMCBNBD; # INDEX FOR BAD NETWORK BLK DISCARDED #
  150. BADNBLK = TRUE;
  151. DISCSNS = FALSE ;
  152. DNNUM = DN[0] ;
  153. IF ( (DNNUM NQ NBTHNN) OR # DN DOES NOT MATCH HN #
  154. (SN[0] EQ 0 ) ) AND # SN IS 0 #
  155. (NBTHNN NQ 0 ) AND # NOT INTRAHOST MSG #
  156. ( (DNNUM NQ 0 ) OR # DN IS NONZERO #
  157. (SN[0] NQ 0 ) OR # SN IS NONZERO #
  158. (NBTET[NBTIDX] NQ "ND") ) # NOT CDCNET FRONT END #
  159. THEN
  160. BEGIN
  161. PARAMP4 = DMCBNN; # INDEX FOR BAD NODE NUMBER DAY MSG #
  162. GOTO NEXT ;
  163. END
  164. BLKT = BT[0]; # BLOCK TYPE #
  165. IF BLKID[0] EQ PWLIDVALUE
  166. THEN
  167. BEGIN
  168. NPPWL(P<DRHDRWD>); # PROCESS PRU WORKLIST FROM PIP #
  169. BADNBLK = FALSE;
  170. END
  171. ELSE
  172. BEGIN # NOT A PWL #
  173. IF BLKT LS NETBLK
  174. OR BLKT GR NETICMDR
  175. THEN
  176. BEGIN
  177. IF BLKT EQ 0
  178. THEN # ASSUME PIP IS DISCARDING BAD NETWORK MSG#
  179. BEGIN
  180. PARAMP4 = DMCBNBD; # DMC FOR IVT BLK PROTOCOL ERR #
  181. END
  182. ELSE # PIP GENERATED BAD BLOCK TYPE IN MSG #
  183. BEGIN
  184. PARAMP4 = DMCUBT; # UNKNOWN BLOCK TYPE DAY MSG #
  185. END
  186. GOTO NEXT ; # INVALID BLOCK TYPE FROM PIP #
  187. END
  188.  
  189. IF CN[0] NQ 0
  190. THEN
  191. BEGIN
  192. LOCLLCB(DN[0],SN[0],P<LLCB>); # LOCATE LLCB #
  193. IF P<LLCB> NQ 0
  194. THEN
  195. BEGIN # VALID NETWORK BLOCK #
  196. LOCNCNT(P<LLCB>,CN[0],P<NCNT>); # LOCATE NCNT ENTRY #
  197. IF P<NCNT> NQ 0
  198. THEN
  199. BEGIN
  200. P<NCNB> = NCNTNCNB[0]; # NCNB ADDRESS #
  201. IF P<NCNB> NQ 0
  202. THEN
  203. BEGIN
  204. NBSTRIG = NBS$TRIG[BLKT];
  205. IF NBSTRIG NQ ERR1 AND BLKT LQ NETICMDR
  206. THEN
  207. BEGIN
  208. CONTROL IFEQ STAT,1; # STATISTICS ON #
  209. IF BT[0] LQ NETMSG
  210. OR BT[0] EQ NETQBLK
  211. OR BT[0] EQ NETQMSG
  212. THEN
  213. BEGIN # DATA BLOCK #
  214. ST$IDB = ST$IDB + 1; # INCR *N/W IN DATA BLOCK #
  215. ST$IDC = ST$IDC + CC[0]; # INCR *N/W IN DATA CHARS#
  216. END
  217. ELSE
  218. BEGIN # NON DATA BLOCKS #
  219. ST$INB = ST$INB + 1; # INCR *N/W IN NON-DATA BK #
  220. ST$INC = ST$INC + CC[0]; # INCR *N/W IN ND CR #
  221. END
  222. CONTROL FI;
  223. P<ACNB> = NCNBACNB[0] ; # TRY FIND THE TWIN #
  224. IF NBSTRIG EQ NBRMSG AND P<ACNB> NQ 0
  225. THEN # WE TRY TO SKIP THE STATE TABLES #
  226. BEGIN
  227. P<ACB> = ATACBA[ACNBAN[0]] ;
  228. P<ACNT>= ACBACNT[0] ;
  229. ACNTINDX = ACNBACN[0]+ACNTHSIZE-ACNTMINACN[0] ;
  230. IF( NCNBBST[0] EQ NBALLD # ALL DATA ALLOWED #
  231. AND ACNTIS[ACNTINDX] EQ HBALLD)# ALSO HOST SIDE #
  232. THEN
  233. BEGIN
  234. IF NHBSN[0] LS 7
  235. THEN
  236. NCNTNIB[0] = NHBSN[0] + 1 ; # NEXT BSN OF UPLIN#
  237. ELSE
  238. NCNTNIB[0] = 1 ;
  239.  
  240. HFASTQ(BUFADDR,P<ACNB>) ;
  241. GOTO GOON ;
  242. END
  243. END
  244.  
  245. NBSTTP(P<NCNB>,NBSTRIG,BUFADDR) ;
  246. GOON: BADNBLK = FALSE ;
  247. END
  248. END
  249. END
  250. END
  251. END
  252. ELSE # CN = 0 ASYNCHRONOUS SM #
  253. IF (CC[0] GQ 2 ) AND # SUP MSG IS NOT TOO SMALL #
  254. (CC[0] LQ 472) # SUP MSG IS NOT TOO LARGE #
  255. THEN
  256. BEGIN
  257. P<SUPMSG> = P<NHEADER> + NBHSIZE;
  258. FOUND = FALSE;
  259. IF (PFCSFC[0] EQ NPIDD) OR
  260. (PFCSFC[0] EQ NPIPP)
  261. THEN # HALT NPU SUP MSG TO BE PROCESSED BY NIP #
  262. BEGIN # FALL THROUGH TO LABEL SMC0 #
  263. FOUND = TRUE; # FOUND MATCHING PFC/SFC #
  264. END
  265. FOR I=1 STEP 1 WHILE I LQ 4 AND NOT FOUND
  266. DO
  267. BEGIN
  268. IF PFC[0] GQ MINPFC[I]
  269. AND PFC[0] LQ MAXPFC[I]
  270. THEN
  271. BEGIN
  272. IF PROCAN[I] NQ 0
  273. THEN
  274. BEGIN # WITHIN PFC/SFC RANGE #
  275. FOUND = TRUE;
  276. GOTO MSGDESTJT[CASEORD[I]];
  277. END
  278. ELSE
  279. BEGIN
  280. IF I NQ 4 # MSG TO MISSING CS OR NS #
  281. THEN
  282. DISCSNS = TRUE ;
  283. END
  284. END
  285. END
  286.  
  287. SMC0:
  288. #
  289.   SM-S PROCESSED BY NIP
  290. #
  291.  
  292. NPNIPSM(P<DRHDRWD>,BADNBLK);
  293. GOTO SMC2;
  294.  
  295.  
  296. SMC1:
  297. #
  298.   SM-S PROCESSED BY NS/CS
  299. #
  300.  
  301. P<ACB> = ATACBA[PROCAN[I]] ;
  302.  
  303. IF ATNVFN[ACBAN] OR ATNVFF[ACBAN]
  304. THEN
  305. BEGIN # APPLICATION HAS NETTED OFF OR FAIL#
  306. BADNBLK = TRUE ; # DISCARD THIS MESAGE #
  307. GOTO NEXT ;
  308. END # APPL. HAS NETTED OFF OR FAILED #
  309.  
  310. # FORMAT SPECIAL ABH FOR ABT=4 #
  311. P<AHEADER> = P<NHEADER>;
  312. TWORD = NHWORD[0]; # SAVE NETWORK HEADER #
  313. P<NHEADER> = LOC(TWORD);
  314. ABHWORD[0] = 0;
  315. ABHABT[0] = APPSUP; # APPLICATION BLOCK TYPE #
  316. ABHBT[0] = BLKT; # NETWORK BLOCK TYPE #
  317. ABHNBH[0] = NBHABH[0]; # SET DN/SN/CN #
  318. ABHTLC[0] = CC[0]; # TEXT LENGTH #
  319. ABHACT[0] = CT8ASCII; # CHARACTER TYPE #
  320. BLINK(P<DRHDRWD>,P<ACB>); # LINK SM TO APP ACB #
  321. OSCHAPP(P<ACB>); # SCHEDULE APPLICATION #
  322. BADNBLK = FALSE;
  323.  
  324.  
  325.  
  326.  
  327. SMC2:
  328.  
  329. END
  330. END # NOT A PWL #
  331.  
  332.  
  333. NEXT: IF BADNBLK AND ( NOT DISCSNS)
  334. THEN # PROCESS GARBAGE MESSAGE #
  335. BEGIN
  336. OVLNAME = NGIGOP; # OVERLAY NAME #
  337. PARAMP1 = P<DRHDRWD>; # ADDRESS OF BAD MSG #
  338. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  339. END
  340.  
  341. BLKT = BLKID[0];
  342. IF BLKT NQ DRIDVALUE AND BLKT NQ PWLRIDVALUE
  343. AND BLKT NQ POBIDVALUE
  344. THEN # BUFFER NOT QUEUED TO DATA RING
  345.   BUFFER NOT QUEUED TO ACB
  346.   #
  347. MRELS(P<DRHDRWD>); #RELEASE BUFFER#
  348. RETURN;
  349.  
  350.  
  351.  
  352. END
  353. TERM
cdc/nos2.source/nam5871/neib1.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator