12Oct2012MbedLab

Dependents:   Lab3_VoiceMeter

Fork of EthernetNetIf by Donatien Garnier

Committer:
psawant9
Date:
Fri Oct 12 16:02:00 2012 +0000
Revision:
6:22ce63eddd2b
Parent:
5:bc7df6da7589
Done

Who changed what in which revision?

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