User Tools

Site Tools


cdc:nos2.source:nam5871:nppct

Table of Contents

NPPCT

Table Of Contents

  • [00025] PRGM NPPCT
  • [00101] PROC BLINK
  • [00102] PROC ABORT
  • [00103] PROC LOCLLCB
  • [00104] PROC LOCNCNT
  • [00105] PROC OVLCALL
  • [00106] PROC MCLRIL
  • [00107] PROC MGETS
  • [00108] PROC MRELS
  • [00109] PROC MSETIL
  • [00110] PROC OSREQ
  • [00111] PROC HCSTTP
  • [00112] PROC NRCSSTP
  • [00113] PROC XTRACE

Source Code

NPPCT.txt
  1. *DECK NPPCT
  2. USETEXT NIPDEF
  3. USETEXT AHEADER
  4. USETEXT PT
  5. USETEXT TNT
  6. USETEXT NBT
  7. USETEXT DRHDR
  8. USETEXT AT
  9. USETEXT OVERLAY
  10. USETEXT PARAMP
  11. USETEXT PARAMS
  12. USETEXT ACB
  13. USETEXT ACNT
  14. USETEXT LLCB
  15. USETEXT NCNT
  16. USETEXT PCNB
  17. USETEXT PIT
  18. USETEXT PWL
  19. USETEXT ACNB
  20. USETEXT NCNB
  21. USETEXT RELFILE
  22. USETEXT ACKHEAD
  23. USETEXT STATTAB
  24. USETEXT SUPMSG
  25. PRGM NPPCT; # PROCESS A PRU CONNECTION TERMINATION #
  26. STARTIMS;
  27. #
  28. *1DC NPPCT
  29. *
  30. * 1. PROC NAME AUTHOR DATE
  31. * NPPCT J.C. LEE 80/04/01
  32. * A.BEN-ARTZI 82/02/18
  33. *
  34. * 2. FUNCTIONAL DESCRIPTION.
  35. * PROCESS A PRU-CONNECTION-TERMINATED WORKLIST
  36. *
  37. * 3. METHOD USED.
  38. * GET BUFFER FOR A NCNB
  39. * FORMAT NETWORK NCNB FROM PCNB
  40. * UPDATE CONNECTION-S CONNECTION TABLE ENTRY
  41. * DELINK PCNB FROM PCNB RING
  42. * RELEASE ALL PWL-S IN ICMD AND CMD WORKLIST QUEUE
  43. * RELEASE ALL PWL-S IN PWL RING THAT BELONGS TO THE CONNECTION
  44. * RELEASE ANY QUEUE FILE ASSOCIATED WITH THE PRU CONNECTION
  45. * LINK PP REQUEST PARAMETER BLOCK TO PP CALL RING
  46. * RELEASE PCNB
  47. * RELEASE PRU-CONNECTION-TERMINATED WORKLIST SPACE
  48. * A SPECIAL CASE IS CONSIDERED:
  49. * IF WE CAME AFTER EST/OFF CASE (LLCBWOF SET)
  50. * WE RELEASE LLCB AND SEND REG/CP/U TO PIP
  51. *
  52. * 4. ENTRY PARAMETERS.
  53. * PARAMP1 PRU WORKLIST ADDRESS
  54. * PARAMP2 PRU-QCB ADDRESS
  55. *
  56. * 5. EXIT PARAMETERS.
  57. * PARAMP2 NEW NCNB ADDRESS
  58. *
  59. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  60. * AT APPLICATION TABLE
  61. * DRHDR BUFFER HEADER WORD TEMPLATE
  62. * LLCB LOGICAL LINK CONTROL BLOCK TEMPLATE
  63. * PIT PIP INTERFACE TABLE
  64. * NBT NCNB NCNT OPSIZE
  65. * OVERLAY PARAMP PCNB PT
  66. * NIPDEF ACB ACNB
  67. * PWL RELFILE PARAMS
  68. *
  69. * 7. ROUTINES AND OVERLAYS CALLED
  70. * MCLRIL CLEAR NIP/PIP INTERLOCK
  71. * MSETIL REQUEST NIP/PIP INTERLOCK
  72. * RELNCNB OVL RELEASE NCNB
  73. * RELLLCB OVL RELEASE LLCB
  74. * NCREGCP OVL SEND REG/CP
  75. * MGETS GET BUFFER
  76. * MRELS RELEASE BUFFER
  77. * OSREQ MAKE RA+1 CALL
  78. * XTRACE TRACE CALLS
  79. * LOCLLCB LOCATE AN LLCB
  80. * LOCNCNT LOCATE THE NCNT ENTRY
  81. * OVLCALL LOAD AND EXECUTE OVERLAY
  82. *
  83. * 8. DAYFILE MESSAGES.
  84. * NONE
  85. *
  86. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  87. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
  88. * TO RETURN TO THE CALLING PROGRAM.
  89. *
  90. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  91. *CALL OPSIZE
  92. *
  93. * THIS OVERLAY IS CALLED BY NCSTTP.
  94.  #
  95. STOPIMS;
  96. #
  97.   EXTERNAL VARIABLES
  98. #
  99. XREF
  100. BEGIN
  101. PROC BLINK; # LINK MESSAGE TO DATA RING #
  102. PROC ABORT ;
  103. PROC LOCLLCB; # FIND LLCB #
  104. PROC LOCNCNT; # FIND NCNT ENTRY #
  105. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  106. PROC MCLRIL; # CLEAR NIP/PIP INTERLOCK #
  107. PROC MGETS; # GET A BUFFER #
  108. PROC MRELS; # RELEASE BUFFER #
  109. PROC MSETIL; # REQUEST NIP/PIP INTERLOCK #
  110. PROC OSREQ; # MAKE RA+1 CALL #
  111. PROC HCSTTP ; # HOST SIDE STATE TABLE #
  112. PROC NRCSSTP ; # CALL SSTP AND PROCESS REASON CODE #
  113. PROC XTRACE; # TRACE CALLS #
  114. LABEL RJMAIN; # RETURN ADDRESS #
  115. END
  116. #
  117.   LOCAL VARIABLES
  118. #
  119. ITEM
  120. BSN ,
  121. HN , # HOST NODE OF CONNECTION #
  122. PCNBAD, # PCNB ADDRESS #
  123. FOUND B, # FOUND FLAG #
  124. NCNTEAD, # NCNT ENTRY ADDRESS #
  125. NBIND,
  126. ACNBAD, # ACNB ADDRESS #
  127. ACBAD, # APPLICATION ACB ADDRESS #
  128. NEXTBLK, # NEXT BLOCK IN RING #
  129. LASTBLK, # PREVIOUS BLOCK IN RING #
  130. PRUCN, # PRU CONNECTION NUMBER #
  131. PCNFNT, # QUEUE FILE-S FNT POINTER #
  132. PCNLFN C(7), # QUEUE FILE-S LFN #
  133. PITIDX, # PIT ENTRY INDEX #
  134. BUFADDR, # BUFFER ADDRESS #
  135. PWLADDR, # PWL ADDRESS #
  136. INDEX, # NPU FRONT-END INDEX #
  137. IMMOPWL , # LOC OF PCNB IMMO PWL #
  138. DVT, # DEVICE TYPE #
  139. ACKQSIZE, # SIZE OF ACK QUEUE #
  140. ACKQBUF, # BUFFER FOR ACK QUEUE #
  141. I ,
  142. LLCBAD; # LLCB ADDRESS #
  143.  
  144. BASED ARRAY PRUNIPWD S(1); # TEMPLATE FOR NIP WORD IN PIT #
  145. BEGIN
  146. ITEM PRUNIPMFB U(0,00,06); # MINIMUM NO OF PRU BUFS #
  147. ITEM PRUNIPMAB U(0,06,06); # MAXIMUM NO OF PRU BUFS #
  148. ITEM PRUNIPNCA U(0,12,12); # CURRENT NO OF BUFFERS ASSIGNED#
  149. ITEM PRUNIPNC U(0,24,12); # CURRENT NO OF PRU CONNECTIONS #
  150. ITEM PRUNIPFPB U(0,42,18); # ADR OF FIRST BUF IN FREE CHAIN#
  151. END
  152.  
  153. # ******************************************************************** #
  154. BEGIN
  155.  
  156. CONTROL IFEQ DEBUG,1;
  157. XTRACE("NPPCT") ;
  158. CONTROL FI;
  159.  
  160. PWLADDR = PARAMP1; # PWL ADDRESS #
  161. PCNBAD = PARAMP2; # PCNB ADDRESS #
  162.  
  163. P<PCNB> = PCNBAD; # PCNB ADDRESS #
  164. HN = PCNBHN[0] ;
  165.  
  166. LOCLLCB(HN,PCNBTN[0],LLCBAD) ;
  167. P<LLCB> = LLCBAD ;
  168. LOCNCNT(LLCBAD,PCNBCN[0],NCNTEAD) ;
  169. P<NCNT> = NCNTEAD;
  170. ACNBAD = PCNBACNB[0]; # ACNB ADDRESS #
  171. P<ACNB> = ACNBAD;
  172. ACBAD = ATACBA[ATHSIZE + ACNBAN[0] - 1]; # ACB ADDRESS #
  173. P<ACB> = ACBAD; # ACB ADDRESS #
  174. #
  175.   GET BUFFER FOR NCNB
  176. #
  177. MGETS(NCNBSIZE, BUFADDR, TRUE);
  178.  
  179. ACNBNCNB[0] = BUFADDR; # RESET NCNB ADDRESS #
  180. #
  181.   FORMAT NCNB FROM PCNB
  182. #
  183. P<NCNB> = BUFADDR; # NCNB ADDRESS #
  184. NCNBID[0] = NCNBIDVALUE; # NCNB BLOCK ID #
  185. NCNBR0[0] = PCNBR0[0] ; # COPY REST OF WORD ZERO #
  186. NCNBR1[0] = PCNBR1[0] ; # COPY BEGINING OF WORD ONE #
  187. NCNBACNB[0] = ACNBAD; # ACNB ADDRESS #
  188. NCNBNBTE[0] = PCNBNBTE[0]; # NBT ENTRY INDEX #
  189. NCNBTNAM[0] = PCNBTNAM[0]; # TERMINAL NAME #
  190. NCNBSTS[0] = PCNBSTS[0] ;
  191. PRUCN = NCNBCN[0]; # PRU CONNECTION NUMBER #
  192. P<LLCB> = LLCBAD; # LLCB ADDRESS #
  193.  
  194. MSETIL(LLCBAD); # REQUEST NIP/PIP INTERLOCK #
  195.  
  196.  
  197. # RELEASE QUEUE FILE OR LOCAL FILE ASSOCIATED WITH THIS CONNECTION,
  198.   LINK PP REQUEST PARAM BLOCK TO PP CALL RING
  199. #
  200.  
  201. P<DRHDRWD> = 0 ;
  202. DVT = PCNBDT[0] ;
  203. NEXTBLK = PCNBPCFP[0] ; # SAVE NEXT PCNB IN CHAIN #
  204. LASTBLK = PCNBPCBP[0] ; # AND THE LAST IN CHAIN #
  205. IMMOPWL = LOC(PCNBIMMO[0]) ; # SAVE IMMO PWL FOR LATER USE #
  206.  
  207. IF PCNBFILE[0] NQ 0
  208.  
  209. THEN
  210. BEGIN # THERE IS STILL FILE NEED TO BE #
  211. # RETURN TO APPLICATION OR SYSTEM QUEU#
  212.  
  213. IF DVT EQ DT$INTA # INTRA-HOST A-A #
  214. OR DVT EQ DT$INTE # INTER-HOST A-A #
  215. THEN
  216. BEGIN # A TO A CONNECTION #
  217. I = 0 ;
  218. NRCSSTP(P<ACB>,PWLADDR,PCNBFNTO[0],I) ;
  219. IF I NQ 0
  220. THEN
  221. BEGIN # ERROR OR NON-ZERO RETURNED RC FROM#
  222. # SST CALL, PWL HAS BEEN RE-CHAINED #
  223. # IN PWL RING. #
  224. PARAMP4 = I ; # SET FLAG TO CALLER #
  225. MRELS(P<NCNB>) ; # NO NEED FOR THIS NCNB YET. #
  226. ACNBNCNB[0] = P<PCNB> ; # RESTORE THE PCNB IN ACNB #
  227. MCLRIL; # RELEASE NIP/PIP INTERLOCK #
  228. GOTO RJMAIN ;
  229. END
  230.  
  231. END # A TO A CONNECTION #
  232. ELSE
  233. BEGIN # NOT A-A CONNECTION #
  234. PCNLFN = PCNBLFN[0]; # QUEUE FILE-S LFN #
  235. PCNFNT = PCNBFNTO[0]; # QUEUE FILE-S FNT PTR #
  236.  
  237. FOR INDEX=PCNBAD+BLKHSIZE STEP 1 UNTIL PCNBAD+PARSIZE
  238. DO # CLEAR THE DSP/CIO PARAMETER BLOCK #
  239. CMWORD[INDEX] = 0;
  240.  
  241. P<PARAMB> = PCNBAD + BLKHSIZE; # PARAMETER BLOCK ADDRESS #
  242. FET$LFN[0] = PCNLFN; # LOCAL FILE NAME #
  243. REQWORD[0] = 0; # ZERO PP CALL WORD #
  244. PADDR[0] = P<PARAMB>;
  245.  
  246.  
  247. IF DVT EQ DT$CR
  248. THEN # AN INPUT-QUEUE FILE ATTACHED #
  249. BEGIN # ISSUE CIO CALL TO RETURN FILE #
  250. PPNAME[0] = PP$CIO;
  251. BLKID[PCNBAD] = CPCRIDVALUE;
  252. FET$STAT[0] = CIORETURN; # CIO FUNCTION REQUEST CODE #
  253. FET$UP[0] = TRUE; # SET USER PROCESSING FLAG #
  254. FET$EP[0] = TRUE; # SET ERROR PROCESSING FLAG #
  255. FET$CIOFNT[0] = PCNFNT; # FNT POINTER #
  256. END
  257.  
  258. IF DVT EQ DT$LP OR
  259. DVT EQ DT$CP OR
  260. DVT EQ DT$CLP OR # CDCNET LINE PRINTER #
  261. DVT EQ DT$PL
  262. THEN # AN OUTPUT-QUEUE FILE ATTACHED #
  263. BEGIN # ISSUE DSP CALL TO DISPOSE FILE#
  264. PPNAME[0] = PP$DSP;
  265. BLKID[PCNBAD] = DPCRIDVALUE;
  266. FET$FLAGS[0] = DSPNODAYFI; # SET NO DAYFILE MESSAGE FLAG #
  267. FET$DSPFNT[0] = PCNFNT; # FNT POINTER #
  268. END
  269.  
  270. OSREQ(REQWORD[0]) ; # ISSUE CIO OR DSP CALL #
  271. NEXTPTR[PCNBAD] = LOC(PCRHEAD[0]);
  272. IF PCRHEAD[0] EQ 0
  273. THEN # EMPTY PP-CALL-RING #
  274. BEGIN
  275. BACKPTR[PCNBAD] = LOC(PCRTAIL[0]);
  276. PCRHEAD[0] = PCNBAD;
  277. END
  278.  
  279. ELSE # ADD NEW REQ-BLOCK TO PCR #
  280. BEGIN
  281. BACKPTR[PCNBAD] = PCRTAIL[0];
  282. NEXTPTR[PCRTAIL[0]] = PCNBAD;
  283. END
  284. PCRTAIL[0] = PCNBAD;
  285.  
  286. PCNBAD = 0;
  287.  
  288. END # NOT A-A CONNECTION #
  289.  
  290. END # THERE IS STILL FILE NEED TO BE #
  291.  
  292. # BUILD AN ACKNOWLEDGE QUEUE #
  293. CONTROL IFEQ DEBUG,1;
  294.  
  295. IF NCNTOOB[0] GR NCNBDBL[0]
  296. THEN
  297. ABORT(0,0) ;
  298.  
  299. CONTROL FI ;
  300.  
  301. ACKQSIZE = NCNBDBL[0] + ACKHSIZE; # SIZE OF ACK QUEUE #
  302. MGETS(ACKQSIZE,ACKQBUF,TRUE); # ALLOC ACK QUEUE #
  303. P<ACKHEAD> = ACKQBUF; # BASE ACK QUEUE #
  304. ACKQID[0] = ACKQIDVALUE; # SET BLOCK ID #
  305. ACKNCNB[0] = P<NCNB>;
  306. NCNBACKQ[0] = ACKQBUF; # ADDRESS OF ACK QUEUE #
  307. NCNBAKIN[0] = 0 ; # INITIALILZE THE ACK QUEUE #
  308. NCNBAKOU[0] = 0 ; # IN = OUT, ASSUMING EMPTY #
  309. BSN = NCNTNOB[0] - 1 ;
  310. IF BSN EQ 0
  311. THEN
  312. BSN = 7 ;
  313. NCNBDBSN[0] = BSN ; # LAST BSN WAS SENT #
  314.  
  315. NCNBNBO[0] = NCNTOOB[0] ;
  316. IF NCNTOOB[0] NQ 0
  317. THEN
  318. BEGIN # STILL OUTSTADING BACK WAITING #
  319. NCNBAKIN[0] = NCNTOOB[0] ; # SET ACKNOWLEDGE QUEUE IN PTR #
  320. IF NCNBAKIN[0] EQ NCNBDBL[0]
  321. THEN # ACKNOWLEDGE QUEUE IS FULL #
  322. BEGIN
  323. NCNBAKIN[0] = 0; # SET IN PTR FOR BUFFER FULL CASE #
  324. END
  325. FOR I = NCNTOOB[0] - 1 STEP -1 WHILE I GQ 0
  326. DO
  327. BEGIN # BUILD ACK QUEUE ACCORDING TO OOB FROM PIP#
  328. P<AHEADER> = P<ACKHEAD> + ACKHSIZE + I ;
  329. ABHABT[0] = 0 ; # FLAG FOR BACK CHECKING #
  330. ABHADR[0] = BSN ; # FAKING THIS ENTRY WITH THIS BSN #
  331. BSN = BSN - 1 ; # NEXT BSN #
  332. IF BSN EQ 0
  333. THEN
  334. BEGIN
  335. BSN = 7 ;
  336. END
  337. END # BUILD THE ACK QUEUE #
  338. END # STILL OUSTANDING BACK WAITING #
  339.  
  340. CONTROL IFEQ STAT,1; # STATISTICS OPTION ON #
  341. ST$AQ = ST$AQ + 1; # INCREM NO OF ACK QUEUES #
  342. CONTROL FI;
  343.  
  344. #
  345.   UPDATE PRU CONNECTION-S ENTRY IN NCNT
  346. #
  347. NCNTBSS[0] = 0 ; # CLEAR BATCH STREAM STATE #
  348. NCNTBHS[0] = BHSIVT;
  349. NCNTNCNB[0] = BUFADDR; # UPDATE NCNB ADDRESS #
  350.  
  351. #
  352.   DELINK PCNB FROM PCNB-RING
  353. #
  354. FOUND = FALSE;
  355. FOR INDEX = 0 STEP NBTFETNO WHILE NOT FOUND
  356. DO # SEARCH FOR HOST NODE #
  357. BEGIN
  358. IF NBTIUF[INDEX] AND NBTHN[INDEX] EQ NCNBHN[0]
  359. THEN # NBT FOR THE HOST NODE FOUND #
  360. FOUND = TRUE; # FLAG TO STOP -FOR- LOOP #
  361. NBIND = INDEX ;
  362. END
  363. IF NEXTBLK EQ LASTBLK
  364. THEN # PCNB IS ONLY MEMBER #
  365. BEGIN
  366. NBTPCRF[NBIND] = 0; # CLEAR PCNB POINTERS IN NBT #
  367. NBTPCRB[NBIND] = 0;
  368. END
  369. ELSE
  370. BEGIN
  371. P<PCNB> = 0;
  372. IF LASTBLK EQ LOC(NBTFIRST[NBIND])
  373. THEN # THIS IS THE FIRST MEMBER #
  374. NBTPCRF[NBIND] = NEXTBLK;
  375. ELSE
  376. PCNBPCFP[LASTBLK] = NEXTBLK;
  377. IF NEXTBLK EQ LOC(NBTFIRST[NBIND])
  378. THEN # THIS IS THE LAST MEMBER #
  379. NBTPCRB[NBIND] = LASTBLK;
  380. ELSE
  381. PCNBPCBP[NEXTBLK] = LASTBLK;
  382. P<PCNB> = PCNBAD; # RESOTRE PCNB ADDRESS #
  383. END
  384.  
  385. MCLRIL; # CLEAR NIP/PIP INTERLOCK #
  386. #
  387.   RELEASE ALL PWL-S IN ICMD AND CMD WORKLIST QUEUE
  388. #
  389.  
  390. FOR INDEX = ICMDQP STEP 1 UNTIL CMDQP DO
  391. BEGIN
  392. P<PWLHDR> = IMMOPWL + INDEX ; # WORKLIST QUEUE WORD #
  393. NEXTBLK = PWLNEXT[0]; # FIRST PWL IN WORKLIST WUEUE #
  394.  
  395. FOR NEXTBLK = NEXTBLK WHILE NEXTBLK NQ 0 DO
  396. BEGIN
  397. P<PWLHDR> = NEXTBLK; # CURRENT PWL IN QUEUE #
  398. NEXTBLK = PWLNEXT[0]; # ADDRESS OF NEXT PWL IN QUEUE #
  399. MRELS(P<PWLHDR>); # RELEASE CURRENT PWL #
  400. END
  401. END
  402. #
  403.   DECREMENT ACTIVE PRU CONNECTION CO0NT IN LOGICAL-LINK PCB
  404.   AND INTERLOCK TABLE
  405. #
  406. PITIDX = LLCBPITIDX[0]; # PIT ENTRY INDEX #
  407. LLCBNPC[0] = LLCBNPC[0] - 1; # UPDATE COUNT IN LLCB #
  408. ACBNPRU[0] = ACBNPRU[0] - 1; # UPDATE COUNT OF PRU CONNEC. #
  409. #
  410.   RELEASE ALL PWL-S IN PWL RING THAT BELONG TO THIS CONNECTION
  411. #
  412. NEXTBLK = ACBPWLFP[0]; # PWL RING POINTER #
  413. IF NEXTBLK EQ PWLADDR
  414. THEN # NO NEED TO DELINK FIRST ENTRY #
  415. BEGIN # IN ACB PWL RING BECAUSE #
  416. # XSACB WILL DO IT. #
  417. P<PWLHDR> = NEXTBLK; # PWL CURRENTLY BEING PROCESSED #
  418. PWLID[0] = PWLIDVALUE; # RESTORE PWL BLOCK ID IF ALTERD#
  419. NEXTBLK = PWLNPWLFP[0]; # NEXT ENTRY IN ACB PWL IF ANY #
  420. END
  421.  
  422. FOR NEXTBLK = NEXTBLK WHILE NEXTBLK NQ 0 AND
  423. NEXTBLK NQ LOC(ACBPWLFP[0]) DO
  424. BEGIN
  425. P<PWLHDR> = NEXTBLK; # PWL ADDRESS #
  426. NEXTBLK = PWLNPWLFP[0]; # ADDRESS OF NEXT PWL IN RING #
  427. LASTBLK = PWLNPWLBP[0]; # ADDRESS OF PREVIOUS PWL #
  428.  
  429. IF (PWLTN[0] EQ NCNBTN[0]) AND # TERMINAL NODE MATCHES #
  430. (PWLHN[0] EQ NCNBHN[0]) AND # HOST NODE MATCHES #
  431. (PWLCN[0] EQ NCNBCN[0]) # CONNECTION NUMBER MATCHES #
  432. THEN # FOUND PWL FROM THIS CONNECTION#
  433. BEGIN # DELINK PWL FROM PWL RING #
  434.  
  435. MRELS(P<PWLHDR>); # RELEASE PWL SPACE #
  436.  
  437. IF ACBPWLFP[0] EQ ACBPWLBP[0]
  438. THEN # ONLY PWL IN RING #
  439. BEGIN
  440. ACBPWLFP[0] = 0; # ZERO PWL RING PTR-S IN ACB #
  441. ACBPWLBP[0] = 0;
  442. END
  443.  
  444. ELSE # MORE THAN ONE PWL IN RING #
  445. BEGIN # UPDATE RING POINTERS #
  446. NEXTPTR[LASTBLK] = NEXTBLK;
  447. BACKPTR[NEXTBLK] = LASTBLK;
  448. END
  449. END
  450. END
  451. #
  452.   RELEASE PCNB BUFFER
  453. #
  454. IF PCNBAD NQ 0
  455. THEN
  456. BEGIN # RELEASE PCNB AND LIMBO BUF IF NEED#
  457. INDEX = PCNBPBS[0] ; # SAVE THE TYPE OF PRU #
  458. P<PRUNIPWD> = LOC(PITW5[PITIDX])-1;
  459. PRUNIPNC[INDEX] = PRUNIPNC[INDEX] - 1; # DECRE NO OF PRU CONS #
  460. MRELS(PCNBAD) ;
  461. END # RELEASE #
  462.  
  463. #
  464.   RELEASE PRU-CONNECTION-TERMINATED WORKLIST SPACE
  465. #
  466. IF NCNTREL[0] # IF THIS NCNB IS TO BE RELEASED #
  467. THEN
  468. BEGIN
  469. #
  470.   FIRST RELEASE THIS NCNB
  471. #
  472. RCBRK = RCCB"LLF" ; #RC = LOGICAL LINK FAILED #
  473. PARAMS1 = BUFADDR ;
  474. NCNTREL[0] = FALSE; # RESET THE NCNB-TO-BE-RELEASED FLAG #
  475. OVLNAME = RELNCNBP;
  476. OVLCALL ;
  477. # INFORM THE HOST SIDE THAT THIS CONNECTION IS TERMINATED, AND
  478.   THE NETWORK IS IS CLEANED UP ALREADY.
  479. #
  480. HCSTTP(P<ACB>,ACNBACN[0],NWTC,0) ;
  481.  
  482. #
  483.   NOW CHECK IF WE CAN RELEASE THE LLCB TOO
  484. #
  485. IF LLCBWOF[0] AND LLCBNPC[0] EQ 0
  486. THEN # MAY NEED TO RELEASE LLCB #
  487. BEGIN
  488. LLCBWOF[0] = FALSE; # CLEAR WAITING FOR PIP FLG #
  489. IF LLCBNC[0] EQ 0
  490. THEN # NO CNS LEFT IN LLCB #
  491. BEGIN
  492. PARAMS2 = LLCBAD ;
  493. OVLNAME = RELLLCBP ;
  494. OVLCALL ;
  495. IF NBTREGW[NBIND] NQ 0 # IF DELETION DUE TO REG/CP #
  496. THEN
  497. BEGIN
  498. NBTREGW[NBIND] = NBTREGW[NBIND] - 1 ; # LLCB(S) REMAINING #
  499. IF NBTREGW[NBIND] EQ 0 # IF LAST LLCB DELETED #
  500. THEN
  501. BEGIN # SEND REG/CP/R TO PIP #
  502. PARAMS1 = HN ;
  503. PARAMS2 = 1 ; # FLAG TO SET RESPONSE BIT #
  504. OVLNAME = NCREGCPP ;
  505. OVLCALL ;
  506. END
  507. END
  508. END
  509. END
  510. PARAMP2 = 0 ; # SIGNAL FOR NO NCNB #
  511. END
  512. ELSE
  513. #
  514.   SEND BACK THE NEW NCNB ADDRESS
  515. #
  516. PARAMP2 = BUFADDR ;
  517.  
  518. PARAMP1 = 0 ;
  519. GOTO RJMAIN;
  520. END
  521. TERM
cdc/nos2.source/nam5871/nppct.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator