errno.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #ifndef _NET_ERRNO_H_
  2. #define _NET_ERRNO_H_
  3. /*
  4. * Copyright (C) 2001-2003 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
  23. * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. *
  34. * -
  35. * Portions Copyright (c) 1983, 1993 by
  36. * The Regents of the University of California. All rights reserved.
  37. *
  38. * Redistribution and use in source and binary forms, with or without
  39. * modification, are permitted provided that the following conditions
  40. * are met:
  41. * 1. Redistributions of source code must retain the above copyright
  42. * notice, this list of conditions and the following disclaimer.
  43. * 2. Redistributions in binary form must reproduce the above copyright
  44. * notice, this list of conditions and the following disclaimer in the
  45. * documentation and/or other materials provided with the distribution.
  46. * 3. Neither the name of the University nor the names of its contributors
  47. * may be used to endorse or promote products derived from this software
  48. * without specific prior written permission.
  49. *
  50. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  51. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  52. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  53. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  54. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  55. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  56. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  57. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  58. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  59. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  60. * SUCH DAMAGE.
  61. */
  62. /*
  63. * $Log: errno.h,v $
  64. * Revision 1.4 2004/05/10 19:17:17 freckle
  65. * Only define constants if they are not already defined
  66. * This is a fix to get the *nix emulation to compile on mac os x, but the
  67. * file is propably obsolete anyway
  68. *
  69. * Revision 1.3 2004/04/14 18:30:58 freckle
  70. * This is Revision 1.1.1.1 of errno.h. Revision 1.2 was checked in accidently
  71. *
  72. * Revision 1.1.1.1 2003/05/09 14:41:11 haraldkipp
  73. * Initial using 3.2.1
  74. *
  75. * Revision 1.5 2003/02/04 18:00:42 harald
  76. * Version 3 released
  77. *
  78. * Revision 1.4 2002/06/26 17:29:18 harald
  79. * First pre-release with 2.4 stack
  80. *
  81. */
  82. /*!
  83. * \file net/errno.h
  84. * \brief Network error definitions.
  85. */
  86. #ifndef EINVAL
  87. #define EINVAL 22 /*!< Invalid argument */
  88. #define EWOULDBLOCK 10035 //!< Operation would block
  89. #define EINPROGRESS 10036 //!< Operation now in progress
  90. #define EALREADY 10037 //!< Operation already in progress
  91. #define ENOTSOCK 10038 //!< Socket operation on non-socket
  92. #define EDESTADDRREQ 10039 //!< Destination address required
  93. #define EMSGSIZE 10040 //!< Message too long
  94. #define EPROTOTYPE 10041 //!< Protocol wrong type for socket
  95. #define ENOPROTOOPT 10042 //!< Protocol not available
  96. #define EPROTONOSUPPORT 10043 //!< Protocol not supported
  97. #define ESOCKTNOSUPPORT 10044 //!< Socket type not supported
  98. #define EOPNOTSUPP 10045 //!< Operation not supported on socket
  99. #define EPFNOSUPPORT 10046 //!< Protocol family not supported
  100. #define EAFNOSUPPORT 10047 //!< Address family not supported by protocol family
  101. #define EADDRINUSE 10048 //!< Address already in use
  102. #define EADDRNOTAVAIL 10049 //!< Can't assign requested address
  103. #define ENETDOWN 10050 //!< Network is down
  104. #define ENETUNREACH 10051 //!< Network is unreachable
  105. #define ENETRESET 10052 //!< Network dropped connection on reset
  106. #define ECONNABORTED 10053 //!< Software caused connection abort
  107. #define ECONNRESET 10054 //!< Connection reset by peer
  108. #define ENOBUFS 10055 //!< No buffer space available
  109. #define EISCONN 10056 //!< Socket is already connected
  110. #define ENOTCONN 10057 //!< Socket is not connected
  111. #define ESHUTDOWN 10058 //!< Can't send after socket shutdown
  112. #define ETOOMANYREFS 10059 //!< Too many references: can't splice
  113. #define ETIMEDOUT 10060 //!< Connection timed out
  114. #define ECONNREFUSED 10061 //!< Connection refused
  115. #define ELOOP 10062 //!< Too many levels of symbolic links
  116. #define ENAMETOOLONG 10063 //!< File name too long
  117. #define EHOSTDOWN 10064 //!< Host is down
  118. #define EHOSTUNREACH 10065 //!< No route to host
  119. #define ENOTEMPTY 10066 //!< Directory not empty
  120. #endif
  121. #endif