Subversion Repositories HelenOS

Rev

Rev 4730 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4578 mejdrech 1
/*
2
 * Copyright (c) 2009 Lukas Mejdrech
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 *
9
 * - Redistributions of source code must retain the above copyright
10
 *   notice, this list of conditions and the following disclaimer.
11
 * - Redistributions in binary form must reproduce the above copyright
12
 *   notice, this list of conditions and the following disclaimer in the
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
15
 *   derived from this software without specific prior written permission.
16
 *
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
19
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
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
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
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
28
 
29
/** @addtogroup net
30
 *  @{
31
 */
32
 
33
/** @file
34
 *  Socket error codes.
35
 *  Based on BSD.
36
 */
37
 
38
#ifndef __NET_SOCKET_ERR_H__
39
#define __NET_SOCKET_ERR_H__
40
 
41
#include <errno.h>
42
 
4704 mejdrech 43
/** @name Socket error codes definitions
44
 */
45
/*@{*/
46
 
4578 mejdrech 47
////#define EINTR           (-10004)
48
////#define EBADF           (-10009)
49
//#define EACCES            (-10013)
50
//#define EFAULT            (-10014)
51
////#define EINVAL          (-10022)
52
////#define EMFILE          (-10024)
53
//#define EWOULDBLOCK       (-10035)
4736 mejdrech 54
 
4726 mejdrech 55
/** An API function is called while another blocking function is in progress.
4578 mejdrech 56
 */
4726 mejdrech 57
#define EINPROGRESS     (-10036)
4736 mejdrech 58
 
4578 mejdrech 59
//#define EALREADY      (-10037)
4704 mejdrech 60
 
61
/** The socket identifier is not valid.
62
 */
4578 mejdrech 63
#define ENOTSOCK        (-10038)
4736 mejdrech 64
 
65
/** The destination address required.
66
 */
67
#define EDESTADDRREQ    (-10039)
68
 
4578 mejdrech 69
//#define EMSGSIZE      (-10040)
70
//#define EPROTOTYPE        (-10041)
71
//#define ENOPROTOOPT       (-10042)
4704 mejdrech 72
 
73
/** Protocol is not supported.
74
 */
4578 mejdrech 75
#define EPROTONOSUPPORT (-10043)
4704 mejdrech 76
 
77
/** Socket type is not supported.
78
 */
4578 mejdrech 79
#define ESOCKTNOSUPPORT (-10044)
4736 mejdrech 80
 
4578 mejdrech 81
//#define EOPNOTSUPP        (-10045)
4704 mejdrech 82
 
83
/** Protocol family is not supported.
84
 */
4578 mejdrech 85
#define EPFNOSUPPORT    (-10046)
4704 mejdrech 86
 
87
/** Address family is not supported.
88
 */
4578 mejdrech 89
#define EAFNOSUPPORT    (-10047)
4704 mejdrech 90
 
91
/** Address is already in use.
92
 */
4578 mejdrech 93
#define EADDRINUSE      (-10048)
4736 mejdrech 94
 
4578 mejdrech 95
//#define EADDRNOTAVAIL (-10049)
4704 mejdrech 96
/* May be reported at any time if the implementation detects an underlying failure.
4578 mejdrech 97
 */
98
//#define ENETDOWN      (-10050)
99
//#define ENETUNREACH       (-10051)
100
//#define ENETRESET     (-10052)
101
//#define ECONNABORTED  (-10053)
102
//#define ECONNRESET        (-10054)
103
//#define ENOBUFS           (-10055)
104
//#define EISCONN           (-10056)
4704 mejdrech 105
 
106
/** The socket is not connected or bound.
107
 */
4700 mejdrech 108
#define ENOTCONN        (-10057)
4736 mejdrech 109
 
4578 mejdrech 110
//#define ESHUTDOWN     (-10058)
111
//#define ETOOMANYREFS  (-10059)
112
//#define ETIMEDOUT     (-10060)
113
//#define ECONNREFUSED  (-10061)
114
//#define ELOOP         (-10062)
115
////#define ENAMETOOLONG    (-10063)
116
//#define EHOSTDOWN     (-10064)
117
//#define EHOSTUNREACH  (-10065)
118
//#define HOST_NOT_FOUND    (-11001)
119
//#define TRY_AGAIN     (-11002)
120
//#define NO_RECOVERY       (-11003)
4730 mejdrech 121
 
4704 mejdrech 122
/** No data.
123
 */
4578 mejdrech 124
#define NO_DATA         (-11004)
125
 
4704 mejdrech 126
/*@}*/
127
 
4578 mejdrech 128
#endif
129
 
130
/** @}
131
 */