User Tools

Site Tools


cdc:nos2.source:nam5871:ippabos

IPPABOS

Table Of Contents

  • [00003] PROC IPPABOS (SOCKID, SOCKSTATUS)
  • [00005] IPPABOS - ABORT SOCKET
  • [00033] PROC NETPUT
  • [00034] PROC IPIDOSM

Source Code

IPPABOS.txt
  1. *DECK IPPABOS
  2. USETEXT TEXTIPL
  3. PROC IPPABOS (SOCKID, SOCKSTATUS);
  4. *CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992.
  5. # TITLE IPPABOS - ABORT SOCKET #
  6.  
  7. BEGIN # IPPABOS #
  8. #
  9. **** IPPABOS ABORT SOCKET
  10. *
  11. * THIS PROCEDURE CLOSES AN OPEN SOCKET.
  12. *
  13. * PROC IPPABOS
  14. *
  15. * ENTRY SOCKID = INTEGER VALUE OF SOCKET
  16. *
  17. * EXIT SOCKSTATUS = COMPLETION STATUS
  18. *
  19. * METHOD IF THE SOCKET IS NOT CONNECTED THEN RETURN WITH AN
  20. * APPROPRIATE STATUS INDICATION BASED ON THE CURRENT
  21. * STATE. ISSUE THE CON/END/R SM TO INITIATE THE SOCKET
  22. * CLOSING. THE SOCKSET STATE IS SET TO *CLOSING*.
  23. * THIS PROCEDURE MUST BE CALLED TO COMPLETE SOCKET
  24. * CLOSURE AND IS TO BE CALLED ANYTIME AN *ABORT* STATUS
  25. * HAS BEEN OBTAINED FROM AN IP CALL.
  26. #
  27.  
  28. #
  29. **** PROC IPPABOS - XREF LIST
  30. #
  31. XREF
  32. BEGIN
  33. PROC NETPUT; # OUTPUT A MESSAGE TO THE NETWORK #
  34. PROC IPIDOSM; # DISPATCH OUTPUT SUPERVISORY MESSATE #
  35. END
  36. #
  37. **
  38. #
  39. ITEM SOCKID I; # SOCKET IDENTIFIER #
  40. ITEM SOCKSTATUS S:SOCKSTAT; # RETURNED SOCKET STATUS #
  41.  
  42. ITEM BUFPOS I; # CURRENT POSITION IN BUFFER #
  43. CONTROL EJECT;
  44. #
  45. **** START MAIN PROCEDURE
  46. #
  47.  
  48. IF (NOT ACN$CONNECT [SOCKID])
  49. THEN
  50. BEGIN
  51. SOCKSTATUS = S"INVALIDST";
  52. RETURN;
  53. END
  54.  
  55. P<ABH> = LOC (SABH); # BASE ABH POINTER #
  56. ABHABN [0] = 0; # CLEAR APPL BLOCK NUMBER #
  57.  
  58. P<APSM> = LOC (OUTBUF); # BASE SUPERVISORY MESSAGE PTR #
  59. SPMSG0 [0] = 0;
  60. SPMSG1 [0] = 0;
  61. CONACN [0] = SOCKID; # STORE CONNECTION NUMBER #
  62.  
  63. IPIDOSM (CONEND, LCONEN); # SEND CON/END/R SM #
  64. ACN$STATE [SOCKID] = S"CLOSING";
  65. ACN$ABORT [SOCKID] = FALSE;
  66. ACN$CONNECT [SOCKID] = FALSE;
  67. SOCKSTATUS = S"OK";
  68.  
  69. RETURN; # RETURN TO CALLER #
  70.  
  71. END # IPPABOS #
  72.  
  73. TERM
cdc/nos2.source/nam5871/ippabos.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator