home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcp30tkt.zip / PGMG1.ZIP / INCLUDE / NERRNO.H < prev    next >
Text File  |  1995-12-04  |  6KB  |  106 lines

  1. #ifndef __NERRNO_32H
  2. #define __NERRNO_32H
  3.  
  4. /*
  5.  * The re-defination of error constants are necessary to avoid conflict with
  6.  * standard IBM C Set/2 V1.0 error constants.
  7.  *
  8.  * All OS/2 SOCKET API error constants are biased by SOCBASEERR from the "normal"
  9.  *
  10.  */
  11.  
  12. #define SOCBASEERR              10000
  13.  
  14. /*
  15.  * OS/2 SOCKET API definitions of regular Microsoft C 6.0 error constants
  16.  */
  17.  
  18. #define SOCEPERM                (SOCBASEERR+1)             /* Not owner */
  19. #define SOCESRCH                (SOCBASEERR+3)             /* No such process */
  20. #define SOCEINTR                (SOCBASEERR+4)             /* Interrupted system call */
  21. #define SOCENXIO                (SOCBASEERR+6)             /* No such device or address */
  22. #define SOCEBADF                (SOCBASEERR+9)             /* Bad file number */
  23. #define SOCEACCES               (SOCBASEERR+13)            /* Permission denied */
  24. #define SOCEFAULT               (SOCBASEERR+14)            /* Bad address */
  25. #define SOCEINVAL               (SOCBASEERR+22)            /* Invalid argument */
  26. #define SOCEMFILE               (SOCBASEERR+24)            /* Too many open files */
  27. #define SOCEPIPE                (SOCBASEERR+32)            /* Broken pipe */
  28.  
  29. #define SOCEOS2ERR              (SOCBASEERR+100)            /* OS/2 Error */
  30.  
  31. /*
  32.  * OS/2 SOCKET API definitions of regular BSD error constants
  33.  */
  34.  
  35. #define SOCEWOULDBLOCK          (SOCBASEERR+35)            /* Operation would block */
  36. #define SOCEINPROGRESS          (SOCBASEERR+36)            /* Operation now in progress */
  37. #define SOCEALREADY             (SOCBASEERR+37)            /* Operation already in progress */
  38. #define SOCENOTSOCK             (SOCBASEERR+38)            /* Socket operation on non-socket */
  39. #define SOCEDESTADDRREQ         (SOCBASEERR+39)            /* Destination address required */
  40. #define SOCEMSGSIZE             (SOCBASEERR+40)            /* Message too long */
  41. #define SOCEPROTOTYPE           (SOCBASEERR+41)            /* Protocol wrong type for socket */
  42. #define SOCENOPROTOOPT          (SOCBASEERR+42)            /* Protocol not available */
  43. #define SOCEPROTONOSUPPORT      (SOCBASEERR+43)            /* Protocol not supported */
  44. #define SOCESOCKTNOSUPPORT      (SOCBASEERR+44)            /* Socket type not supported */
  45. #define SOCEOPNOTSUPP           (SOCBASEERR+45)            /* Operation not supported on socket */
  46. #define SOCEPFNOSUPPORT         (SOCBASEERR+46)            /* Protocol family not supported */
  47. #define SOCEAFNOSUPPORT         (SOCBASEERR+47)            /* Address family not supported by protocol family */
  48. #define SOCEADDRINUSE           (SOCBASEERR+48)            /* Address already in use */
  49. #define SOCEADDRNOTAVAIL        (SOCBASEERR+49)            /* Can't assign requested address */
  50. #define SOCENETDOWN             (SOCBASEERR+50)            /* Network is down */
  51. #define SOCENETUNREACH          (SOCBASEERR+51)            /* Network is unreachable */
  52. #define SOCENETRESET            (SOCBASEERR+52)            /* Network dropped connection on reset */
  53. #define SOCECONNABORTED         (SOCBASEERR+53)            /* Software caused connection abort */
  54. #define SOCECONNRESET           (SOCBASEERR+54)            /* Connection reset by peer */
  55. #define SOCENOBUFS              (SOCBASEERR+55)            /* No buffer space available */
  56. #define SOCEISCONN              (SOCBASEERR+56)            /* Socket is already connected */
  57. #define SOCENOTCONN             (SOCBASEERR+57)            /* Socket is not connected */
  58. #define SOCESHUTDOWN            (SOCBASEERR+58)            /* Can't send after socket shutdown */
  59. #define SOCETOOMANYREFS         (SOCBASEERR+59)            /* Too many references: can't splice */
  60. #define SOCETIMEDOUT            (SOCBASEERR+60)            /* Connection timed out */
  61. #define SOCECONNREFUSED         (SOCBASEERR+61)            /* Connection refused */
  62. #define SOCELOOP                (SOCBASEERR+62)            /* Too many levels of symbolic links */
  63. #define SOCENAMETOOLONG         (SOCBASEERR+63)            /* File name too long */
  64. #define SOCEHOSTDOWN            (SOCBASEERR+64)            /* Host is down */
  65. #define SOCEHOSTUNREACH         (SOCBASEERR+65)            /* No route to host */
  66. #define SOCENOTEMPTY            (SOCBASEERR+66)            /* Directory not empty */
  67.  
  68. /*
  69.  * OS/2 SOCKET API errors redefined as regular BSD error constants
  70.  */
  71.  
  72. #define EWOULDBLOCK             SOCEWOULDBLOCK
  73. #define EINPROGRESS             SOCEINPROGRESS
  74. #define EALREADY                SOCEALREADY
  75. #define ENOTSOCK                SOCENOTSOCK
  76. #define EDESTADDRREQ            SOCEDESTADDRREQ
  77. #define EMSGSIZE                SOCEMSGSIZE
  78. #define EPROTOTYPE              SOCEPROTOTYPE
  79. #define ENOPROTOOPT             SOCENOPROTOOPT
  80. #define EPROTONOSUPPORT         SOCEPROTONOSUPPORT
  81. #define ESOCKTNOSUPPORT         SOCESOCKTNOSUPPORT
  82. #define EOPNOTSUPP              SOCEOPNOTSUPP
  83. #define EPFNOSUPPORT            SOCEPFNOSUPPORT
  84. #define EAFNOSUPPORT            SOCEAFNOSUPPORT
  85. #define EADDRINUSE              SOCEADDRINUSE
  86. #define EADDRNOTAVAIL           SOCEADDRNOTAVAIL
  87. #define ENETDOWN                SOCENETDOWN
  88. #define ENETUNREACH             SOCENETUNREACH
  89. #define ENETRESET               SOCENETRESET
  90. #define ECONNABORTED            SOCECONNABORTED
  91. #define ECONNRESET              SOCECONNRESET
  92. #define ENOBUFS                 SOCENOBUFS
  93. #define EISCONN                 SOCEISCONN
  94. #define ENOTCONN                SOCENOTCONN
  95. #define ESHUTDOWN               SOCESHUTDOWN
  96. #define ETOOMANYREFS            SOCETOOMANYREFS
  97. #define ETIMEDOUT               SOCETIMEDOUT
  98. #define ECONNREFUSED            SOCECONNREFUSED
  99. #define ELOOP                   SOCELOOP
  100. #define ENAMETOOLONG            SOCENAMETOOLONG
  101. #define EHOSTDOWN               SOCEHOSTDOWN
  102. #define EHOSTUNREACH            SOCEHOSTUNREACH
  103. #define ENOTEMPTY               SOCENOTEMPTY
  104.  
  105. #endif  /* __NERRNO_32H */
  106.