ISC DHCP  4.3.3
A reference DHCPv4 and DHCPv6 implementation
result.c
Go to the documentation of this file.
1 /* result.c
2  */
3 
4 /*
5  * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
6  * Copyright (c) 1999-2003 by Internet Software Consortium
7  *
8  * Permission to use, copy, modify, and/or distribute this software for any
9  * purpose with or without fee is hereby granted, provided that the above
10  * copyright notice and this permission notice appear in all copies.
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
13  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14  * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
17  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18  * PERFORMANCE OF THIS SOFTWARE.
19  *
20  * Internet Systems Consortium, Inc.
21  * 950 Charter Street
22  * Redwood City, CA 94063
23  * <info@isc.org>
24  * https://www.isc.org/
25  *
26  */
27 
28 #include "dhcpd.h"
29 
30 /*
31  * In the previous code the results started at 36
32  * rather than ISC_RESULTCLASS_DHCP + 0
33  * ISC_R_NOTCONNECTED was + 4 (40), it has been superseeded by the isc version
34  */
35 
36 static const char *text[DHCP_R_NRESULTS] = {
37  "host unknown", /* 0 */
38  "protocol version mismatch", /* 1 */
39  "protocol error", /* 2 */
40  "invalid argument", /* 3 */
41  "data not yet available", /* 4 */
42  "object unchanged", /* 5 */
43  "more than one object matches key", /* 6 */
44  "key conflict", /* 7 */
45  "parse error(s) occurred", /* 8 */
46  "no key specified", /* 9 */
47  "zone TSIG key not known", /* 10 */
48  "invalid TSIG key", /* 11 */
49  "operation in progress", /* 12 */
50  "DNS format error", /* 13 */
51  "DNS server failed", /* 14 */
52  "no such domain", /* 15 */
53  "not implemented", /* 16 */
54  "refused", /* 17 */
55  "domain already exists", /* 18 */
56  "RRset already exists", /* 19 */
57  "no such RRset", /* 20 */
58  "not authorized", /* 21 */
59  "not a zone", /* 22 */
60  "bad DNS signature", /* 23 */
61  "bad DNS key", /* 24 */
62  "clock skew too great", /* 25 */
63  "no root zone", /* 26 */
64  "destination address required", /* 27 */
65  "cross-zone update", /* 28 */
66  "no TSIG signature", /* 29 */
67  "not equal", /* 30 */
68  "connection reset by peer", /* 31 */
69  "unknown attribute" /* 32 */
70 };
71 
72 #define DHCP_RESULT_RESULTSET 2
73 #define DHCP_RESULT_UNAVAILABLESET 3
74 
75 // This is a placeholder as we don't allow for external message catalogs yet
76 isc_msgcat_t * dhcp_msgcat = NULL;
77 
78 isc_result_t
80  isc_result_t result;
81 
82  result = isc_result_register(ISC_RESULTCLASS_DHCP, DHCP_R_NRESULTS,
84 
85  return(result);
86 }
#define DHCP_RESULT_RESULTSET
Definition: result.c:72
#define DHCP_R_NRESULTS
Definition: result.h:79
isc_msgcat_t * dhcp_msgcat
Definition: result.c:76
isc_result_t dhcp_result_register(void)
Definition: result.c:79