]> git.ipfire.org Git - thirdparty/dhcp.git/blob - omapip/result.c
Merge changes between 3.0rc7 and 3.0rc8pl2.
[thirdparty/dhcp.git] / omapip / result.c
1 /* result.c
2
3 Cheap knock-off of libisc result table code. This is just a place-holder
4 until the actual libisc merge. */
5
6 /*
7 * Copyright (c) 1999-2001 Internet Software Consortium.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 *
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of The Internet Software Consortium nor the names
20 * of its contributors may be used to endorse or promote products derived
21 * from this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
24 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
31 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
32 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
34 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * This software has been written for the Internet Software Consortium
38 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
39 * To learn more about the Internet Software Consortium, see
40 * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
41 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
42 * ``http://www.nominum.com''.
43 */
44
45 #include <omapip/omapip_p.h>
46
47 static const char *text[ISC_R_NRESULTS] = {
48 "success", /* 0 */
49 "out of memory", /* 1 */
50 "timed out", /* 2 */
51 "no available threads", /* 3 */
52 "address not available", /* 4 */
53 "address in use", /* 5 */
54 "permission denied", /* 6 */
55 "no pending connections", /* 7 */
56 "network unreachable", /* 8 */
57 "host unreachable", /* 9 */
58 "network down", /* 10 */
59 "host down", /* 11 */
60 "connection refused", /* 12 */
61 "not enough free resources", /* 13 */
62 "end of file", /* 14 */
63 "socket already bound", /* 15 */
64 "task is done", /* 16 */
65 "lock busy", /* 17 */
66 "already exists", /* 18 */
67 "ran out of space", /* 19 */
68 "operation canceled", /* 20 */
69 "sending events is not allowed", /* 21 */
70 "shutting down", /* 22 */
71 "not found", /* 23 */
72 "unexpected end of input", /* 24 */
73 "failure", /* 25 */
74 "I/O error", /* 26 */
75 "not implemented", /* 27 */
76 "unbalanced parentheses", /* 28 */
77 "no more", /* 29 */
78 "invalid file", /* 30 */
79 "bad base64 encoding", /* 31 */
80 "unexpected token", /* 32 */
81 "quota reached", /* 33 */
82 "unexpected error", /* 34 */
83 "already running", /* 35 */
84 "host unknown", /* 36 */
85 "protocol version mismatch", /* 37 */
86 "protocol error", /* 38 */
87 "invalid argument", /* 39 */
88 "not connected", /* 40 */
89 "data not yet available", /* 41 */
90 "object unchanged", /* 42 */
91 "more than one object matches key", /* 43 */
92 "key conflict", /* 44 */
93 "parse error(s) occurred", /* 45 */
94 "no key specified", /* 46 */
95 "zone TSIG key not known", /* 47 */
96 "invalid TSIG key", /* 48 */
97 "operation in progress", /* 49 */
98 "DNS format error", /* 50 */
99 "DNS server failed", /* 51 */
100 "no such domain", /* 52 */
101 "not implemented", /* 53 */
102 "refused", /* 54 */
103 "domain already exists", /* 55 */
104 "RRset already exists", /* 56 */
105 "no such RRset", /* 57 */
106 "not authorized", /* 58 */
107 "not a zone", /* 59 */
108 "bad DNS signature", /* 60 */
109 "bad DNS key", /* 61 */
110 "clock skew too great", /* 62 */
111 "no root zone", /* 63 */
112 "destination address required", /* 64 */
113 "cross-zone update", /* 65 */
114 "no TSIG signature", /* 66 */
115 "not equal", /* 67 */
116 "connection reset by peer", /* 68 */
117 "unknown attribute" /* 69 */
118 };
119
120 const char *isc_result_totext (isc_result_t result)
121 {
122 if (result >= ISC_R_SUCCESS && result < ISC_R_NRESULTS)
123 return text [result];
124 return "unknown error.";
125 }