Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
err.h
00001 /** 00002 * @file 00003 * lwIP Error codes 00004 */ 00005 /* 00006 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 00007 * All rights reserved. 00008 * 00009 * Redistribution and use in source and binary forms, with or without modification, 00010 * are permitted provided that the following conditions are met: 00011 * 00012 * 1. Redistributions of source code must retain the above copyright notice, 00013 * this list of conditions and the following disclaimer. 00014 * 2. Redistributions in binary form must reproduce the above copyright notice, 00015 * this list of conditions and the following disclaimer in the documentation 00016 * and/or other materials provided with the distribution. 00017 * 3. The name of the author may not be used to endorse or promote products 00018 * derived from this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00021 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00022 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00023 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00024 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00025 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00026 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00027 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00028 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00029 * OF SUCH DAMAGE. 00030 * 00031 * This file is part of the lwIP TCP/IP stack. 00032 * 00033 * Author: Adam Dunkels <adam@sics.se> 00034 * 00035 */ 00036 #ifndef LWIP_HDR_ERR_H 00037 #define LWIP_HDR_ERR_H 00038 00039 #include "lwip/opt.h" 00040 #include "lwip/arch.h" 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 /** 00047 * @defgroup infrastructure_errors Error codes 00048 * @ingroup infrastructure 00049 * @{ 00050 */ 00051 00052 /** Definitions for error constants. */ 00053 typedef enum { 00054 /** No error, everything OK. */ 00055 ERR_OK = 0, 00056 /** Out of memory error. */ 00057 ERR_MEM = -1, 00058 /** Buffer error. */ 00059 ERR_BUF = -2, 00060 /** Timeout. */ 00061 ERR_TIMEOUT = -3, 00062 /** Routing problem. */ 00063 ERR_RTE = -4, 00064 /** Operation in progress */ 00065 ERR_INPROGRESS = -5, 00066 /** Illegal value. */ 00067 ERR_VAL = -6, 00068 /** Operation would block. */ 00069 ERR_WOULDBLOCK = -7, 00070 /** Address in use. */ 00071 ERR_USE = -8, 00072 /** Already connecting. */ 00073 ERR_ALREADY = -9, 00074 /** Conn already established.*/ 00075 ERR_ISCONN = -10, 00076 /** Not connected. */ 00077 ERR_CONN = -11, 00078 /** Low-level netif error */ 00079 ERR_IF = -12, 00080 00081 /** Connection aborted. */ 00082 ERR_ABRT = -13, 00083 /** Connection reset. */ 00084 ERR_RST = -14, 00085 /** Connection closed. */ 00086 ERR_CLSD = -15, 00087 /** Illegal argument. */ 00088 ERR_ARG = -16 00089 } err_enum_t; 00090 00091 /** Define LWIP_ERR_T in cc.h if you want to use 00092 * a different type for your platform (must be signed). */ 00093 #ifdef LWIP_ERR_T 00094 typedef LWIP_ERR_T err_t; 00095 #else /* LWIP_ERR_T */ 00096 typedef s8_t err_t; 00097 #endif /* LWIP_ERR_T*/ 00098 00099 /** 00100 * @} 00101 */ 00102 00103 #ifdef LWIP_DEBUG 00104 extern const char *lwip_strerr(err_t err); 00105 #else 00106 #define lwip_strerr(x) "" 00107 #endif /* LWIP_DEBUG */ 00108 00109 #if !NO_SYS 00110 int err_to_errno(err_t err); 00111 #endif /* !NO_SYS */ 00112 00113 #ifdef __cplusplus 00114 } 00115 #endif 00116 00117 #endif /* LWIP_HDR_ERR_H */
Generated on Tue Jul 12 2022 13:54:18 by
