User Tools

Site Tools


cdc:nos2.source:nam5871:csccpa

CSCCPA

Table Of Contents

  • [00005] PROC CSCCPA
  • [00006] CSCCPA - COMPLETE PROTOCOL ACTION.
  • [00010] COMPLETE PROTOCOL ACTION.
  • [00051] PROC CSCPNQ
  • [00052] PROC SSTAQE

Source Code

CSCCPA.txt
  1. *DECK CSCCPA
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. USETEXT TXTAPSS
  5. PROC CSCCPA;
  6. # TITLE CSCCPA - COMPLETE PROTOCOL ACTION. #
  7.  
  8. BEGIN # CSCCPA #
  9. #
  10. ** CSCCPA - COMPLETE PROTOCOL ACTION.
  11. *
  12. * D. G. DEPEW. 82/03/16.
  13. * D. G. DEPEW. 82/06/03.
  14. *
  15. * THIS PROCEDURE PERFORMS ALL THE CONNECTION(C) LAYER PROCESSING
  16. * REQUIRED FOR ALL CONNECTION/OPERATOR RELATED SUPERVISORY MESSAGES
  17. * THAT EMANATE FROM THE INNER(I) LAYER (TERMED PROTOCOL RESPONSES).
  18. *
  19. * PROC CSCCPA
  20. *
  21. * ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
  22. * TRAFFIC QUEUE (*CNQ*) ENTRY.
  23. * ABHBUF[0] = APPLICATION BLOCK HEADER FOR THE SM (BASED
  24. * ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
  25. * MSGBUF[0] = BODY OF THE SM (BASED ARRAY *APSM* IN
  26. * *TXTAPSS* POINTS HERE). THE POSSIBLE PFC/SFC
  27. * VALUES ARE: HOP/START/N, CON/REQ/N,
  28. * CON/END/R. HOWEVER, ONLY THE CON/END/R
  29. * ACTUALLY HAS AN SM BODY PORTION AT THIS TIME.
  30. *
  31. * EXIT ANY OF THE FOLLOWING IN VARIOUS COMBINATIONS ACCORDING TO
  32. * THE SM (PROTOCOL RESPONSE) RECEIVED AND THE STATE OF THE
  33. * ACN LIST ENTRY FOR THE OPERATOR IN QUESTION:
  34. * - THE STATE OF THE ACN LIST ENTRY HAS BEEN UPDATED.
  35. * - A CON/REQ/N OR CON/END/R SM HAS BEEN PLACED IN THE
  36. * OUTGOING TRAFFIC QUEUE (*OTQ*).
  37. * - A HOP/START SM (ESSENTIALLY) HAS BEEN PLACED IN THE
  38. * PROTOCOL EVENT QUEUE (*PEQ*).
  39. *
  40. * NOTES 1. THERE IS NO REAL HOP/START/N SM. THIS IS STRICTLY A
  41. * CS INTERNAL CODE.
  42. * 2. THE PROCESSING IS DEFINED BY THE CS/HOP AND CS/NOP
  43. * STATE DIAGRAMS.
  44. #
  45.  
  46. #
  47. **** PROC CSCCPA - XREF LIST.
  48. #
  49. XREF
  50. BEGIN
  51. PROC CSCPNQ; # PURGE NOP QUEUE #
  52. PROC SSTAQE; # ACCEPT QUEUE ENTRY #
  53. END
  54. #
  55. ****
  56. #
  57.  
  58.  
  59. ITEM DUM;
  60.  
  61.  
  62.  
  63.  
  64.  
  65. #
  66. * WE EXECUTE WHAT AMOUNTS TO A CASE CONSTRUCT TO PROCESS THE THREE
  67. * TYPES OF PROTOCOL RESPONSES.
  68. #
  69.  
  70.  
  71.  
  72. IF WCB$SMID[0] EQ SMID"HOPSRTN"
  73. THEN # HOP/START PROCESSING BY I-LAYER DONE #
  74. BEGIN
  75.  
  76. #
  77. * SIMPLY UPDATE THE STATE OF THE HOP PSEUDO ACN IN ACCORDANCE
  78. * WITH ITS EXISTING STATE.
  79. #
  80. IF ACN$HOPST[HOPORD$] EQ S"CREATE"
  81. THEN # MOST USUAL CIRCUMSTANCE #
  82. ACN$HOPST[HOPORD$] = S"COMMAND"; # HISTORY BUFFER TO FOLLOW #
  83.  
  84. ELSE IF ACN$HOPST[HOPORD$] EQ S"STARTEND"
  85. THEN
  86. ACN$HOPST[HOPORD$] = S"ENDED"; # WILL END AFTER HIST BUFF #
  87.  
  88. ELSE # MUST BE HOP/BRK AFT HOP/START #
  89. ACN$HOPST[HOPORD$] = S"BREAK"; # WILL DISCARD HIST BUFFER #
  90.  
  91. END # HOP/START/N PROTOCOL RESPONSE #
  92.  
  93.  
  94.  
  95. ELSE IF WCB$SMID[0] EQ SMID"CONREQN"
  96. THEN # CON/REQ/R PROCESSING BY I-LAYER DONE #
  97. BEGIN
  98.  
  99. #
  100. * SIMPLY FORMAT AND ISSUE THE CON/REQ/N SM. UPDATE THE STATE.
  101. #
  102. WCB$WORD[1] = LCORQR + 2; # ENTRY SIZE #
  103.  
  104. ABHWORD[1] = LCORQR; # TEXT LENGTH #
  105. ABHABT[1] = APPCMD; # BLOCK TYPE #
  106. ABHACT[1] = CT60TRANS; # CHARACTER TYPE - ABH COMPLETE #
  107.  
  108. SPMSG0[0] = 0; # LIST NUMBER + OTHERS #
  109. PFCSFC[0] = CONREQN; # PFC/SFC #
  110. CONBDD[0] = TRUE; # DISCARD INPUT UPON BREAK #
  111. CONNXP[0] = TRUE; # DISCARD TRANSPARENT DATA #
  112. CONACT[0] = CT6DISPLAY; # INPUT CHARACTER TYPE FOR CN #
  113. CONACN[0] = ABHADR[0]; # NOP CN NUMBER - SM COMPLETE #
  114.  
  115. ACN$NOPST[ABHADR[0]] = S"COMMAND"; # WAIT FOR CS BANNER #
  116. SSTAQE (P<OTQ>, WCBUF[1], ABHBUF[1], MSGBUF[0]);
  117.  
  118. END # CON/REQ/N PROTOCOL RESPONSE #
  119.  
  120.  
  121.  
  122. ELSE # MUST BE CON/END/R (OP GONE FM I-LAYER) #
  123. BEGIN
  124.  
  125. #
  126. * FIRST TAKE A MAIN BRANCH DEPENDING UPON WHETHER THIS REQUEST IS
  127. * FOR THE HOP OR A NOP (THE PROCESSING IS COMPLETELY DIFFERENT).
  128. #
  129. IF ABHADR[0] EQ HOPORD$
  130. THEN # CON/END REQUEST FOR THE HOP #
  131. BEGIN
  132.  
  133. #
  134. * THE CON/END/R PROTOCOL RESPONSE FOR THE HOP ALWAYS RESULTS
  135. * FROM A HOP/END SM HAVING BEEN PROCESSED. THERE IS NO DEFINED
  136. * RESPONSE TO A HOP/END SM. HENCE, FOR THIS CASE THE CON/END/R
  137. * PROTOCOL RESPONSE IS A CS INTERNAL SIGNAL FROM THE I-LAYER TO
  138. * THE C-LAYER INDICATING ALL CLEANUP FOR THE HOP IS COMPLETE.
  139. * IF A SUBSEQUENT HOP/START SM HAS ALREADY BEEN ENCOUNTERED, IT
  140. * CAN NOW BE SENT TO THE I-LAYER (AS A PROTOCOL EVENT). UPDATE
  141. * THE STATE OF THE HOP PSEUDO ACN.
  142. #
  143. IF ACN$HOPST[HOPORD$] EQ S"ENDED"
  144. THEN # MOST USUAL CIRCUMSTANCE #
  145. ACN$HOPST[HOPORD$] = S"INACT";
  146.  
  147. ELSE # MUST SND HOP/START TO I-LAYER #
  148. BEGIN
  149. WCB$SMID[0] = SMID"HOPSTRT"; # ALL ELSE IS SET #
  150. SSTAQE (P<PEQ>, WCBUF[0], ABH[0], APSM[0]); # TO I-LAYER #
  151. IF ACN$HOPST[HOPORD$] EQ S"RESTART"
  152. THEN
  153. ACN$HOPST[HOPORD$] = S"CREATE";
  154. ELSE
  155. ACN$HOPST[HOPORD$] = S"STARTBRK";
  156. END
  157.  
  158. END # HOP CON/END/R PROTOCOL RESP #
  159.  
  160.  
  161. ELSE # CON/END REQUEST FOR A NOP #
  162. BEGIN
  163.  
  164. #
  165. * FORMAT AND ISSUE THE CON/END/R SM. PURGE ANY DATA QUEUED FOR
  166. * THIS NOP. UPDATE THE STATE.
  167. #
  168. WCB$WORD[1] = LCONEN + 2; # ENTRY SIZE #
  169.  
  170. ABHWORD[1] = LCONEN; # TEXT LENGTH #
  171. ABHABT[1] = APPCMD; # BLOCK TYPE #
  172. ABHACT[1] = CT60TRANS; # CHARACTER TYPE - ABH COMPLETE #
  173.  
  174. SPMSG0[0] = 0;
  175. PFCSFC[0] = CONEND; # PFC/SFC #
  176. IF WCB$WC[0] EQ 2
  177. THEN # I-LAYER DID NOT PROVIDE ANAME #
  178. SPMSG1[0] = 0; # INSURE ANAME = 0 #
  179. CONACN[0] = ABHADR[0]; # NOP CN NUMBER - SM COMPLETE #
  180.  
  181. ACN$NOPST[ABHADR[0]] = S"ENDED";
  182. CSCPNQ (ABHADR[0], DUM); # DELETE NOP'S OUTPUT #
  183. SSTAQE (P<OTQ>, WCBUF[1], ABHBUF[1], MSGBUF[0]);
  184.  
  185. END # NOP CON/END/R PROTOCOL RESP #
  186.  
  187. END # CON/END/R PROTOCOL RESPONSE #
  188.  
  189.  
  190. END # CSCCPA #
  191.  
  192. TERM
cdc/nos2.source/nam5871/csccpa.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator