#define SOCK_STREAM 1
#define SOCK_DGRAM 2
#define SOCK_RAW 3
-
+
+#if 0 /* already defined in lwip/arch.h */
+/* added by Lei */
+#define ENOOK 0 /* No error, everything OK. */
+#define ENOMEM -1 /* Out of memory error. */
+#define ENOBUFS -2 /* Buffer error. */
+#define EHOSTUNREACH -3 /* Routing problem. */
+#define ECONNABORTED -4 /* Connection aborted. */
+#define ECONNRESET -5 /* Connection reset. */
+#define ESHUTDOWN -6 /* Connection closed. */
+#define ENOTCONN -7 /* Not connected. */
+#define EINVAL -8 /* Illegal value. */
+#define EIO -9 /* Illegal argument. */
+#define EADDRINUSE -10 /* Address in use. */
+#define ETIMEDOUT -13 /* Timeout */
+#define EINPROGRESS -14 /* Operation in progress */
+#endif
+
/*
* Option flags per-socket. These must match the SOF_ flags in ip.h!
*/
struct sockaddr *to, socklen_t tolen);
int lwip_socket(int domain, int type, int protocol);
int lwip_write(int s, const void *dataptr, int size);
-int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset,
- struct timeval *timeout);
+int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, struct timeval *timeout);
int lwip_ioctl(int s, long cmd, void *argp);
#if LWIP_COMPAT_SOCKETS