]> git.ipfire.org Git - thirdparty/dhcp.git/blame - omapip/result.c
[master] ATF usage and documentation cleaned up
[thirdparty/dhcp.git] / omapip / result.c
CommitLineData
61b844bf 1/* result.c
98bf1607 2 */
61b844bf 3
98bf1607
SR
4/*
5 * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
98311e4b 6 * Copyright (c) 1999-2003 by Internet Software Consortium
61b844bf 7 *
98bf1607 8 * Permission to use, copy, modify, and/or distribute this software for any
98311e4b
DH
9 * purpose with or without fee is hereby granted, provided that the above
10 * copyright notice and this permission notice appear in all copies.
61b844bf 11 *
98bf1607
SR
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.
61b844bf 19 *
98311e4b
DH
20 * Internet Systems Consortium, Inc.
21 * 950 Charter Street
22 * Redwood City, CA 94063
23 * <info@isc.org>
2c85ac9b 24 * https://www.isc.org/
49733f31 25 *
61b844bf
TL
26 */
27
fe5b0fdd
DH
28#include "dhcpd.h"
29
98bf1607
SR
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 */
61b844bf 35
98bf1607
SR
36static 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 */
61b844bf
TL
70};
71
98bf1607
SR
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
76isc_msgcat_t * dhcp_msgcat = NULL;
77
78isc_result_t
79dhcp_result_register(void) {
80 isc_result_t result;
81
82 result = isc_result_register(ISC_RESULTCLASS_DHCP, DHCP_R_NRESULTS,
83 text, dhcp_msgcat, DHCP_RESULT_RESULTSET);
98311e4b 84
98bf1607 85 return(result);
61b844bf 86}