User Tools

Site Tools


cdc:nos2.source:nam5871:ipispcr

IPISPCR

Table Of Contents

  • [00003] PROC IPISPCR
  • [00005] IPISPCR - PROCESS CON/REQ/R SUPERVISORY MESSAGE
  • [00045] PROC IPIAIPA
  • [00046] PROC IPIDOSM
  • [00047] PROC IPUMCLR
  • [00048] PROC MESSAGE

Source Code

IPISPCR.txt
  1. *DECK IPISPCR
  2. USETEXT TEXTIPL
  3. PROC IPISPCR;
  4. *CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992.
  5. # TITLE IPISPCR - PROCESS CON/REQ/R SUPERVISORY MESSAGE #
  6.  
  7. BEGIN # IPISPCR #
  8. #
  9. **** IPISPCR PROCESS CON/REQ/R SUPERVISORY MESSAGE
  10. *
  11. * THIS PROCEDURE PROCESSES A CON/REQ/R SUPERVISORY MESSAGE.
  12. *
  13. * PROC IPISPCR
  14. *
  15. * ENTRY P<ABH> = PTR TO INPUT APPLICATION BLOCK HEADER (*IABH*).
  16. * CONABN = 0 = NEW CONNECTION REQUEST
  17. * <> 0 = RESPONSE TO CON/ACRQ
  18. * P<APSM> = PTR TO INPUT SUPERVISORY MESSAGE (*INPBUF*).
  19. * NUMACN = COUNT OF CURRENT OPEN CONNECTIONS.
  20. *
  21. * EXIT NUMACN = COUNT OF CURRENT OPEN CONNECTIONS.
  22. * ACN ENTRY CREATED
  23. *
  24. * METHOD
  25. *
  26. * TREAT THE REQUEST AS A NAM PROTOCOL ERROR BASED ON THE FOLLOWING:
  27. *
  28. * 1) ABN IS OUT OF RANGE.
  29. * 2) ACN VALUE OUT OF RANGE.
  30. * 3) CONNECTION NOT DT INTER-HOST.
  31. * 4) ACN ENTRY ALREADY IN USE.
  32. *
  33. * FOR A VALID CONNECTION REQUEST:
  34. *
  35. * 1) CREATE THE APPLICATION CONNECTION ENTRY.
  36. * 2) INCREMENT THE NUMBER OF ACTIVE CONNECTIONS.
  37. * 3) SEND A CON/REQ/N SUPERVISORY MESSAGE.
  38. #
  39.  
  40. #
  41. **** PROC IPISPCR - XREF LIST
  42. #
  43. XREF
  44. BEGIN
  45. PROC IPIAIPA; # ABORT THE IP APPLICATION #
  46. PROC IPIDOSM; # DISPATCH OUTPUT SUPERVISORY MESSAGES #
  47. PROC IPUMCLR; # MEMORY CLEAR #
  48. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  49. END
  50. #
  51. **
  52. #
  53. CONTROL EJECT;
  54. #
  55. **** START MAIN PROCEDURE
  56. #
  57.  
  58. #
  59. **** VALIDATE THE CONNECTION REQUEST.
  60. #
  61.  
  62. IF CONABN [0] GR CONNECTABN$
  63. THEN
  64. BEGIN # ABN OUT OF RANGE #
  65. IPIAIPA (NCONREQ$);
  66. RETURN;
  67. END
  68.  
  69. IF (COND [0] NQ DT$INTE)
  70. THEN
  71. BEGIN # NOT APP/APP INTER CONNECT #
  72. IPIAIPA (NCONREQ$);
  73. RETURN;
  74. END
  75.  
  76. CURACN = CONACN [0]; # SET ACN ENTRY INDEX TO ABN #
  77.  
  78. IF (CURACN GR MAXACN$) OR (CURACN LS MINACN$)
  79. THEN
  80. BEGIN # INVALID ACN RECEIVED #
  81. IPIAIPA (NCONREQ$);
  82. RETURN;
  83. END
  84.  
  85. IF (ACN$STATE [CURACN] NQ S"IDLE") AND
  86. (ACN$STATE [CURACN] NQ S"CLOSED")
  87. THEN
  88. BEGIN # INVALID CONNECTION STATE #
  89. IPIAIPA (NCONREQ$);
  90. RETURN;
  91. END
  92. #
  93. **** CREATE THE APPLICATION CONNECTION ENTRY.
  94. *
  95. #
  96. IPUMCLR (LOC (ACN$WORD0 [CURACN]), ACNSIZE$);
  97. ACN$ACN [CURACN] = CURACN; # STORE CONNECTION NUMBER #
  98. ACN$STATE [CURACN] = S"CONNECTED";# STORE CURRENT CONNECT STATE #
  99. ACN$CONNECT [CURACN] = TRUE; # SOCKET CONNECTED TO NAM #
  100. ACN$ABN [CURACN] = 1; # STORE APPLICATION BLOCK NO #
  101. ACN$DBZ [CURACN] = CONDBZ[0]; # STORE DOWNLINE BLOCK SIZE #
  102. ACN$ABL [CURACN] = CONABL[0]; # STORE APPLICATION BLOCK LIMIT #
  103. ACN$BUFFER [CURACN] = LOC(QUE$BUF [0, CURACN]); # INPUT BUF LOC #
  104. ACN$BLOCK [CURACN] = TRUE; # DEFAULT BLOCKING TRUE #
  105. ACN$WAITIME [CURACN] = BLOCKWAIT$;# DEFAULT BLOCK TIME #
  106.  
  107. IF CONABN [0] EQ CONNECTABN$
  108. THEN
  109. BEGIN # SAVE ACN FOR FC/INIT VERIFY #
  110. ISS$ACN [0] = CONACN [0];
  111. END
  112.  
  113. #
  114. **** INCREMENT THE NUMBER OF ACTIVE CONNECTIONS.
  115. *
  116. #
  117. NUMACN = NUMACN + 1;
  118. #
  119. **** SEND A CON/REQ/N SUPERVISORY MESSAGE.
  120. *
  121. #
  122. P<APSM> = LOC(OUTBUF); # BASE SUPERVISORY MESSAGE PTR #
  123. SPMSG0 [0] = 0; # CLEAR FIRST WORD #
  124. RC [0] = 0; # STORE REASON CODE #
  125.  
  126. CONACN [0] = CURACN; # SET CONNECTION NUMBER #
  127. CONNXP [0] = TRUE; # SET NO TRANSPARENT DATA FLAG #
  128. CONACT [0] = CT8ASCII; # SET CHARACTER TYPE EXPECTED #
  129. CONALN [0] = DATA$; # ALL CONNECTIONS ON LIST DATA$ #
  130.  
  131. IPIDOSM (CONREQN,LCORQR); # FORMAT AND SEND CON/REQ/N SM #
  132.  
  133. RETURN; # RETURN TO CALLER #
  134.  
  135. END # IPISPCR #
  136.  
  137. TERM
cdc/nos2.source/nam5871/ipispcr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator