Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

ares_strerror.c

Go to the documentation of this file.
00001 /* Copyright 1998 by the Massachusetts Institute of Technology.
00002  *
00003  * Permission to use, copy, modify, and distribute this
00004  * software and its documentation for any purpose and without
00005  * fee is hereby granted, provided that the above copyright
00006  * notice appear in all copies and that both that copyright
00007  * notice and this permission notice appear in supporting
00008  * documentation, and that the name of M.I.T. not be used in
00009  * advertising or publicity pertaining to distribution of the
00010  * software without specific, written prior permission.
00011  * M.I.T. makes no representations about the suitability of
00012  * this software for any purpose.  It is provided "as is"
00013  * without express or implied warranty.
00014  *
00015  * CHANGELOG: this file has been modified by Sergio Perez Alcañiz <serpeal@disca.upv.es> 
00016  *            Departamento de Informática de Sistemas y Computadores          
00017  *            Universidad Politécnica de Valencia                             
00018  *            Valencia (Spain)    
00019  *            Date: April 2003                                          
00020  *
00021  */
00022 
00023 #include "ares_private.h"
00024 
00025 const char *ares_strerror(int code, char **memptr)
00026 {
00027   /* A future implementation may want to handle internationalization.
00028    * For now, just return a string literal from a table.
00029    */
00030   const char *errtext[] = {
00031     "Successful completion",
00032     "DNS server returned answer with no data",
00033     "DNS server claims query was misformatted",
00034     "DNS server returned general failure",
00035     "Domain name not found",
00036     "DNS server does not implement requested operation",
00037     "DNS server refused query",
00038     "Misformatted DNS query",
00039     "Misformatted domain name",
00040     "Unsupported address family",
00041     "Misformatted DNS reply",
00042     "Could not contact DNS servers",
00043     "Timeout while contacting DNS servers",
00044     "End of file",
00045     "Error reading file",
00046     "Out of memory"
00047   };
00048 
00049   (void)memptr;
00050 
00051 //#ifdef LWIP_ASSERT
00052 //  LWIP_ASSERT("ares_strerror: code", code >= 0 && code < (sizeof(errtext) / sizeof(*errtext)));
00053 //#else
00054 //  assert(code >= 0 && code < (sizeof(errtext) / sizeof(*errtext)));
00055 //#endif
00056   return errtext[code];
00057 }

Generated on Wed Jan 14 12:58:56 2004 for RTL-lwIP-0.4 by doxygen 1.3.4