Rod Coleman / lwip-mbed-2010

Dependents:   LwIP_raw_API_serverExample tiny-dtls

Committer:
RodColeman
Date:
Tue Sep 18 14:41:24 2012 +0000
Revision:
0:0791c1fece8e
[mbed] converted /Eth_TCP_Wei_Server/lwip

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RodColeman 0:0791c1fece8e 1 /*
RodColeman 0:0791c1fece8e 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
RodColeman 0:0791c1fece8e 3 * All rights reserved.
RodColeman 0:0791c1fece8e 4 *
RodColeman 0:0791c1fece8e 5 * Redistribution and use in source and binary forms, with or without modification,
RodColeman 0:0791c1fece8e 6 * are permitted provided that the following conditions are met:
RodColeman 0:0791c1fece8e 7 *
RodColeman 0:0791c1fece8e 8 * 1. Redistributions of source code must retain the above copyright notice,
RodColeman 0:0791c1fece8e 9 * this list of conditions and the following disclaimer.
RodColeman 0:0791c1fece8e 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
RodColeman 0:0791c1fece8e 11 * this list of conditions and the following disclaimer in the documentation
RodColeman 0:0791c1fece8e 12 * and/or other materials provided with the distribution.
RodColeman 0:0791c1fece8e 13 * 3. The name of the author may not be used to endorse or promote products
RodColeman 0:0791c1fece8e 14 * derived from this software without specific prior written permission.
RodColeman 0:0791c1fece8e 15 *
RodColeman 0:0791c1fece8e 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
RodColeman 0:0791c1fece8e 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
RodColeman 0:0791c1fece8e 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
RodColeman 0:0791c1fece8e 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
RodColeman 0:0791c1fece8e 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
RodColeman 0:0791c1fece8e 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
RodColeman 0:0791c1fece8e 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
RodColeman 0:0791c1fece8e 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
RodColeman 0:0791c1fece8e 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
RodColeman 0:0791c1fece8e 25 * OF SUCH DAMAGE.
RodColeman 0:0791c1fece8e 26 *
RodColeman 0:0791c1fece8e 27 * This file is part of the lwIP TCP/IP stack.
RodColeman 0:0791c1fece8e 28 *
RodColeman 0:0791c1fece8e 29 * Author: Adam Dunkels <adam@sics.se>
RodColeman 0:0791c1fece8e 30 *
RodColeman 0:0791c1fece8e 31 */
RodColeman 0:0791c1fece8e 32 #ifndef __LWIP_ARCH_H__
RodColeman 0:0791c1fece8e 33 #define __LWIP_ARCH_H__
RodColeman 0:0791c1fece8e 34
RodColeman 0:0791c1fece8e 35 #ifndef LITTLE_ENDIAN
RodColeman 0:0791c1fece8e 36 #define LITTLE_ENDIAN 1234
RodColeman 0:0791c1fece8e 37 #endif
RodColeman 0:0791c1fece8e 38
RodColeman 0:0791c1fece8e 39 #ifndef BIG_ENDIAN
RodColeman 0:0791c1fece8e 40 #define BIG_ENDIAN 4321
RodColeman 0:0791c1fece8e 41 #endif
RodColeman 0:0791c1fece8e 42
RodColeman 0:0791c1fece8e 43 #include "arch/cc.h"
RodColeman 0:0791c1fece8e 44
RodColeman 0:0791c1fece8e 45 /** Temporary: define format string for size_t if not defined in cc.h */
RodColeman 0:0791c1fece8e 46 #ifndef SZT_F
RodColeman 0:0791c1fece8e 47 #define SZT_F U32_F
RodColeman 0:0791c1fece8e 48 #endif /* SZT_F */
RodColeman 0:0791c1fece8e 49
RodColeman 0:0791c1fece8e 50 #ifdef __cplusplus
RodColeman 0:0791c1fece8e 51 extern "C" {
RodColeman 0:0791c1fece8e 52 #endif
RodColeman 0:0791c1fece8e 53
RodColeman 0:0791c1fece8e 54 #ifndef PACK_STRUCT_BEGIN
RodColeman 0:0791c1fece8e 55 #define PACK_STRUCT_BEGIN
RodColeman 0:0791c1fece8e 56 #endif /* PACK_STRUCT_BEGIN */
RodColeman 0:0791c1fece8e 57
RodColeman 0:0791c1fece8e 58 #ifndef PACK_STRUCT_END
RodColeman 0:0791c1fece8e 59 #define PACK_STRUCT_END
RodColeman 0:0791c1fece8e 60 #endif /* PACK_STRUCT_END */
RodColeman 0:0791c1fece8e 61
RodColeman 0:0791c1fece8e 62 #ifndef PACK_STRUCT_FIELD
RodColeman 0:0791c1fece8e 63 #define PACK_STRUCT_FIELD(x) x
RodColeman 0:0791c1fece8e 64 #endif /* PACK_STRUCT_FIELD */
RodColeman 0:0791c1fece8e 65
RodColeman 0:0791c1fece8e 66
RodColeman 0:0791c1fece8e 67 #ifndef LWIP_UNUSED_ARG
RodColeman 0:0791c1fece8e 68 #define LWIP_UNUSED_ARG(x) (void)x
RodColeman 0:0791c1fece8e 69 #endif /* LWIP_UNUSED_ARG */
RodColeman 0:0791c1fece8e 70
RodColeman 0:0791c1fece8e 71
RodColeman 0:0791c1fece8e 72 #ifdef LWIP_PROVIDE_ERRNO
RodColeman 0:0791c1fece8e 73
RodColeman 0:0791c1fece8e 74 #define EPERM 1 /* Operation not permitted */
RodColeman 0:0791c1fece8e 75 #define ENOENT 2 /* No such file or directory */
RodColeman 0:0791c1fece8e 76 #define ESRCH 3 /* No such process */
RodColeman 0:0791c1fece8e 77 #define EINTR 4 /* Interrupted system call */
RodColeman 0:0791c1fece8e 78 #define EIO 5 /* I/O error */
RodColeman 0:0791c1fece8e 79 #define ENXIO 6 /* No such device or address */
RodColeman 0:0791c1fece8e 80 #define E2BIG 7 /* Arg list too long */
RodColeman 0:0791c1fece8e 81 #define ENOEXEC 8 /* Exec format error */
RodColeman 0:0791c1fece8e 82 #define EBADF 9 /* Bad file number */
RodColeman 0:0791c1fece8e 83 #define ECHILD 10 /* No child processes */
RodColeman 0:0791c1fece8e 84 #define EAGAIN 11 /* Try again */
RodColeman 0:0791c1fece8e 85 #define ENOMEM 12 /* Out of memory */
RodColeman 0:0791c1fece8e 86 #define EACCES 13 /* Permission denied */
RodColeman 0:0791c1fece8e 87 #define EFAULT 14 /* Bad address */
RodColeman 0:0791c1fece8e 88 #define ENOTBLK 15 /* Block device required */
RodColeman 0:0791c1fece8e 89 #define EBUSY 16 /* Device or resource busy */
RodColeman 0:0791c1fece8e 90 #define EEXIST 17 /* File exists */
RodColeman 0:0791c1fece8e 91 #define EXDEV 18 /* Cross-device link */
RodColeman 0:0791c1fece8e 92 #define ENODEV 19 /* No such device */
RodColeman 0:0791c1fece8e 93 #define ENOTDIR 20 /* Not a directory */
RodColeman 0:0791c1fece8e 94 #define EISDIR 21 /* Is a directory */
RodColeman 0:0791c1fece8e 95 #define EINVAL 22 /* Invalid argument */
RodColeman 0:0791c1fece8e 96 #define ENFILE 23 /* File table overflow */
RodColeman 0:0791c1fece8e 97 #define EMFILE 24 /* Too many open files */
RodColeman 0:0791c1fece8e 98 #define ENOTTY 25 /* Not a typewriter */
RodColeman 0:0791c1fece8e 99 #define ETXTBSY 26 /* Text file busy */
RodColeman 0:0791c1fece8e 100 #define EFBIG 27 /* File too large */
RodColeman 0:0791c1fece8e 101 #define ENOSPC 28 /* No space left on device */
RodColeman 0:0791c1fece8e 102 #define ESPIPE 29 /* Illegal seek */
RodColeman 0:0791c1fece8e 103 #define EROFS 30 /* Read-only file system */
RodColeman 0:0791c1fece8e 104 #define EMLINK 31 /* Too many links */
RodColeman 0:0791c1fece8e 105 #define EPIPE 32 /* Broken pipe */
RodColeman 0:0791c1fece8e 106 #define EDOM 33 /* Math argument out of domain of func */
RodColeman 0:0791c1fece8e 107 #define ERANGE 34 /* Math result not representable */
RodColeman 0:0791c1fece8e 108 #define EDEADLK 35 /* Resource deadlock would occur */
RodColeman 0:0791c1fece8e 109 #define ENAMETOOLONG 36 /* File name too long */
RodColeman 0:0791c1fece8e 110 #define ENOLCK 37 /* No record locks available */
RodColeman 0:0791c1fece8e 111 #define ENOSYS 38 /* Function not implemented */
RodColeman 0:0791c1fece8e 112 #define ENOTEMPTY 39 /* Directory not empty */
RodColeman 0:0791c1fece8e 113 #define ELOOP 40 /* Too many symbolic links encountered */
RodColeman 0:0791c1fece8e 114 #define EWOULDBLOCK EAGAIN /* Operation would block */
RodColeman 0:0791c1fece8e 115 #define ENOMSG 42 /* No message of desired type */
RodColeman 0:0791c1fece8e 116 #define EIDRM 43 /* Identifier removed */
RodColeman 0:0791c1fece8e 117 #define ECHRNG 44 /* Channel number out of range */
RodColeman 0:0791c1fece8e 118 #define EL2NSYNC 45 /* Level 2 not synchronized */
RodColeman 0:0791c1fece8e 119 #define EL3HLT 46 /* Level 3 halted */
RodColeman 0:0791c1fece8e 120 #define EL3RST 47 /* Level 3 reset */
RodColeman 0:0791c1fece8e 121 #define ELNRNG 48 /* Link number out of range */
RodColeman 0:0791c1fece8e 122 #define EUNATCH 49 /* Protocol driver not attached */
RodColeman 0:0791c1fece8e 123 #define ENOCSI 50 /* No CSI structure available */
RodColeman 0:0791c1fece8e 124 #define EL2HLT 51 /* Level 2 halted */
RodColeman 0:0791c1fece8e 125 #define EBADE 52 /* Invalid exchange */
RodColeman 0:0791c1fece8e 126 #define EBADR 53 /* Invalid request descriptor */
RodColeman 0:0791c1fece8e 127 #define EXFULL 54 /* Exchange full */
RodColeman 0:0791c1fece8e 128 #define ENOANO 55 /* No anode */
RodColeman 0:0791c1fece8e 129 #define EBADRQC 56 /* Invalid request code */
RodColeman 0:0791c1fece8e 130 #define EBADSLT 57 /* Invalid slot */
RodColeman 0:0791c1fece8e 131
RodColeman 0:0791c1fece8e 132 #define EDEADLOCK EDEADLK
RodColeman 0:0791c1fece8e 133
RodColeman 0:0791c1fece8e 134 #define EBFONT 59 /* Bad font file format */
RodColeman 0:0791c1fece8e 135 #define ENOSTR 60 /* Device not a stream */
RodColeman 0:0791c1fece8e 136 #define ENODATA 61 /* No data available */
RodColeman 0:0791c1fece8e 137 #define ETIME 62 /* Timer expired */
RodColeman 0:0791c1fece8e 138 #define ENOSR 63 /* Out of streams resources */
RodColeman 0:0791c1fece8e 139 #define ENONET 64 /* Machine is not on the network */
RodColeman 0:0791c1fece8e 140 #define ENOPKG 65 /* Package not installed */
RodColeman 0:0791c1fece8e 141 #define EREMOTE 66 /* Object is remote */
RodColeman 0:0791c1fece8e 142 #define ENOLINK 67 /* Link has been severed */
RodColeman 0:0791c1fece8e 143 #define EADV 68 /* Advertise error */
RodColeman 0:0791c1fece8e 144 #define ESRMNT 69 /* Srmount error */
RodColeman 0:0791c1fece8e 145 #define ECOMM 70 /* Communication error on send */
RodColeman 0:0791c1fece8e 146 #define EPROTO 71 /* Protocol error */
RodColeman 0:0791c1fece8e 147 #define EMULTIHOP 72 /* Multihop attempted */
RodColeman 0:0791c1fece8e 148 #define EDOTDOT 73 /* RFS specific error */
RodColeman 0:0791c1fece8e 149 #define EBADMSG 74 /* Not a data message */
RodColeman 0:0791c1fece8e 150 #define EOVERFLOW 75 /* Value too large for defined data type */
RodColeman 0:0791c1fece8e 151 #define ENOTUNIQ 76 /* Name not unique on network */
RodColeman 0:0791c1fece8e 152 #define EBADFD 77 /* File descriptor in bad state */
RodColeman 0:0791c1fece8e 153 #define EREMCHG 78 /* Remote address changed */
RodColeman 0:0791c1fece8e 154 #define ELIBACC 79 /* Can not access a needed shared library */
RodColeman 0:0791c1fece8e 155 #define ELIBBAD 80 /* Accessing a corrupted shared library */
RodColeman 0:0791c1fece8e 156 #define ELIBSCN 81 /* .lib section in a.out corrupted */
RodColeman 0:0791c1fece8e 157 #define ELIBMAX 82 /* Attempting to link in too many shared libraries */
RodColeman 0:0791c1fece8e 158 #define ELIBEXEC 83 /* Cannot exec a shared library directly */
RodColeman 0:0791c1fece8e 159 #define EILSEQ 84 /* Illegal byte sequence */
RodColeman 0:0791c1fece8e 160 #define ERESTART 85 /* Interrupted system call should be restarted */
RodColeman 0:0791c1fece8e 161 #define ESTRPIPE 86 /* Streams pipe error */
RodColeman 0:0791c1fece8e 162 #define EUSERS 87 /* Too many users */
RodColeman 0:0791c1fece8e 163 #define ENOTSOCK 88 /* Socket operation on non-socket */
RodColeman 0:0791c1fece8e 164 #define EDESTADDRREQ 89 /* Destination address required */
RodColeman 0:0791c1fece8e 165 #define EMSGSIZE 90 /* Message too long */
RodColeman 0:0791c1fece8e 166 #define EPROTOTYPE 91 /* Protocol wrong type for socket */
RodColeman 0:0791c1fece8e 167 #define ENOPROTOOPT 92 /* Protocol not available */
RodColeman 0:0791c1fece8e 168 #define EPROTONOSUPPORT 93 /* Protocol not supported */
RodColeman 0:0791c1fece8e 169 #define ESOCKTNOSUPPORT 94 /* Socket type not supported */
RodColeman 0:0791c1fece8e 170 #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
RodColeman 0:0791c1fece8e 171 #define EPFNOSUPPORT 96 /* Protocol family not supported */
RodColeman 0:0791c1fece8e 172 #define EAFNOSUPPORT 97 /* Address family not supported by protocol */
RodColeman 0:0791c1fece8e 173 #define EADDRINUSE 98 /* Address already in use */
RodColeman 0:0791c1fece8e 174 #define EADDRNOTAVAIL 99 /* Cannot assign requested address */
RodColeman 0:0791c1fece8e 175 #define ENETDOWN 100 /* Network is down */
RodColeman 0:0791c1fece8e 176 #define ENETUNREACH 101 /* Network is unreachable */
RodColeman 0:0791c1fece8e 177 #define ENETRESET 102 /* Network dropped connection because of reset */
RodColeman 0:0791c1fece8e 178 #define ECONNABORTED 103 /* Software caused connection abort */
RodColeman 0:0791c1fece8e 179 #define ECONNRESET 104 /* Connection reset by peer */
RodColeman 0:0791c1fece8e 180 #define ENOBUFS 105 /* No buffer space available */
RodColeman 0:0791c1fece8e 181 #define EISCONN 106 /* Transport endpoint is already connected */
RodColeman 0:0791c1fece8e 182 #define ENOTCONN 107 /* Transport endpoint is not connected */
RodColeman 0:0791c1fece8e 183 #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
RodColeman 0:0791c1fece8e 184 #define ETOOMANYREFS 109 /* Too many references: cannot splice */
RodColeman 0:0791c1fece8e 185 #define ETIMEDOUT 110 /* Connection timed out */
RodColeman 0:0791c1fece8e 186 #define ECONNREFUSED 111 /* Connection refused */
RodColeman 0:0791c1fece8e 187 #define EHOSTDOWN 112 /* Host is down */
RodColeman 0:0791c1fece8e 188 #define EHOSTUNREACH 113 /* No route to host */
RodColeman 0:0791c1fece8e 189 #define EALREADY 114 /* Operation already in progress */
RodColeman 0:0791c1fece8e 190 #define EINPROGRESS 115 /* Operation now in progress */
RodColeman 0:0791c1fece8e 191 #define ESTALE 116 /* Stale NFS file handle */
RodColeman 0:0791c1fece8e 192 #define EUCLEAN 117 /* Structure needs cleaning */
RodColeman 0:0791c1fece8e 193 #define ENOTNAM 118 /* Not a XENIX named type file */
RodColeman 0:0791c1fece8e 194 #define ENAVAIL 119 /* No XENIX semaphores available */
RodColeman 0:0791c1fece8e 195 #define EISNAM 120 /* Is a named type file */
RodColeman 0:0791c1fece8e 196 #define EREMOTEIO 121 /* Remote I/O error */
RodColeman 0:0791c1fece8e 197 #define EDQUOT 122 /* Quota exceeded */
RodColeman 0:0791c1fece8e 198
RodColeman 0:0791c1fece8e 199 #define ENOMEDIUM 123 /* No medium found */
RodColeman 0:0791c1fece8e 200 #define EMEDIUMTYPE 124 /* Wrong medium type */
RodColeman 0:0791c1fece8e 201
RodColeman 0:0791c1fece8e 202
RodColeman 0:0791c1fece8e 203 #define ENSROK 0 /* DNS server returned answer with no data */
RodColeman 0:0791c1fece8e 204 #define ENSRNODATA 160 /* DNS server returned answer with no data */
RodColeman 0:0791c1fece8e 205 #define ENSRFORMERR 161 /* DNS server claims query was misformatted */
RodColeman 0:0791c1fece8e 206 #define ENSRSERVFAIL 162 /* DNS server returned general failure */
RodColeman 0:0791c1fece8e 207 #define ENSRNOTFOUND 163 /* Domain name not found */
RodColeman 0:0791c1fece8e 208 #define ENSRNOTIMP 164 /* DNS server does not implement requested operation */
RodColeman 0:0791c1fece8e 209 #define ENSRREFUSED 165 /* DNS server refused query */
RodColeman 0:0791c1fece8e 210 #define ENSRBADQUERY 166 /* Misformatted DNS query */
RodColeman 0:0791c1fece8e 211 #define ENSRBADNAME 167 /* Misformatted domain name */
RodColeman 0:0791c1fece8e 212 #define ENSRBADFAMILY 168 /* Unsupported address family */
RodColeman 0:0791c1fece8e 213 #define ENSRBADRESP 169 /* Misformatted DNS reply */
RodColeman 0:0791c1fece8e 214 #define ENSRCONNREFUSED 170 /* Could not contact DNS servers */
RodColeman 0:0791c1fece8e 215 #define ENSRTIMEOUT 171 /* Timeout while contacting DNS servers */
RodColeman 0:0791c1fece8e 216 #define ENSROF 172 /* End of file */
RodColeman 0:0791c1fece8e 217 #define ENSRFILE 173 /* Error reading file */
RodColeman 0:0791c1fece8e 218 #define ENSRNOMEM 174 /* Out of memory */
RodColeman 0:0791c1fece8e 219 #define ENSRDESTRUCTION 175 /* Application terminated lookup */
RodColeman 0:0791c1fece8e 220 #define ENSRQUERYDOMAINTOOLONG 176 /* Domain name is too long */
RodColeman 0:0791c1fece8e 221 #define ENSRCNAMELOOP 177 /* Domain name is too long */
RodColeman 0:0791c1fece8e 222
RodColeman 0:0791c1fece8e 223 #ifndef errno
RodColeman 0:0791c1fece8e 224 extern int errno;
RodColeman 0:0791c1fece8e 225 #endif
RodColeman 0:0791c1fece8e 226
RodColeman 0:0791c1fece8e 227 #endif /* LWIP_PROVIDE_ERRNO */
RodColeman 0:0791c1fece8e 228
RodColeman 0:0791c1fece8e 229 #ifdef __cplusplus
RodColeman 0:0791c1fece8e 230 }
RodColeman 0:0791c1fece8e 231 #endif
RodColeman 0:0791c1fece8e 232
RodColeman 0:0791c1fece8e 233 #endif /* __LWIP_ARCH_H__ */