]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/lwIP_MCF5235_GCC/lwip/src/api/err.c
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / lwIP_MCF5235_GCC / lwip / src / api / err.c
diff --git a/FreeRTOS/Demo/lwIP_MCF5235_GCC/lwip/src/api/err.c b/FreeRTOS/Demo/lwIP_MCF5235_GCC/lwip/src/api/err.c
new file mode 100644 (file)
index 0000000..cc63678
--- /dev/null
@@ -0,0 +1,59 @@
+/*\r
+ * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\r
+ * All rights reserved. \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without modification, \r
+ * are permitted provided that the following conditions are met:\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ *    this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright notice,\r
+ *    this list of conditions and the following disclaimer in the documentation\r
+ *    and/or other materials provided with the distribution.\r
+ * 3. The name of the author may not be used to endorse or promote products\r
+ *    derived from this software without specific prior written permission. \r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED \r
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF \r
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT \r
+ * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, \r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT \r
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN \r
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY \r
+ * OF SUCH DAMAGE.\r
+ *\r
+ * This file is part of the lwIP TCP/IP stack.\r
+ * \r
+ * Author: Adam Dunkels <adam@sics.se>\r
+ *\r
+ */\r
+\r
+#include "lwip/err.h"\r
+\r
+#ifdef LWIP_DEBUG\r
+\r
+static char *err_strerr[] = {"Ok.",\r
+           "Out of memory error.",\r
+           "Buffer error.",\r
+           "Connection aborted.",\r
+           "Connection reset.",\r
+           "Connection closed.",\r
+           "Not connected.",\r
+           "Illegal value.",\r
+           "Illegal argument.",\r
+           "Routing problem.",\r
+           "Address in use."\r
+};\r
+\r
+\r
+char *\r
+lwip_strerr(err_t err)\r
+{\r
+  return err_strerr[-err];\r
+\r
+}\r
+\r
+\r
+#endif /* LWIP_DEBUG */\r