home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sockpli.zip / NERRNO.COP < prev    next >
Text File  |  1995-06-27  |  9KB  |  264 lines

  1.  %dcl #_NERRNO_32H char ext;
  2.  %if #_NERRNO_32H = '' %then
  3.   %do;
  4.     %dcl #_NERRNO_32H char ext;
  5.     %#_NERRNO_32H = 'Y';
  6.  
  7.  /************************************************************/
  8.  /* All OS/2 SOCKET API error constants are biased by        */
  9.  /* SOCBASEERR from the "normal".                            */
  10.  /************************************************************/
  11.  
  12.  %dcl SOCBASEERR fixed;
  13.  %SCOBASEERR = 10000;
  14.  
  15.  /*
  16.    * OS/2 SOCKET API definitions of regular Microsoft C 6.0 error consta
  17.  nts
  18.    */
  19.  
  20.  %dcl SOCEPERM fixed;
  21.  %SOCEPERM = SOCBASEERR+1; /* Not owner */
  22.  %dcl SOCESRCH fixed;
  23.  %SOCESRCH = SOCBASEERR+3; /* No such process */
  24.  %dcl SOCEINTR fixed;
  25.  %SOCEINTR = SOCBASEERR+4; /* Interrupted system call */
  26.  %dcl SOCENXIO fixed;
  27.  %SOCENXIO = SOCBASEERR+6; /* No such device or address */
  28.  %dcl SOCEBADF fixed;
  29.  %SOCEBADF = SOCBASEERR+9; /* Bad file number */
  30.  %dcl SOCEACCES fixed;
  31.  %SOCEACCES = SOCBASEERR+13; /* Permission denied */
  32.  %dcl SOCEFAULT fixed;
  33.  %SOCEFAULT = SOCBASEERR+14; /* Bad address */
  34.  %dcl SOCEINVAL fixed;
  35.  %SOCEINVAL = SOCBASEERR+22;  /* Invalid argument */
  36.  %dcl SOCEMFILE fixed;
  37.  %SOCEMFILE = SOCBASEERR+24;  /* Too many open files */
  38.  %dcl SOCEPIPE fixed;
  39.  %SOCEPIPE = SOCBASEERR+32;   /* Broken pipe */
  40.  
  41.  %dcl SOCEOS2ERR fixed;
  42.  %SOCEOS2ERR = SOCBASEERR+100;  /* OS/2 Error */
  43.  
  44.  /*----------------------------------------------------------*/
  45.  /* OS/2 SOCKET API defs. of regular BSD error constants     */
  46.  /*----------------------------------------------------------*/
  47.  
  48.  %dcl SOCEWOULDBLOCK fixed;
  49.  %SOCEWOULDBLOCK = SOCBASEERR+35;  /* Operation would block */
  50.  %dcl SOCEINPROGRESS fixed;
  51.  %SOCEINPROGRESS = SOCBASEERR+36;  /* Operation now in progress */
  52.  %dcl SOCEALREADY fixed;
  53.  %SOCEALREADY = SOCBASEERR+37;     /* Operation already in progress */
  54.  %dcl SOCENOTSOCK fixed;
  55.  %SOCENOTSOCK = SOCBASEERR+38;     /* Socket operation on non-socket */
  56.  %dcl SOCEDESTADDRREQ fixed;
  57.  %SOCEDESTADDRREQ = SOCBASEERR+39; /* Destination address required */
  58.  %dcl SOCEMSGSIZE fixed;
  59.  %SOCEMSGSIZE = SOCBASEERR+40;     /* Message too long */
  60.  %dcl SOCEPROTOTYPE fixed;
  61.  %SOCEPROTOTYPE = SOCBASEERR+41;   /* Protocol wrong type for socket */
  62.  %dcl SOCENOPROTOOPT fixed;
  63.  %SOCENOPROTOOPT = SOCBASEERR+42;  /* Protocol not available */
  64.  %dcl SOCEPROTONOSUPPORT fixed;
  65.  %SOCEPROTONOSUPPORT = SOCBASEERR+43;  /* Protocol not supported */
  66.  %dcl SOCESOCKTNOSUPPORT fixed;
  67.  %SOCESOCKTNOSUPPORT = SOCBASEERR+44;  /* Socket type not supported */
  68.  %dcl SOCEOPNOTSUPP fixed;
  69.  %SOCEOPNOTSUPP = SOCBASEERR+45; /* Operation not supported on socket */
  70.  %dcl SOCEPFNOSUPPORT fixed;
  71.  %SOCEPFNOSUPPORT = SOCBASEERR+46;  /* Protocol family not supported */
  72.  %dcl SOCEAFNOSUPPORT fixed;
  73.  %SOCEAFNOSUPPORT = SOCBASEERR+47; /* Addr family not supported by */
  74.                                    /* protocol family */
  75.  %dcl SOCEADDRINUSE fixed;
  76.  %SOCEADDRINUSE = SOCBASEERR+48;    /* Address already in use */
  77.  %dcl SOCEADDRNOTAVAIL fixed;
  78.  %SOCEADDRNOTAVAIL = SOCBASEERR+49; /* Can't assign requested address */
  79.  %dcl SOCENETDOWN fixed;
  80.  %SOCENETDOWN = SOCBASEERR+50;      /* Network is down */
  81.  %dcl SOCENETUNREACH fixed;
  82.  %SOCENETUNREACH = SOCBASEERR+51;   /* Network is unreachable */
  83.  %dcl SOCENETRESET fixed;
  84.  %SOCENETRESET = SOCBASEERR+52;
  85.  /* Network dropped connection on reset */
  86.  %dcl SOCECONNABORTED fixed;
  87.  %SOCECONNABORTED = SOCBASEERR+53;
  88.  /* Software caused connection abort */
  89.  %dcl SOCECONNRESET fixed;
  90.  %SOCECONNRESET = SOCBASEERR+54;
  91.  /* Connection reset by peer */
  92.  %dcl SOCENOBUFS fixed;
  93.  %SOCENOBUFS = SOCBASEERR+55;
  94.  /* No buffer space available */
  95.  %dcl SOCEISCONN fixed;
  96.  %SOCEISCONN = SOCBASEERR+56;
  97.  /* Socket is already connected */
  98.  %dcl SOCENOTCONN fixed;
  99.  %SOCENOTCONN = SOCBASEERR+57;
  100.  /* Socket is not connected */
  101.  %dcl SOCESHUTDOWN fixed;
  102.  %SOCESHUTDOWN = SOCBASEERR+58;
  103.  /* Can't send after socket shutdown */
  104.  %dcl SOCETOOMANYREFS fixed;
  105.  %SOCETOOMANYREFS = SOCBASEERR+59;
  106.  /* Too many references: can't splice */
  107.  %dcl SOCETIMEDOUT fixed;
  108.  %SOCETIMEDOUT = SOCBASEERR+60;
  109.  /* Connection timed out */
  110.  %dcl SOCECONNREFUSED fixed;
  111.  %SOCECONNREFUSED = SOCBASEERR+61;
  112.  /* Connection refused */
  113.  %dcl SOCELOOP fixed;
  114.  %SOCELOOP = SOCBASEERR+62;
  115.  /* Too many levels of symbolic links */
  116.  %dcl SOCENAMETOOLONG fixed;
  117.  %SOCENAMETOOLONG = SOCBASEERR+63;
  118.  /* File name too long */
  119.  %dcl SOCEHOSTDOWN fixed;
  120.  %SOCEHOSTDOWN = SOCBASEERR+64;
  121.  /* Host is down */
  122.  %dcl SOCEHOSTUNREACH fixed;
  123.  %SOCEHOSTUNREACH = SOCBASEERR+65;
  124.  /* No route to host */
  125.  %dcl SOCENOTEMPTY fixed;
  126.  %SOCENOTEMPTY = SOCBASEERR+66;
  127.  /* Directory not empty */
  128.  
  129.  /*
  130.    * OS/2 SOCKET API errors redefined as regular BSD error constants
  131.    */
  132.  
  133.  %dcl EWOULDBLOCK fixed;
  134.  %EWOULDBLOCK='SOCEWOULDBLOCK;
  135.     %dcl @EWOULDBLOCK fixed;
  136.     %@EWOULDBLOCK='@SOCEWOULDBLOCK;
  137.  %dcl EINPROGRESS fixed;
  138.  %EINPROGRESS='SOCEINPROGRESS;
  139.     %dcl @EINPROGRESS fixed;
  140.     %@EINPROGRESS='@SOCEINPROGRESS;
  141.  %dcl EALREADY fixed;
  142.  %EALREADY='SOCEALREADY;
  143.     %dcl @EALREADY fixed;
  144.     %@EALREADY='@SOCEALREADY;
  145.  %dcl ENOTSOCK fixed;
  146.  %ENOTSOCK='SOCENOTSOCK;
  147.     %dcl @ENOTSOCK fixed;
  148.     %@ENOTSOCK='@SOCENOTSOCK;
  149.  %dcl EDESTADDRREQ fixed;
  150.  %EDESTADDRREQ='SOCEDESTADDRREQ;
  151.     %dcl @EDESTADDRREQ fixed;
  152.     %@EDESTADDRREQ='@SOCEDESTADDRREQ;
  153.  %dcl EMSGSIZE fixed;
  154.  %EMSGSIZE='SOCEMSGSIZE;
  155.     %dcl @EMSGSIZE fixed;
  156.     %@EMSGSIZE='@SOCEMSGSIZE;
  157.  %dcl EPROTOTYPE fixed;
  158.  %EPROTOTYPE='SOCEPROTOTYPE;
  159.     %dcl @EPROTOTYPE fixed;
  160.     %@EPROTOTYPE='@SOCEPROTOTYPE;
  161.  %dcl ENOPROTOOPT fixed;
  162.  %ENOPROTOOPT='SOCENOPROTOOPT;
  163.     %dcl @ENOPROTOOPT fixed;
  164.     %@ENOPROTOOPT='@SOCENOPROTOOPT;
  165.  %dcl EPROTONOSUPPORT fixed;
  166.  %EPROTONOSUPPORT='SOCEPROTONOSUPPORT;
  167.     %dcl @EPROTONOSUPPORT fixed;
  168.     %@EPROTONOSUPPORT='@SOCEPROTONOSUPPORT;
  169.  %dcl ESOCKTNOSUPPORT fixed;
  170.  %ESOCKTNOSUPPORT='SOCESOCKTNOSUPPORT;
  171.     %dcl @ESOCKTNOSUPPORT fixed;
  172.     %@ESOCKTNOSUPPORT='@SOCESOCKTNOSUPPORT;
  173.  %dcl EOPNOTSUPP fixed;
  174.  %EOPNOTSUPP='SOCEOPNOTSUPP;
  175.     %dcl @EOPNOTSUPP fixed;
  176.     %@EOPNOTSUPP='@SOCEOPNOTSUPP;
  177.  %dcl EPFNOSUPPORT fixed;
  178.  %EPFNOSUPPORT='SOCEPFNOSUPPORT;
  179.     %dcl @EPFNOSUPPORT fixed;
  180.     %@EPFNOSUPPORT='@SOCEPFNOSUPPORT;
  181.  %dcl EAFNOSUPPORT fixed;
  182.  %EAFNOSUPPORT='SOCEAFNOSUPPORT;
  183.     %dcl @EAFNOSUPPORT fixed;
  184.     %@EAFNOSUPPORT='@SOCEAFNOSUPPORT;
  185.  %dcl EADDRINUSE fixed;
  186.  %EADDRINUSE='SOCEADDRINUSE;
  187.     %dcl @EADDRINUSE fixed;
  188.     %@EADDRINUSE='@SOCEADDRINUSE;
  189.  %dcl EADDRNOTAVAIL fixed;
  190.  %EADDRNOTAVAIL='SOCEADDRNOTAVAIL;
  191.     %dcl @EADDRNOTAVAIL fixed;
  192.     %@EADDRNOTAVAIL='@SOCEADDRNOTAVAIL;
  193.  %dcl ENETDOWN fixed;
  194.  %ENETDOWN='SOCENETDOWN;
  195.     %dcl @ENETDOWN fixed;
  196.     %@ENETDOWN='@SOCENETDOWN;
  197.  %dcl ENETUNREACH fixed;
  198.  %ENETUNREACH='SOCENETUNREACH;
  199.     %dcl @ENETUNREACH fixed;
  200.     %@ENETUNREACH='@SOCENETUNREACH;
  201.  %dcl ENETRESET fixed;
  202.  %ENETRESET='SOCENETRESET;
  203.     %dcl @ENETRESET fixed;
  204.     %@ENETRESET='@SOCENETRESET;
  205.  %dcl ECONNABORTED fixed;
  206.  %ECONNABORTED='SOCECONNABORTED;
  207.     %dcl @ECONNABORTED fixed;
  208.     %@ECONNABORTED='@SOCECONNABORTED;
  209.  %dcl ECONNRESET fixed;
  210.  %ECONNRESET='SOCECONNRESET;
  211.     %dcl @ECONNRESET fixed;
  212.     %@ECONNRESET='@SOCECONNRESET;
  213.  %dcl ENOBUFS fixed;
  214.  %ENOBUFS='SOCENOBUFS;
  215.     %dcl @ENOBUFS fixed;
  216.     %@ENOBUFS='@SOCENOBUFS;
  217.  %dcl EISCONN fixed;
  218.  %EISCONN='SOCEISCONN;
  219.     %dcl @EISCONN fixed;
  220.     %@EISCONN='@SOCEISCONN;
  221.  %dcl ENOTCONN fixed;
  222.  %ENOTCONN='SOCENOTCONN;
  223.     %dcl @ENOTCONN fixed;
  224.     %@ENOTCONN='@SOCENOTCONN;
  225.  %dcl ESHUTDOWN fixed;
  226.  %ESHUTDOWN='SOCESHUTDOWN;
  227.     %dcl @ESHUTDOWN fixed;
  228.     %@ESHUTDOWN='@SOCESHUTDOWN;
  229.  %dcl ETOOMANYREFS fixed;
  230.  %ETOOMANYREFS='SOCETOOMANYREFS;
  231.     %dcl @ETOOMANYREFS fixed;
  232.     %@ETOOMANYREFS='@SOCETOOMANYREFS;
  233.  %dcl ETIMEDOUT fixed;
  234.  %ETIMEDOUT='SOCETIMEDOUT;
  235.     %dcl @ETIMEDOUT fixed;
  236.     %@ETIMEDOUT='@SOCETIMEDOUT;
  237.  %dcl ECONNREFUSED fixed;
  238.  %ECONNREFUSED='SOCECONNREFUSED;
  239.     %dcl @ECONNREFUSED fixed;
  240.     %@ECONNREFUSED='@SOCECONNREFUSED;
  241.  %dcl ELOOP fixed;
  242.  %ELOOP='SOCELOOP;
  243.     %dcl @ELOOP fixed;
  244.     %@ELOOP='@SOCELOOP;
  245.  %dcl ENAMETOOLONG fixed;
  246.  %ENAMETOOLONG='SOCENAMETOOLONG;
  247.     %dcl @ENAMETOOLONG fixed;
  248.     %@ENAMETOOLONG='@SOCENAMETOOLONG;
  249.  %dcl EHOSTDOWN fixed;
  250.  %EHOSTDOWN='SOCEHOSTDOWN;
  251.     %dcl @EHOSTDOWN fixed;
  252.     %@EHOSTDOWN='@SOCEHOSTDOWN;
  253.  %dcl EHOSTUNREACH fixed;
  254.  %EHOSTUNREACH='SOCEHOSTUNREACH;
  255.     %dcl @EHOSTUNREACH fixed;
  256.     %@EHOSTUNREACH='@SOCEHOSTUNREACH;
  257.  %dcl ENOTEMPTY fixed;
  258.  %ENOTEMPTY='SOCENOTEMPTY;
  259.     %dcl @ENOTEMPTY fixed;
  260.     %@ENOTEMPTY='@SOCENOTEMPTY;
  261.  
  262.   %end;
  263.   /* __NERRNO_32H */
  264.