Version of http://mbed.org/cookbook/NetServicesTribute with setting set the same for LPC2368

Dependents:   UDPSocketExample 24LCxx_I2CApp WeatherPlatform_pachube HvZServerLib ... more

Committer:
simon
Date:
Tue Nov 23 14:15:36 2010 +0000
Revision:
0:350011bf8be7
Experimental version for testing UDP

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 0:350011bf8be7 1 /*
simon 0:350011bf8be7 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
simon 0:350011bf8be7 3 * All rights reserved.
simon 0:350011bf8be7 4 *
simon 0:350011bf8be7 5 * Redistribution and use in source and binary forms, with or without modification,
simon 0:350011bf8be7 6 * are permitted provided that the following conditions are met:
simon 0:350011bf8be7 7 *
simon 0:350011bf8be7 8 * 1. Redistributions of source code must retain the above copyright notice,
simon 0:350011bf8be7 9 * this list of conditions and the following disclaimer.
simon 0:350011bf8be7 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
simon 0:350011bf8be7 11 * this list of conditions and the following disclaimer in the documentation
simon 0:350011bf8be7 12 * and/or other materials provided with the distribution.
simon 0:350011bf8be7 13 * 3. The name of the author may not be used to endorse or promote products
simon 0:350011bf8be7 14 * derived from this software without specific prior written permission.
simon 0:350011bf8be7 15 *
simon 0:350011bf8be7 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
simon 0:350011bf8be7 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
simon 0:350011bf8be7 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
simon 0:350011bf8be7 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
simon 0:350011bf8be7 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
simon 0:350011bf8be7 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
simon 0:350011bf8be7 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
simon 0:350011bf8be7 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
simon 0:350011bf8be7 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
simon 0:350011bf8be7 25 * OF SUCH DAMAGE.
simon 0:350011bf8be7 26 *
simon 0:350011bf8be7 27 * This file is part of the lwIP TCP/IP stack.
simon 0:350011bf8be7 28 *
simon 0:350011bf8be7 29 * Author: Adam Dunkels <adam@sics.se>
simon 0:350011bf8be7 30 *
simon 0:350011bf8be7 31 */
simon 0:350011bf8be7 32 #ifndef __LWIP_ERR_H__
simon 0:350011bf8be7 33 #define __LWIP_ERR_H__
simon 0:350011bf8be7 34
simon 0:350011bf8be7 35 #include "lwip/opt.h"
simon 0:350011bf8be7 36 #include "lwip/arch.h"
simon 0:350011bf8be7 37
simon 0:350011bf8be7 38 #ifdef __cplusplus
simon 0:350011bf8be7 39 extern "C" {
simon 0:350011bf8be7 40 #endif
simon 0:350011bf8be7 41
simon 0:350011bf8be7 42 /** Define LWIP_ERR_T in cc.h if you want to use
simon 0:350011bf8be7 43 * a different type for your platform (must be signed). */
simon 0:350011bf8be7 44 #ifdef LWIP_ERR_T
simon 0:350011bf8be7 45 typedef LWIP_ERR_T err_t;
simon 0:350011bf8be7 46 #else /* LWIP_ERR_T */
simon 0:350011bf8be7 47 typedef s8_t err_t;
simon 0:350011bf8be7 48 #endif /* LWIP_ERR_T*/
simon 0:350011bf8be7 49
simon 0:350011bf8be7 50 /* Definitions for error constants. */
simon 0:350011bf8be7 51
simon 0:350011bf8be7 52 #define ERR_OK 0 /* No error, everything OK. */
simon 0:350011bf8be7 53 #define ERR_MEM -1 /* Out of memory error. */
simon 0:350011bf8be7 54 #define ERR_BUF -2 /* Buffer error. */
simon 0:350011bf8be7 55 #define ERR_TIMEOUT -3 /* Timeout. */
simon 0:350011bf8be7 56 #define ERR_RTE -4 /* Routing problem. */
simon 0:350011bf8be7 57 #define ERR_INPROGRESS -5 /* Operation in progress */
simon 0:350011bf8be7 58 #define ERR_VAL -6 /* Illegal value. */
simon 0:350011bf8be7 59 #define ERR_WOULDBLOCK -7 /* Operation would block. */
simon 0:350011bf8be7 60
simon 0:350011bf8be7 61 #define ERR_IS_FATAL(e) ((e) < ERR_VAL)
simon 0:350011bf8be7 62
simon 0:350011bf8be7 63 #define ERR_ABRT -8 /* Connection aborted. */
simon 0:350011bf8be7 64 #define ERR_RST -9 /* Connection reset. */
simon 0:350011bf8be7 65 #define ERR_CLSD -10 /* Connection closed. */
simon 0:350011bf8be7 66 #define ERR_CONN -11 /* Not connected. */
simon 0:350011bf8be7 67
simon 0:350011bf8be7 68 #define ERR_ARG -12 /* Illegal argument. */
simon 0:350011bf8be7 69
simon 0:350011bf8be7 70 #define ERR_USE -13 /* Address in use. */
simon 0:350011bf8be7 71
simon 0:350011bf8be7 72 #define ERR_IF -14 /* Low-level netif error */
simon 0:350011bf8be7 73 #define ERR_ISCONN -15 /* Already connected. */
simon 0:350011bf8be7 74
simon 0:350011bf8be7 75
simon 0:350011bf8be7 76 #ifdef LWIP_DEBUG
simon 0:350011bf8be7 77 extern const char *lwip_strerr(err_t err);
simon 0:350011bf8be7 78 #else
simon 0:350011bf8be7 79 #define lwip_strerr(x) ""
simon 0:350011bf8be7 80 #endif /* LWIP_DEBUG */
simon 0:350011bf8be7 81
simon 0:350011bf8be7 82 #ifdef __cplusplus
simon 0:350011bf8be7 83 }
simon 0:350011bf8be7 84 #endif
simon 0:350011bf8be7 85
simon 0:350011bf8be7 86 #endif /* __LWIP_ERR_H__ */