|
||||
Warning, cross-references for /kernel/lwip/api/err.c need to be fixed.
0001 /** 0002 * @file 0003 * Error Management module 0004 * 0005 */ 0006 0007 /* 0008 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 0009 * All rights reserved. 0010 * 0011 * Redistribution and use in source and binary forms, with or without modification, 0012 * are permitted provided that the following conditions are met: 0013 * 0014 * 1. Redistributions of source code must retain the above copyright notice, 0015 * this list of conditions and the following disclaimer. 0016 * 2. Redistributions in binary form must reproduce the above copyright notice, 0017 * this list of conditions and the following disclaimer in the documentation 0018 * and/or other materials provided with the distribution. 0019 * 3. The name of the author may not be used to endorse or promote products 0020 * derived from this software without specific prior written permission. 0021 * 0022 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 0023 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 0024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 0025 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 0026 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 0027 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0028 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0029 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 0030 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 0031 * OF SUCH DAMAGE. 0032 * 0033 * This file is part of the lwIP TCP/IP stack. 0034 * 0035 * Author: Adam Dunkels <adam@sics.se> 0036 * 0037 */ 0038 0039 #include "lwip/err.h" 0040 0041 #ifdef LWIP_DEBUG 0042 0043 static const char *err_strerr[] = { 0044 "Ok.", /* ERR_OK 0 */ 0045 "Out of memory error.", /* ERR_MEM -1 */ 0046 "Buffer error.", /* ERR_BUF -2 */ 0047 "Timeout.", /* ERR_TIMEOUT -3 */ 0048 "Routing problem.", /* ERR_RTE -4 */ 0049 "Connection aborted.", /* ERR_ABRT -5 */ 0050 "Connection reset.", /* ERR_RST -6 */ 0051 "Connection closed.", /* ERR_CLSD -7 */ 0052 "Not connected.", /* ERR_CONN -8 */ 0053 "Illegal value.", /* ERR_VAL -9 */ 0054 "Illegal argument.", /* ERR_ARG -10 */ 0055 "Address in use.", /* ERR_USE -11 */ 0056 "Low-level netif error.", /* ERR_IF -12 */ 0057 "Already connected.", /* ERR_ISCONN -13 */ 0058 "Operation in progress." /* ERR_INPROGRESS -14 */ 0059 }; 0060 0061 /** 0062 * Convert an lwip internal error to a string representation. 0063 * 0064 * @param err an lwip internal err_t 0065 * @return a string representation for err 0066 */ 0067 const char * 0068 lwip_strerr(err_t err) 0069 { 0070 return err_strerr[-err]; 0071 0072 } 0073 0074 #endif /* LWIP_DEBUG */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 1.2.0 LXR engine. |