User Tools

Site Tools


cdc:nos2.source:nam5871:ipispfi

IPISPFI

Table Of Contents

  • [00003] PROC IPISPFI
  • [00005] IPISPFI - PROCESS FC/INIT SUPERVISORY MESSAGE.
  • [00038] PROC IPIAIPA
  • [00039] PROC IPIDOSM

Source Code

IPISPFI.txt
  1. *DECK IPISPFI
  2. USETEXT TEXTIPL
  3. PROC IPISPFI;
  4. *CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992.
  5. # TITLE IPISPFI - PROCESS FC/INIT SUPERVISORY MESSAGE. #
  6.  
  7. BEGIN # IPISPFI #
  8. #
  9. **** IPISPFI PROCESS FC/INIT SUPERVISORY MESSAGE.
  10. *
  11. * THIS PROCEDURE PROCESSES A FC/INIT SUPERVISORY MESSAGE.
  12. *
  13. * PROC IPISPFI
  14. *
  15. * ENTRY P<APSM> = PTR TO THE INPUT SUPERVISORY MESSAGE (*INBUF*).
  16. *
  17. * EXIT P<APSM> = PTR TO OUTPUT SUPERVISORY MESSAGE (*OUTBUF*).
  18. * ISS$STATUS = SET TO *OK* IF ACN MATCH.
  19. * ACN$STATTE = SET TO *OPEN*.
  20. *
  21. * METHOD IF THE CONNECTION STATE IS NOT *CONNECTED* OR *CLOSING*,
  22. * THEN, TREAT IT AS A NAM PROTOCOL ERROR.
  23. *
  24. * IF THE CONNECTION STATE IS *CONNECTED*, CHANGE THE ACN
  25. * STATE TO ACTIVE AND SEND THE FC/INIT/N SUPERVISORY
  26. * MESSAGE.
  27. *
  28. * IF THE CONNECTION STATE IS *CLOSING*, THEN IGNORE THE
  29. * MESSAGE.
  30. *
  31. #
  32.  
  33. #
  34. **** PROC IPISPFI - XREF LIST
  35. #
  36. XREF
  37. BEGIN
  38. PROC IPIAIPA; # ABORT THE IP APPLICATION #
  39. PROC IPIDOSM; # DISPATCH OUTPUT SUPERVISORY MESSAGE #
  40. END
  41. #
  42. **
  43. #
  44. CONTROL EJECT;
  45.  
  46. #
  47. **** START MAIN PROCEDURE
  48. #
  49. CURACN = FCACN [0];
  50.  
  51. #
  52. **** IF THE CONNECTION STATE IS NOT *CONNECTED* OR *CLOSING* THEN
  53. * TREAT AS A NAM PROTOCOL ERROR.
  54. #
  55. IF (ACN$STATE [CURACN] NQ S"CONNECTED")
  56. AND (ACN$STATE [CURACN] NQ S"CLOSING")
  57. THEN
  58. BEGIN
  59. IPIAIPA (NFCINIT$);
  60. RETURN;
  61. END
  62. #
  63. **** IF CONNECT STATE IS *CONNECTED*, SEND FC/INIT/N SUPERVISORY
  64. * MESSAGE AND SET THE CONNECTION STATE TO *OPEN*. IF APPLICATION
  65. * INITIATED CONNECTION, UPDATE THE SOCKET STATUS ENTRY FOR IPINITH.
  66. #
  67. IF ACN$STATE [CURACN] EQ S"CONNECTED"
  68. THEN
  69. BEGIN
  70. IF ISS$ACN [0] EQ CURACN
  71. THEN
  72. BEGIN # APPLICATION INIT CONNECTION #
  73. ISS$STATUS [0] = SOCKSTAT"OK";
  74. END
  75. ACN$STATE [CURACN] = S"OPEN"; # CONNECTION STATE NOW *OPEN* #
  76. P<APSM> = LOC (OUTBUF); # BASE SUPERVISORY MESSAGE PTR #
  77. SPMSG0[0] = 0; # CLEAR FIRST WORD #
  78. FCACN [0] = CURACN; # SET CONNECTION NUMBER #
  79. IPIDOSM (FCINITN, LFCINTN); # FORMAT AND SEND FC/INIT/N SM #
  80. END
  81.  
  82. RETURN; # RETURN TO CALLER #
  83.  
  84. END # IPISPFI #
  85.  
  86. TERM
cdc/nos2.source/nam5871/ipispfi.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator