ソースの整理中ですが、利用はできます。

Dependencies:   EthernetInterface HttpServer TextLCD mbed-rpc mbed-rtos mbed Socket lwip-eth lwip-sys lwip

Committer:
yueee_yt
Date:
Wed Mar 12 04:19:54 2014 +0000
Revision:
0:7766f6712673
???????????????

Who changed what in which revision?

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