User Tools

Site Tools


cdc:nos2.source:nam5871:nbsttp

NBSTTP

Table Of Contents

  • [00019] PROC NBSTTP1)
  • [00107] PROC ABORT
  • [00108] PROC HBSTTP
  • [00109] PROC LOCLLCB
  • [00110] PROC NFOB
  • [00111] PROC NCSTTP
  • [00112] PROC NXBLOCK
  • [00113] PROC OMSG
  • [00114] PROC OVLCALL
  • [00115] PROC XSTTP
  • [00116] PROC XTRACE
  • [00117] PROC MGETS
  • [00118] PROC NPBACK

Source Code

NBSTTP.txt
  1. *DECK NBSTTP
  2. USETEXT NIPDEF
  3. USETEXT ACNB
  4. USETEXT DRHDR
  5. USETEXT DUMPFLG
  6. USETEXT LLCB
  7. USETEXT MSGIDX
  8. USETEXT KDIS
  9. USETEXT NHEADER
  10. USETEXT NCNT
  11. USETEXT NCNB
  12. USETEXT PARAMP
  13. USETEXT PARAMS
  14. USETEXT PCNB
  15. USETEXT PT
  16. USETEXT OVERLAY
  17. USETEXT STPRESP
  18. USETEXT SUPMSG
  19. PROC NBSTTP((NCNBAD),(TRIGGER),(BLKPTR));
  20. STARTIMS;
  21. #
  22. *1DC NBSTTP
  23. *
  24. * 1. PROC NAME AUTHOR DATE
  25. * NBSTTP C. BITTNER 81/05/15
  26. *
  27. * 2. FUNCTIONAL DESCRIPTION
  28. * NETWORK BLOCK PROTOCOL (IVT) STATE TABLE PROCESSOR
  29. *
  30. * 3. METHOD USED
  31. * VALIDATE TRIGGER. SET CURRENT STATE (IF THERE IS NO NCNB
  32. * THEN SET THE CURRENT STATE TO STATX). CALL XSTTP (STATE
  33. * TABLE PROCESSOR) PASSING THE STATE TABLE ORDINAL,
  34. * CURRENT IVT STATE AND TRIGGER. IF A LEGAL TRIGGER
  35. * IS RETURNED, THEN DO THE FOLLOWING (IF VALUE NOT
  36. * SET TO NOCHG):
  37. * A) ACTION - EXECUTE NETWORK BLOCK PROTOCOL (IVT) STATE
  38. * TABLE ACTION (ISSUE SM, ETC)
  39. * B) NEWSTATE - UPDATE NEW IVT STATE
  40. * C) TRIGC - TRIGGER NETWORK CONNECTION STATE TABLE
  41. * D) TRIGB - TRIGGER HOST BLOCK PROTOCOL (IVT) STATE TABLE
  42. *
  43. * IF AN ILLEGAL TRIGGER IS RETURNED THEN DO THE FOLLOWING:
  44. * IF THE TRIGGER IS INTERNAL TO NIP THEN ABORT NIP.
  45. * IF ILLEGAL EXTERNAL TRIGGER AND IN DEBUG MODE, ABORT
  46. * CCP (SEND NPI/IN TO CCP).
  47. * IF ILLEGAL EXTERNAL TRIGGER AND NOT IN DEBUG MODE,
  48. * THEN IGNORE TRIGGER (NO-OP).
  49. *
  50. *
  51. *
  52. * 4. ENTRY PARAMETERS
  53. * NCNBAD - NCNB ADDRESS
  54. * TRIGGER - NETWORK IVT STATE TABLE TRIGGER
  55. * BLKPTR - ADDRESS OF INPUT BUFFER
  56. * WORD 0 = PIP BLOCK HEADER OR DATA RING HEADER
  57. *
  58. * 5. EXIT PARAMETERS
  59. * NONE
  60. *
  61. * 6. SYMPL TEXTS USED
  62. * NIPDEF DUMPFLG
  63. * NCNB
  64. * STPRESP
  65. * MSGIDX PARAMP PARAMS
  66. * OVERLAY SUPMSG LLCB
  67. *
  68. * 7. ROUTINES AND OVERLAYS CALLED
  69. * HBSTTP - HOST BLOCK PROTOCOL STATE TABLE PROCESSOR
  70. * NCSTTP - NETWORK CONNECTION STATE TABLE PROCESSOR
  71. * LOCLLCB - LOCATE LLCB
  72. * ABORT - ABORT NIP
  73. * NFOB - LINK MESSAGE ON PIP OUTBOUND CHAIN
  74. * NXBLOCK - SEND SPECIAL NETWORK BLOCK TO CCP
  75. * OVLCALL - LOAD AND EXECUTE OVERLAY
  76. * NPBACK - PROCESS BACK FROM CCP
  77. * RELNCNB OVL RELEASE NCNB
  78. * COMPCON OVL SWITCH TO PROPER OVERLAY
  79. * NPBRK OVL DISCARD ALL MESSAGES ON NCNB
  80. * HPRUON OVL PROCESS PRU/ON
  81. * STPNERR OVL OUTPUT STATE TABLE ERROR MESSAGE
  82. * NGIGO OVL DISCARD MESSAGE
  83. * NNPIIN OVL SEND NPI/IN TO CCP
  84. * XERRMSG OVL OUTPUT ERROR MESSAGE
  85. * XSTTP - STATE TABLE PROCESSOR
  86. * XTRACE - RECORD PROCEDURE CALL
  87. *
  88. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  89. * "INVALID TRIGGER NUMBER - NBSTTP"
  90. *
  91.  #
  92. STOPIMS;
  93. #
  94.  INPUT PARAMETERS
  95. #
  96.  
  97. ITEM NCNBAD; # NCNB ADDRESS #
  98. ITEM TRIGGER; # NETWORK IVT STATE TABLE TRIGGER #
  99. ITEM BLKPTR; # ADDRESS OF INPUT BUFFER #
  100.  
  101. #
  102.  EXTERNAL VARIABLES
  103. #
  104.  
  105. XREF
  106. BEGIN
  107. PROC ABORT; # ABORT NIP #
  108. PROC HBSTTP; # HOST BLOCK PROTOCOL STATE TABLE PROC #
  109. PROC LOCLLCB; # LOCATE LLCB #
  110. PROC NFOB ;
  111. PROC NCSTTP; # HOST CONNECTION STATE TABLE PROC #
  112. PROC NXBLOCK; # SEND NETWORK BLOCK TO NPU #
  113. PROC OMSG; # ISSUE DAYFILE MESSAGE #
  114. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  115. PROC XSTTP; # STATE TABLE PROCESSOR #
  116. PROC XTRACE; # RECORD PROCEDURE CALL #
  117. PROC MGETS ;
  118. PROC NPBACK ;
  119. END
  120.  
  121. #
  122.  INTERNAL VARIABLES
  123. #
  124.  
  125. SWITCH NBACTION NB0,NB1,NB2,NB3,NB4,NB5,NB6,NB7,NB8,NB9,NB10,
  126. NB11,NB12,NB13,NB14,NB15,NB16,NB17,NB18 ;
  127.  
  128.  
  129.  
  130.  
  131. ITEM ACNBAD; # ACNB ADDRESS #
  132. ITEM BTYPE; # NETWORK BLOCK TYPE #
  133. ITEM CNN ; # NETWORK CONNECTION NUMBER #
  134. ITEM CURST; # CURRENT STATE #
  135. ITEM HN; # HOST NODE #
  136. ITEM LLCBAD; # LLCB ADDRESS #
  137. ITEM NCNTEAD; # NCNT ENTRY ADDRESS #
  138. ITEM RESP; # RESPONSE WORD #
  139. ITEM TN; # TERMINAL NODE #
  140. ITEM BLKADDR ; # ADDRESS OF NWL #
  141. ITEM TEMPPTR U ;
  142. ITEM DATABLK U ;
  143. ITEM PRUMOD B=FALSE ;
  144. ITEM TEMP U ;
  145.  
  146. #**********************************************************************#
  147.  
  148. BEGIN
  149.  
  150. CONTROL IFEQ DEBUG,1;
  151. XTRACE("NBSTT") ;
  152. CONTROL FI;
  153.  
  154. # VALIDATE TRIGGER NUMBER #
  155. BLKADDR = BLKPTR ; # ADDRESS OF NWL #
  156. IF TRIGGER LQ NBMTR AND TRIGGER GQ 0
  157. THEN
  158. BEGIN # VALID TRIGGER NUMBER #
  159. P<NCNB> = NCNBAD;
  160. IF P<NCNB> EQ 0
  161. THEN # NO NCNT ENTRY/NCNB #
  162. BEGIN # ERROR - NO NCNB #
  163. D27M2[0] = "NBSTTP1";
  164. ABORT(DFMSG27,0); # NIP INTERNAL ERROR #
  165. END
  166. ELSE
  167. BEGIN
  168. HN = NCNBHN[0] ;
  169. TN = NCNBTN[0] ;
  170. CNN = NCNBCN[0] ;
  171. ACNBAD = NCNBACNB[0] ;
  172. CURST = NCNBBST[0] ;
  173. END
  174. XSTTP(NBORD,CURST,TRIGGER,RESP);
  175. P<STRESP> = LOC(RESP);
  176. IF LEGTRIG[0]
  177. THEN # LEGAL TRIGGER #
  178. BEGIN
  179. IF ACTION[0] NQ NOCHG
  180. THEN
  181. GOTO NBACTION[ACTION[0]]; # EXECUTE PROPER ACTION #
  182. ELSE
  183. GOTO NBA;
  184.  
  185. NB0:
  186. #
  187.   DLNCNB (ACTION NO. 0)
  188.   DELETE NCNB
  189. #
  190. PARAMS1 = P<NCNB>; # NCNB ADDRESS #
  191. OVLNAME = RELNCNBP; # OVERLAY NAME #
  192. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  193. GOTO NBA;
  194.  
  195. NB1:
  196. #
  197.   NBSINTR (ACTION NO. 1)
  198.   SEND INITR TO CCP
  199. #
  200. PARAMS1 = P<NCNB>;
  201. PARAMS9 = COMPCX"RELBLK$" ;
  202. OVLNAME = COMPCONP; # OVERLAY NAME #
  203. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  204. BTYPE = NETINITR;
  205. GOTO NXB;
  206. NB2:
  207. #
  208.   NBSTERM (ACTION NO. 2)
  209.   SEND TERM TO CCP
  210. #
  211.  
  212. BTYPE = NETTERM;
  213. GOTO NXB;
  214. NB3:
  215. #
  216.   SINITN (ACTION NO. 3)
  217.   SEND INITN TO CCP
  218. #
  219.  
  220. BTYPE = NETINITN;
  221. GOTO NXB;
  222. NB4:
  223. #
  224.   NBSRST ( ACTION NO. 4 )
  225.   SEND RST TO CCP
  226. #
  227.  
  228. BTYPE = NETRST;
  229. GOTO NXB;
  230. NB5:
  231. #
  232.   NBICMDR (ACTION NO. 5)
  233.   SEND ICMDR TO CCP
  234. #
  235.  
  236. BTYPE = NETICMDR;
  237. GOTO NXB;
  238. NB6:
  239. #
  240.   NSBACK ( ACTION NO. 6 )
  241.   SEND BACK TO CCP
  242. #
  243. BTYPE = NETBACK;
  244. GOTO NXB;
  245. NB7:
  246. #
  247.   NBSMSG ( ACTION NO. 7 )
  248.   SEND BLOCK MSG TO CCP
  249. #
  250.  
  251.  
  252. NFOB(BLKADDR,P<NCNB>) ;
  253.  
  254. GOTO NBA ;
  255.  
  256. NB8:
  257. #
  258.   NBBACK (ACTION NO. 8)
  259.   FORM PSUEDO NETWORK FOR FC/ACK AND/OR FC/NAK FOR THE HOST SIDE,
  260.   AND SEND QUEUED MESSAGE TO CCP IF PERMITTED.
  261. #
  262. NPBACK(BLKADDR,P<NCNB>); # PROCESS BACK FROM CCP #
  263.  
  264. # BLKADD IS THE ADDRESS OF PSUEDO FCACK OR FCNAK #
  265. # THIS WILL BE PASSED TO THE HOSTSIDE, AND PROPER #
  266. # SM MESSAGE WILL BE SENT #
  267. # IF BLKPTR IS ZERO THEN THIS BACK WAS IGNORED #
  268. IF BLKADDR EQ 0
  269. THEN
  270. BEGIN # IGNORE THIS BACK #
  271. TRIGB[0] = NOCHG ;
  272. END # INGORE THIS BACK #
  273. GOTO NBA ;
  274.  
  275. NB9:
  276. #
  277.   RELDR (ACTION NO. 9)
  278.   RELEASE MSG AND BLK BLOCK TYPE IN NCNB
  279. #
  280.  
  281. BEGIN
  282. PARAMS1 = P<NCNB> ;
  283. OVLNAME = NPBRKP ;
  284. OVLCALL ;
  285. GOTO NBA ;
  286. END
  287.  
  288.  
  289. NB11:
  290.  
  291. #
  292.   STERMRD (ACTION NO.11)
  293.   SEND TERM TO CCP AND RELEASE DATA RING
  294. #
  295.  
  296. P<SMNIP> = BLKPTR + BLKHSIZE + ABHSIZE;
  297. RCBRK = TCNRC[0]; # REASON CODE FOR BRK #
  298. PARAMS1 = P<NCNB>;
  299. PARAMS9 = COMPCX"RELBLK$" ;
  300. OVLNAME = COMPCONP; # OVERLAY NAME #
  301. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  302. BTYPE = NETTERM;
  303. GOTO NXB;
  304. NB12:
  305. #
  306.   RELDR2 (ACTION NO. 12)
  307.   RELEASE DATA RING
  308. #
  309.  
  310. PARAMS1 = P<NCNB>;
  311. PARAMS9 = COMPCX"RELBLK$" ;
  312. OVLNAME = COMPCONP; # OVERLAY NAME #
  313. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  314. GOTO NBA;
  315.  
  316. NB10:
  317. #
  318.   CONVERT ( ACTION NUMBER 10 )
  319.   CONVERT THE NCNB TO A PCNB AND START PRU MOD
  320. #
  321. OVLNAME = HPRUONP ;
  322. OVLCALL;
  323. IF PARAMP1 NQ 0 # MEANS WE DID NOT SUCCEED TO CONVERT #
  324. THEN
  325. RETURN ; # AND DO NOT GO TO PRU STATE #
  326. ELSE
  327. BEGIN
  328. P<NCNB> = PARAMP2 ;
  329. NCNBAD = PARAMP2 ;
  330. GOTO NBA ;
  331. END
  332. # #
  333. NB13:
  334. #
  335.   NBICMD ( ACTION NUMBER 13 )
  336.   SEND ICMD TO CCP
  337. #
  338. P<SUPMSG> = BLKPTR + BLKHSIZE + ABHSIZE ;
  339. TEMPBSN = INTRCHR[0]; # INTERRUPT CHARACTER #
  340. BTYPE = NETICMD;
  341. GOTO NXB;
  342. NB14:
  343. #
  344.   SEND BREAK PROTOCOL ELEMENT TO CCP.
  345.   DISCARD ANY PREVIOUS DOWNLINE DATA IF POSSIBLE
  346. #
  347. PARAMS1 = P<NCNB> ;
  348. OVLNAME = NPBRKP ;
  349. OVLCALL ;
  350.  
  351. P<SUPMSG> = BLKPTR + BLKHSIZE + ABHSIZE ;
  352. TEMPBSN = FCRBR ;
  353. BTYPE = NETBRK ;
  354. GOTO NXB ;
  355. NB15:
  356. GOTO NBA ;
  357. NB16:
  358. #
  359.   DISCARD ( ACTION NUMBER 16 )
  360.   SIGNAL NPPWL THAT THIS IS DISCARD MOD
  361. #
  362. PARAMP2 = 1 ;
  363. GOTO NBA ;
  364. NB17:
  365. #
  366.   ALL DATA OF PRU ALLOWED
  367. #
  368. PARAMP2 = 0 ;
  369. GOTO NBA ;
  370. NB18:
  371. #
  372.   SAVE THE BSN FOR THE NEXT BLOCK FROM CCP
  373. #
  374.  
  375. P<NHEADER> = BLKPTR + BLKHSIZE ;
  376. P<NCNT> = NCNBCTAD[0] ; # NCNT ADDRESS #
  377. TEMPPTR = NCNTHSIZE + ( NCNBCN[0] LAN X"F" ) ; # INDEX INTO NCNT #
  378.  
  379. IF KNAMDB[0]
  380. THEN
  381. BEGIN # K-DEBUG IS ON #
  382. TEMP = NCNTNIB[TEMPPTR] ;
  383. IF TEMP NQ 0
  384. AND TEMP NQ NHBSN[0]
  385. THEN
  386. ABORT(0,0) ; # BSN FROM CCP NOT IN SEQUENCE #
  387. END # K-DEBUG IS ON #
  388. IF NHBSN[0] LS 7
  389. THEN
  390. NCNTNIB[TEMPPTR] = NHBSN[0] + 1 ;
  391. ELSE
  392. NCNTNIB[TEMPPTR] = 1 ; # NEXT BSN #
  393. GOTO NBA ;
  394. NXB: # SEND BLOCK PROTOCOL ELEMENT TO NPU #
  395. NXBLOCK(P<NCNB>,BTYPE);
  396. NBA:
  397.  
  398. IF NEWSTATE[0] NQ STATX
  399. THEN
  400. BEGIN
  401. NCNBLBS[0] = CURST ; # UPDATE LAST STATE (STATISTICS ) #
  402. NCNBLBT[0] = TRIGGER;# AND THE LAST TRIGGER #
  403. END
  404. IF NEWSTATE[0] NQ NOCHG
  405. THEN
  406. NCNBBST[0] = NEWSTATE[0] ;
  407.  
  408. IF TRIGC[0] NQ NOCHG
  409. THEN # TRIGGER HOST CONNECTION TABLE #
  410. BEGIN
  411. NCSTTP(NCNBAD,CNN,TRIGC[0],0);
  412. END
  413.  
  414. IF TRIGB[0] NQ NOCHG
  415. THEN
  416. BEGIN
  417.  
  418. CONTROL IFEQ DEBUG,1;
  419. IF ACNBAD EQ 0
  420. THEN
  421. BEGIN
  422. D27M2[0] = "NBSTTP2";
  423. ABORT(DFMSG27,0); # "NIP INTERNAL ERROR" #
  424. END
  425. CONTROL FI;
  426. HBSTTP(ACNBAD,TRIGB[0],BLKADDR) ;
  427. END
  428.  
  429.  
  430. ENDACTION:END
  431.  
  432. IF NOT LEGTRIG[0]
  433. THEN
  434.  
  435. BEGIN # ILLEGAL TRIGGER #
  436. PARAMS1 = HN; # HOST NODE #
  437. PARAMS2 = TN; # TERMINAL NODE #
  438. PARAMS3 = CNN ; # NETWORK CONNECTION NUMBER #
  439. PARAMS4 = TRIGGER; # ILLEGAL TRIGGER #
  440. PARAMS6 = "NBSTTP";# NAME OF STATE TABLE PROCESSOR #
  441. PARAMS7 = CURST; # CURRENT BLOCK PROTOCOL STATE #
  442. OVLNAME = STPNERRP; # STATE TABLE ERROR PROCESSOR #
  443. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  444. IF TRIGGER LS NBMINXT OR TRIGGER GR NBMAXXT
  445. THEN
  446. BEGIN # TRIGGER INTERNAL TO NIP #
  447. ABORT(0,0); # ABORT NIP #
  448. END
  449.  
  450. ELSE
  451.  
  452. BEGIN # ILLEGAL EXTERNAL TRIGGER FROM CCP #
  453. OVLNAME = NGIGOP; # SEND GARBAGE MSG TO DAYFILE #
  454. PARAMP1 = BLKPTR;
  455. PARAMP4 = DMCBNBPSTT; # INDX FOR BAD NET BLK STATE TBLE MSG#
  456. OVLCALL;
  457. CONTROL IFEQ DEBUG,1;
  458. LOCLLCB(HN,TN,P<LLCB>);
  459. PARAMS1 = P<LLCB>;
  460. PARAMS2 = TRIGGER; # BAD TRIGGER FROM NETWORK #
  461. PARAMS3 = CURST; # CURRENT STATE OF CONNECTION #
  462. PARAMS4 = CNN; # NETWORK CONNECTION NUMBER #
  463. PARAMS7 = X"42"; # STATE TABLE PROCESSOR #
  464. OVLNAME = NNPIINP; # SEND NPI/IN TO CCP #
  465. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  466. CONTROL FI;
  467. END
  468.  
  469. END
  470.  
  471. END
  472.  
  473. ELSE
  474.  
  475. BEGIN # TRIGGER NUMBER OUT OF RANGE #
  476. PARAMS1 = DFMSG26;
  477. PARAMS6 = "NB";
  478. OVLNAME = XERRMSGP;
  479. OVLCALL;
  480. END
  481.  
  482. RETURN;
  483.  
  484. END
  485. TERM
1)
NCNBAD),(TRIGGER),(BLKPTR
cdc/nos2.source/nam5871/nbsttp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator