User Tools

Site Tools


cdc:nos2.source:nam5871:npback

NPBACK

Table Of Contents

  • [00009] PROC NPBACK(BUFADDR,(NCNBFWA))
  • [00052] PROC NFOB
  • [00053] PROC OVLCALL
  • [00054] PROC XTRACE

Source Code

NPBACK.txt
  1. *DECK NPBACK
  2. USETEXT NIPDEF
  3. USETEXT AHEADER
  4. USETEXT DRHDR
  5. USETEXT NHEADER
  6. USETEXT NCNB
  7. USETEXT OVERLAY
  8. USETEXT PARAMS
  9. PROC NPBACK(BUFADDR,(NCNBFWA)); # PROCESS BACK BLOCK FROM CCP #
  10.  
  11. STARTIMS;
  12. #
  13. *1DC NPBACK
  14. *
  15. * 1. PROC NAME AUTHOR DATE
  16. * NPBACK J.C. LEE 83/04/26
  17. *
  18. * 2. FUNCTIONAL DESCRIPTION :
  19. * PROCESS BACK FORM CCP.
  20. *
  21. * 3. METHOD USED :
  22. * IF BSN DOESNOT MATCH BSN IN THE CURRENT ACKQ ENTRY
  23. * THEN CALL NBADBSN.
  24. * IF BSN DOEN MATCH, FORM FC/ACK (TO BE PASSED TO HBSTTP),
  25. * UPDATE ACK-QUEUE, DELINK DATA IN DATA RING, SEND DATA.
  26. *
  27. * 4. ENTRY PARAMS:
  28. * NCNBFWA - NCNB ADDRESS
  29. * BUFADDR - NETWORK BLOCK ADDRESS.
  30. *
  31. * 5. OUTPUT PARAMETERS
  32. * PARAMS3 - 0 IF NO ACKQ ENTRY FOUND.
  33. *
  34. * 6. ROUTINS CALLED:
  35. * NFOB - SEND DATA TO CCP
  36. * OVLCALL - LOAD AND EXECUTE OVERLAY
  37. *
  38. *
  39.  #
  40. STOPIMS;
  41.  
  42. #
  43.   FORMAL PARAMETERS
  44. #
  45. ITEM NCNBFWA; # FWA OF NCNB #
  46. ITEM BUFADDR; # FWA OF UPLINE NETWORK -BACK- BLOCK #
  47. #
  48.   EXTERNAL REFERENCES
  49. #
  50. XREF
  51. BEGIN
  52. PROC NFOB; # SEND NETWORK BLOCK #
  53. PROC OVLCALL; # LOAD OVERLAY #
  54. PROC XTRACE; # TRACE CALL #
  55. END
  56. #
  57.   LOCAL VARIABLES
  58. #
  59. ARRAY FC$ACK S(1); # ARRAY OF FC/ACK SUP MSG #
  60. BEGIN
  61. ITEM FC$PFCSFC U(00,00,16) = [FCACK]; # PFC/SFC FIELD #
  62. ITEM FC$FILL1 U(00,16,20) = [0]; # ZERO FILL FIELD #
  63. ITEM FC$ABN U(00,36,18) = [0]; # FC/ACK ABN FIELD #
  64. ITEM FC$FILL2 U(00,54,06) = [0]; # ZERO FILL FIELD #
  65. ITEM FC$WORD U(00,00,60); # PFC/SFC WORD #
  66. END
  67.  
  68. ITEM CURRBLK; # CURRENT QUEUED BLOCK POINTER #
  69. ITEM NEXTBLK; # NEXT BLOCK IN QUEUE POINTER #
  70.  
  71. CONTROL EJECT;
  72.  
  73. BEGIN # NPBACK #
  74.  
  75. CONTROL IFEQ DEBUG,1;
  76. XTRACE("NBACK");
  77. CONTROL FI;
  78.  
  79. P<NCNB> = NCNBFWA;
  80. P<NHEADER> = BUFADDR+BLKHSIZE; # NETWORK HEADER FWA #
  81. P<AHEADER> = NCNBACKQ[0]+ACKHSIZE+NCNBAKOU[0]; # ACKQ ENTRY #
  82.  
  83. IF ABHABT[0] NQ 0
  84. THEN
  85. BEGIN # ACK IS EXPECTING FOR THIS ENTRY #
  86. IF NHBSN[0] NQ ABHADR[0]
  87. THEN # BSN MISMATCH, ACTIVATE BAD UPLINE BSN PROCESSING #
  88. BEGIN
  89. PARAMS1 = P<NCNB>;
  90. PARAMS2 = NHBSN[0]; # BAD BSN ON NETWORK HEADER #
  91. OVLNAME = NBADBSNP;
  92. OVLCALL;
  93. BUFADDR = PARAMS3; # FWA OF PSEUDO NAK ENTRY(S) #
  94. END
  95.  
  96. ELSE # BSN MATCH, GENERATE PSEUDO ACK ENTRY FOR HOST SIDE #
  97. BEGIN
  98. FC$ABN[0] = ABHABN[0]; # ACKNOWLEDGED BLOCK-S ABN #
  99. NHWORD[0] = FC$WORD[0]; # BUILD PFC/SFC WORD #
  100. END
  101. END # ACK IS EXPECTING FOR THIS ENTRY #
  102. ELSE
  103. BUFADDR = 0 ; # FC/ACK IS NOT EXPECTED FOR THIS #
  104. # ENTRY, SO IGNORE THIS BACK #
  105.  
  106. # UPDATE THE ACK QUEUE AND OUTSTANDING BLOCK COUNT #
  107.  
  108. IF (NCNBAKOU[0]+1) GQ NCNBDBL[0]
  109. THEN # EXCEEDS ACKQ SIZE, UPDATE OUT POINTER #
  110. NCNBAKOU[0] = 0; # RESET OUT POINTER TO ZERO #
  111. ELSE # INCREMENT OUT POINTER BY ONE #
  112. NCNBAKOU[0] = NCNBAKOU[0]+1;
  113.  
  114. NCNBNBO[0] = NCNBNBO[0]-1; # DECREMENT BLK OUTSTANDING COUNT #
  115.  
  116. FOR CURRBLK=CURRBLK WHILE NCNBNBO[0] LS NCNBDBL[0]
  117. AND NCNBDRFP[0] NQ 0 # DATA RING EXISTS #
  118. AND NOT NCNBNBR[0] # CONN TRAFFIC ALLOWED #
  119. DO # DELINK BLOCK FROM QUEUED DATA RING AND SEND TO NETWORK #
  120. BEGIN
  121. CURRBLK = NCNBDRFP[0]; # CURRENT BLOCK TO SEND #
  122. P<DRHDRWD> = 0;
  123. NEXTBLK = NEXTPTR[CURRBLK]; # NEXT BLOCK IN QUEUE #
  124. IF CURRBLK NQ NCNBDRBP[0]
  125. THEN # MORE THAN ONE BLOCK QUEUED #
  126. BEGIN # DELINK BLOCK FROM QUEUE #
  127. NCNBDRFP[0] = NEXTBLK;
  128. BACKPTR[NEXTBLK] = LOC(NCNBDRFP[0]);
  129. END
  130. ELSE # ONLY ONE BLOCK QUEUED #
  131. NCNBDRPTRS[0] = 0;
  132. NCNBBLKSQ[0] = NCNBBLKSQ[0]-1; # DECREMENT BLOCKS QUEUED COUNT #
  133. NFOB(CURRBLK,P<NCNB>); # SEND DATA TO NETWORK #
  134. END
  135.  
  136. RETURN;
  137. END # NPBACK #
  138. TERM
cdc/nos2.source/nam5871/npback.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator