Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / network / stacks / AROSTCP / dhcp / omapip / result.c
blob22746893670aca47af280e16a245aff72a179169
1 /* result.c
3 Cheap knock-off of libisc result table code. This is just a place-holder
4 until the actual libisc merge. */
6 /*
7 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
8 * Copyright (c) 1999-2003 by Internet Software Consortium
10 * Permission to use, copy, modify, and distribute this software for any
11 * purpose with or without fee is hereby granted, provided that the above
12 * copyright notice and this permission notice appear in all copies.
14 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
15 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
20 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 * Internet Systems Consortium, Inc.
23 * 950 Charter Street
24 * Redwood City, CA 94063
25 * <info@isc.org>
26 * http://www.isc.org/
28 * This software has been written for Internet Systems Consortium
29 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
30 * To learn more about Internet Systems Consortium, see
31 * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
32 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
33 * ``http://www.nominum.com''.
36 #include <omapip/omapip_p.h>
38 static const char *text[ISC_R_NRESULTS] = {
39 "success", /* 0 */
40 "out of memory", /* 1 */
41 "timed out", /* 2 */
42 "no available threads", /* 3 */
43 "address not available", /* 4 */
44 "address in use", /* 5 */
45 "permission denied", /* 6 */
46 "no pending connections", /* 7 */
47 "network unreachable", /* 8 */
48 "host unreachable", /* 9 */
49 "network down", /* 10 */
50 "host down", /* 11 */
51 "connection refused", /* 12 */
52 "not enough free resources", /* 13 */
53 "end of file", /* 14 */
54 "socket already bound", /* 15 */
55 "task is done", /* 16 */
56 "lock busy", /* 17 */
57 "already exists", /* 18 */
58 "ran out of space", /* 19 */
59 "operation canceled", /* 20 */
60 "sending events is not allowed", /* 21 */
61 "shutting down", /* 22 */
62 "not found", /* 23 */
63 "unexpected end of input", /* 24 */
64 "failure", /* 25 */
65 "I/O error", /* 26 */
66 "not implemented", /* 27 */
67 "unbalanced parentheses", /* 28 */
68 "no more", /* 29 */
69 "invalid file", /* 30 */
70 "bad base64 encoding", /* 31 */
71 "unexpected token", /* 32 */
72 "quota reached", /* 33 */
73 "unexpected error", /* 34 */
74 "already running", /* 35 */
75 "host unknown", /* 36 */
76 "protocol version mismatch", /* 37 */
77 "protocol error", /* 38 */
78 "invalid argument", /* 39 */
79 "not connected", /* 40 */
80 "data not yet available", /* 41 */
81 "object unchanged", /* 42 */
82 "more than one object matches key", /* 43 */
83 "key conflict", /* 44 */
84 "parse error(s) occurred", /* 45 */
85 "no key specified", /* 46 */
86 "zone TSIG key not known", /* 47 */
87 "invalid TSIG key", /* 48 */
88 "operation in progress", /* 49 */
89 "DNS format error", /* 50 */
90 "DNS server failed", /* 51 */
91 "no such domain", /* 52 */
92 "not implemented", /* 53 */
93 "refused", /* 54 */
94 "domain already exists", /* 55 */
95 "RRset already exists", /* 56 */
96 "no such RRset", /* 57 */
97 "not authorized", /* 58 */
98 "not a zone", /* 59 */
99 "bad DNS signature", /* 60 */
100 "bad DNS key", /* 61 */
101 "clock skew too great", /* 62 */
102 "no root zone", /* 63 */
103 "destination address required", /* 64 */
104 "cross-zone update", /* 65 */
105 "no TSIG signature", /* 66 */
106 "not equal", /* 67 */
107 "connection reset by peer", /* 68 */
108 "unknown attribute" /* 69 */
111 const char *isc_result_totext (isc_result_t result)
113 static char ebuf[40];
115 if (result >= ISC_R_SUCCESS && result < ISC_R_NRESULTS)
116 return text [result];
117 sprintf(ebuf, "unknown error: %d", result);
118 return ebuf;