Rev 4726 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4726 | Rev 4730 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Copyright (c) 2009 Lukas Mejdrech |
2 | * Copyright (c) 2009 Lukas Mejdrech |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
8 | * |
8 | * |
9 | * - Redistributions of source code must retain the above copyright |
9 | * - Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. |
10 | * notice, this list of conditions and the following disclaimer. |
11 | * - Redistributions in binary form must reproduce the above copyright |
11 | * - Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the |
12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. |
13 | * documentation and/or other materials provided with the distribution. |
14 | * - The name of the author may not be used to endorse or promote products |
14 | * - The name of the author may not be used to endorse or promote products |
15 | * derived from this software without specific prior written permission. |
15 | * derived from this software without specific prior written permission. |
16 | * |
16 | * |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /** @addtogroup net |
29 | /** @addtogroup net |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | 32 | ||
33 | /** @file |
33 | /** @file |
34 | * Socket error codes. |
34 | * Socket error codes. |
35 | * Based on BSD. |
35 | * Based on BSD. |
36 | */ |
36 | */ |
37 | 37 | ||
38 | #ifndef __NET_SOCKET_ERR_H__ |
38 | #ifndef __NET_SOCKET_ERR_H__ |
39 | #define __NET_SOCKET_ERR_H__ |
39 | #define __NET_SOCKET_ERR_H__ |
40 | 40 | ||
41 | #include <errno.h> |
41 | #include <errno.h> |
42 | 42 | ||
43 | /** @name Socket error codes definitions |
43 | /** @name Socket error codes definitions |
44 | */ |
44 | */ |
45 | /*@{*/ |
45 | /*@{*/ |
46 | 46 | ||
47 | ////#define EINTR (-10004) |
47 | ////#define EINTR (-10004) |
48 | ////#define EBADF (-10009) |
48 | ////#define EBADF (-10009) |
49 | //#define EACCES (-10013) |
49 | //#define EACCES (-10013) |
50 | //#define EFAULT (-10014) |
50 | //#define EFAULT (-10014) |
51 | ////#define EINVAL (-10022) |
51 | ////#define EINVAL (-10022) |
52 | ////#define EMFILE (-10024) |
52 | ////#define EMFILE (-10024) |
53 | //#define EWOULDBLOCK (-10035) |
53 | //#define EWOULDBLOCK (-10035) |
54 | /** An API function is called while another blocking function is in progress. |
54 | /** An API function is called while another blocking function is in progress. |
55 | */ |
55 | */ |
56 | #define EINPROGRESS (-10036) |
56 | #define EINPROGRESS (-10036) |
57 | //#define EALREADY (-10037) |
57 | //#define EALREADY (-10037) |
58 | 58 | ||
59 | /** The socket identifier is not valid. |
59 | /** The socket identifier is not valid. |
60 | */ |
60 | */ |
61 | #define ENOTSOCK (-10038) |
61 | #define ENOTSOCK (-10038) |
62 | //#define EDESTADDRREQ (-10039) |
62 | //#define EDESTADDRREQ (-10039) |
63 | //#define EMSGSIZE (-10040) |
63 | //#define EMSGSIZE (-10040) |
64 | //#define EPROTOTYPE (-10041) |
64 | //#define EPROTOTYPE (-10041) |
65 | //#define ENOPROTOOPT (-10042) |
65 | //#define ENOPROTOOPT (-10042) |
66 | 66 | ||
67 | /** Protocol is not supported. |
67 | /** Protocol is not supported. |
68 | */ |
68 | */ |
69 | #define EPROTONOSUPPORT (-10043) |
69 | #define EPROTONOSUPPORT (-10043) |
70 | 70 | ||
71 | /** Socket type is not supported. |
71 | /** Socket type is not supported. |
72 | */ |
72 | */ |
73 | #define ESOCKTNOSUPPORT (-10044) |
73 | #define ESOCKTNOSUPPORT (-10044) |
74 | //#define EOPNOTSUPP (-10045) |
74 | //#define EOPNOTSUPP (-10045) |
75 | 75 | ||
76 | /** Protocol family is not supported. |
76 | /** Protocol family is not supported. |
77 | */ |
77 | */ |
78 | #define EPFNOSUPPORT (-10046) |
78 | #define EPFNOSUPPORT (-10046) |
79 | 79 | ||
80 | /** Address family is not supported. |
80 | /** Address family is not supported. |
81 | */ |
81 | */ |
82 | #define EAFNOSUPPORT (-10047) |
82 | #define EAFNOSUPPORT (-10047) |
83 | 83 | ||
84 | /** Address is already in use. |
84 | /** Address is already in use. |
85 | */ |
85 | */ |
86 | #define EADDRINUSE (-10048) |
86 | #define EADDRINUSE (-10048) |
87 | //#define EADDRNOTAVAIL (-10049) |
87 | //#define EADDRNOTAVAIL (-10049) |
88 | /* May be reported at any time if the implementation detects an underlying failure. |
88 | /* May be reported at any time if the implementation detects an underlying failure. |
89 | */ |
89 | */ |
90 | //#define ENETDOWN (-10050) |
90 | //#define ENETDOWN (-10050) |
91 | //#define ENETUNREACH (-10051) |
91 | //#define ENETUNREACH (-10051) |
92 | //#define ENETRESET (-10052) |
92 | //#define ENETRESET (-10052) |
93 | //#define ECONNABORTED (-10053) |
93 | //#define ECONNABORTED (-10053) |
94 | //#define ECONNRESET (-10054) |
94 | //#define ECONNRESET (-10054) |
95 | //#define ENOBUFS (-10055) |
95 | //#define ENOBUFS (-10055) |
96 | //#define EISCONN (-10056) |
96 | //#define EISCONN (-10056) |
97 | 97 | ||
98 | /** The socket is not connected or bound. |
98 | /** The socket is not connected or bound. |
99 | */ |
99 | */ |
100 | #define ENOTCONN (-10057) |
100 | #define ENOTCONN (-10057) |
101 | //#define ESHUTDOWN (-10058) |
101 | //#define ESHUTDOWN (-10058) |
102 | //#define ETOOMANYREFS (-10059) |
102 | //#define ETOOMANYREFS (-10059) |
103 | //#define ETIMEDOUT (-10060) |
103 | //#define ETIMEDOUT (-10060) |
104 | //#define ECONNREFUSED (-10061) |
104 | //#define ECONNREFUSED (-10061) |
105 | //#define ELOOP (-10062) |
105 | //#define ELOOP (-10062) |
106 | ////#define ENAMETOOLONG (-10063) |
106 | ////#define ENAMETOOLONG (-10063) |
107 | //#define EHOSTDOWN (-10064) |
107 | //#define EHOSTDOWN (-10064) |
108 | //#define EHOSTUNREACH (-10065) |
108 | //#define EHOSTUNREACH (-10065) |
109 | //#define HOST_NOT_FOUND (-11001) |
109 | //#define HOST_NOT_FOUND (-11001) |
110 | //#define TRY_AGAIN (-11002) |
110 | //#define TRY_AGAIN (-11002) |
111 | //#define NO_RECOVERY (-11003) |
111 | //#define NO_RECOVERY (-11003) |
- | 112 | ||
112 | /** No data. |
113 | /** No data. |
113 | */ |
114 | */ |
114 | #define NO_DATA (-11004) |
115 | #define NO_DATA (-11004) |
115 | 116 | ||
116 | /*@}*/ |
117 | /*@}*/ |
117 | 118 | ||
118 | #endif |
119 | #endif |
119 | 120 | ||
120 | /** @} |
121 | /** @} |
121 | */ |
122 | */ |
122 | 123 |