1998-12-12 20:48:14 +00:00
|
|
|
/*
|
1999-03-06 04:03:53 +00:00
|
|
|
* Copyright (C) 1998, 1999 Internet Software Consortium.
|
1998-12-12 20:48:14 +00:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
|
|
|
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
|
|
|
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
|
|
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
|
|
|
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
|
|
* SOFTWARE.
|
|
|
|
*/
|
1998-10-14 22:35:04 +00:00
|
|
|
|
1998-12-12 19:25:20 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
1998-10-14 22:35:04 +00:00
|
|
|
#include <isc/result.h>
|
|
|
|
|
1998-11-11 19:02:52 +00:00
|
|
|
static char *text_table[ISC_R_LASTENTRY + 1] = {
|
1998-11-06 01:44:19 +00:00
|
|
|
"success", /* 0 */
|
|
|
|
"out of memory", /* 1 */
|
|
|
|
"timed out", /* 2 */
|
|
|
|
"no available threads", /* 3 */
|
|
|
|
"address not available", /* 4 */
|
|
|
|
"address in use", /* 5 */
|
|
|
|
"permission denied", /* 6 */
|
|
|
|
"no pending connections", /* 7 */
|
|
|
|
"network unreachable", /* 8 */
|
|
|
|
"host unreachable", /* 9 */
|
|
|
|
"network down", /* 10 */
|
|
|
|
"host down", /* 11 */
|
|
|
|
"connection refused", /* 12 */
|
|
|
|
"not enough free resources", /* 13 */
|
|
|
|
"end of file", /* 14 */
|
|
|
|
"socket already bound", /* 15 */
|
1999-05-10 22:49:22 +00:00
|
|
|
"task is done", /* 16 */
|
1998-11-11 19:02:52 +00:00
|
|
|
"lock busy", /* 17 */
|
1998-11-16 23:49:08 +00:00
|
|
|
"already exists", /* 18 */
|
1998-12-30 20:17:41 +00:00
|
|
|
"ran out of space", /* 19 */
|
1998-12-01 23:59:39 +00:00
|
|
|
"operation canceled", /* 20 */
|
1998-12-16 01:55:53 +00:00
|
|
|
"sending events is not allowed", /* 21 */
|
|
|
|
"task is shutting down", /* 22 */
|
1998-12-30 20:17:41 +00:00
|
|
|
"not found", /* 23 */
|
|
|
|
"unexpected end of input", /* 24 */
|
|
|
|
"failure", /* 25 */
|
|
|
|
"I/O error", /* 26 */
|
1999-01-14 19:53:10 +00:00
|
|
|
"not implemented", /* 27 */
|
1999-01-26 08:23:55 +00:00
|
|
|
"unbalanced parentheses", /* 28 */
|
1999-01-28 08:38:01 +00:00
|
|
|
"no more", /* 29 */
|
1999-05-18 17:46:59 +00:00
|
|
|
"invalid file", /* 30 */
|
|
|
|
"bad base64 encoding", /* 31 */
|
|
|
|
"unexpected token", /* 32 */
|
1998-10-14 22:35:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
char *
|
1998-10-26 23:07:15 +00:00
|
|
|
isc_result_totext(isc_result_t result) {
|
1998-10-14 22:35:04 +00:00
|
|
|
if (result == ISC_R_UNEXPECTED)
|
|
|
|
return ("unexpected error");
|
1998-11-11 19:02:52 +00:00
|
|
|
if (result > ISC_R_LASTENTRY)
|
1998-10-14 22:35:04 +00:00
|
|
|
return ("unknown result code");
|
|
|
|
return (text_table[result]);
|
|
|
|
}
|