result.h revision 1.2.6.1 1 1.2.6.1 martin /* $NetBSD: result.h,v 1.2.6.1 2024/02/29 11:39:20 martin Exp $ */
2 1.1 christos
3 1.1 christos /* result.h
4 1.1 christos */
5 1.1 christos
6 1.1 christos /*
7 1.2.6.1 martin * Copyright (C) 2009-2022 Internet Systems Consortium, Inc. ("ISC")
8 1.1 christos *
9 1.1 christos * This Source Code Form is subject to the terms of the Mozilla Public
10 1.1 christos * License, v. 2.0. If a copy of the MPL was not distributed with this
11 1.1 christos * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 1.1 christos *
13 1.1 christos * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
14 1.1 christos * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15 1.1 christos * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
16 1.1 christos * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17 1.1 christos * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
18 1.1 christos * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 1.1 christos * PERFORMANCE OF THIS SOFTWARE.
20 1.1 christos *
21 1.1 christos * Internet Systems Consortium, Inc.
22 1.2.6.1 martin * PO Box 360
23 1.2.6.1 martin * Newmarket, NH 03857 USA
24 1.1 christos * <info (at) isc.org>
25 1.1 christos * https://www.isc.org/
26 1.1 christos */
27 1.1 christos
28 1.1 christos #ifndef DHCP_RESULT_H
29 1.1 christos #define DHCP_RESULT_H 1
30 1.1 christos
31 1.1 christos #include <isc/lang.h>
32 1.1 christos #include <isc/resultclass.h>
33 1.1 christos #include <isc/types.h>
34 1.1 christos
35 1.1 christos #include <isc/result.h>
36 1.1 christos
37 1.1 christos /*
38 1.1 christos * DHCP result codes
39 1.1 christos */
40 1.1 christos
41 1.1 christos /*
42 1.1 christos * In the previous code the results started at 36
43 1.1 christos * rather than ISC_RESULTCLASS_DHCP + 0
44 1.1 christos * ISC_R_NOTCONNECTED was + 4 (40), it has been superseded by the isc version
45 1.1 christos */
46 1.1 christos
47 1.1 christos #define DHCP_R_HOSTUNKNOWN (ISC_RESULTCLASS_DHCP + 0)
48 1.1 christos #define DHCP_R_VERSIONMISMATCH (ISC_RESULTCLASS_DHCP + 1)
49 1.1 christos #define DHCP_R_PROTOCOLERROR (ISC_RESULTCLASS_DHCP + 2)
50 1.1 christos #define DHCP_R_INVALIDARG (ISC_RESULTCLASS_DHCP + 3)
51 1.1 christos #define DHCP_R_NOTYET (ISC_RESULTCLASS_DHCP + 4)
52 1.1 christos #define DHCP_R_UNCHANGED (ISC_RESULTCLASS_DHCP + 5)
53 1.1 christos #define DHCP_R_MULTIPLE (ISC_RESULTCLASS_DHCP + 6)
54 1.1 christos #define DHCP_R_KEYCONFLICT (ISC_RESULTCLASS_DHCP + 7)
55 1.1 christos #define DHCP_R_BADPARSE (ISC_RESULTCLASS_DHCP + 8)
56 1.1 christos #define DHCP_R_NOKEYS (ISC_RESULTCLASS_DHCP + 9)
57 1.1 christos #define DHCP_R_KEY_UNKNOWN (ISC_RESULTCLASS_DHCP + 10)
58 1.1 christos #define DHCP_R_INVALIDKEY (ISC_RESULTCLASS_DHCP + 11)
59 1.1 christos #define DHCP_R_INCOMPLETE (ISC_RESULTCLASS_DHCP + 12)
60 1.1 christos #define DHCP_R_FORMERR (ISC_RESULTCLASS_DHCP + 13)
61 1.1 christos #define DHCP_R_SERVFAIL (ISC_RESULTCLASS_DHCP + 14)
62 1.1 christos #define DHCP_R_NXDOMAIN (ISC_RESULTCLASS_DHCP + 15)
63 1.1 christos #define DHCP_R_NOTIMPL (ISC_RESULTCLASS_DHCP + 16)
64 1.1 christos #define DHCP_R_REFUSED (ISC_RESULTCLASS_DHCP + 17)
65 1.1 christos #define DHCP_R_YXDOMAIN (ISC_RESULTCLASS_DHCP + 18)
66 1.1 christos #define DHCP_R_YXRRSET (ISC_RESULTCLASS_DHCP + 19)
67 1.1 christos #define DHCP_R_NXRRSET (ISC_RESULTCLASS_DHCP + 20)
68 1.1 christos #define DHCP_R_NOTAUTH (ISC_RESULTCLASS_DHCP + 21)
69 1.1 christos #define DHCP_R_NOTZONE (ISC_RESULTCLASS_DHCP + 22)
70 1.1 christos #define DHCP_R_BADSIG (ISC_RESULTCLASS_DHCP + 23)
71 1.1 christos #define DHCP_R_BADKEY (ISC_RESULTCLASS_DHCP + 24)
72 1.1 christos #define DHCP_R_BADTIME (ISC_RESULTCLASS_DHCP + 25)
73 1.1 christos #define DHCP_R_NOROOTZONE (ISC_RESULTCLASS_DHCP + 26)
74 1.1 christos #define DHCP_R_DESTADDRREQ (ISC_RESULTCLASS_DHCP + 27)
75 1.1 christos #define DHCP_R_CROSSZONE (ISC_RESULTCLASS_DHCP + 28)
76 1.1 christos #define DHCP_R_NO_TSIG (ISC_RESULTCLASS_DHCP + 29)
77 1.1 christos #define DHCP_R_NOT_EQUAL (ISC_RESULTCLASS_DHCP + 30)
78 1.1 christos #define DHCP_R_CONNRESET (ISC_RESULTCLASS_DHCP + 31)
79 1.1 christos #define DHCP_R_UNKNOWNATTRIBUTE (ISC_RESULTCLASS_DHCP + 32)
80 1.1 christos
81 1.1 christos #define DHCP_R_NRESULTS 33 /*%< Number of results */
82 1.1 christos
83 1.1 christos // Included for historical reasons, these should be removed as
84 1.1 christos // soon as reasonable
85 1.1 christos #ifdef INCLUDE_OLD_DHCP_ISC_ERROR_CODES
86 1.1 christos #define ISC_R_HOSTUNKNOWN DHCP_R_HOSTUNKNOWN
87 1.1 christos #define ISC_R_VERSIONMISMATCH DHCP_R_VERSIONMISMATCH
88 1.2.6.1 martin #define ISC_R_PROTOCOLERROR DHCP_R_PROTOCOLERROR
89 1.2.6.1 martin #define ISC_R_INVALIDARG DHCP_R_INVALIDARG
90 1.2.6.1 martin #define ISC_R_NOTYET DHCP_R_NOTYET
91 1.2.6.1 martin #define ISC_R_UNCHANGED DHCP_R_UNCHANGED
92 1.2.6.1 martin #define ISC_R_KEYCONFLICT DHCP_R_KEYCONFLICT
93 1.2.6.1 martin #define ISC_R_BADPARSE DHCP_R_BADPARSE
94 1.2.6.1 martin #define ISC_R_NOKEYS DHCP_R_NOKEYS
95 1.2.6.1 martin #define ISC_R_KEY_UNKNOWN DHCP_R_KEY_UNKNOWN
96 1.2.6.1 martin #define ISC_R_INVALIDKEY DHCP_R_INVALIDKEY
97 1.2.6.1 martin #define ISC_R_INCOMPLETE DHCP_R_INCOMPLETE
98 1.2.6.1 martin #define ISC_R_FORMERR DHCP_R_FORMERR
99 1.2.6.1 martin #define ISC_R_SERVFAIL DHCP_R_SERVFAIL
100 1.2.6.1 martin #define ISC_R_NXDOMAIN DHCP_R_NXDOMAIN
101 1.2.6.1 martin #define ISC_R_NOTIMPL DHCP_R_NOTIMPL
102 1.2.6.1 martin #define ISC_R_REFUSED DHCP_R_REFUSED
103 1.2.6.1 martin #define ISC_R_YXDOMAIN DHCP_R_YXDOMAIN
104 1.2.6.1 martin #define ISC_R_YXRRSET DHCP_R_YXRRSET
105 1.2.6.1 martin #define ISC_R_NXRRSET DHCP_R_NXRRSET
106 1.2.6.1 martin #define ISC_R_NOTAUTH DHCP_R_NOTAUTH
107 1.2.6.1 martin #define ISC_R_NOTZONE DHCP_R_NOTZONE
108 1.2.6.1 martin #define ISC_R_BADSIG DHCP_R_BADSIG
109 1.2.6.1 martin #define ISC_R_BADKEY DHCP_R_BADKEY
110 1.2.6.1 martin #define ISC_R_BADTIME DHCP_R_BADTIME
111 1.2.6.1 martin #define ISC_R_NOROOTZONE DHCP_R_NOROOTZONE
112 1.2.6.1 martin #define ISC_R_DESTADDRREQ DHCP_R_DESTADDRREQ
113 1.2.6.1 martin #define ISC_R_CROSSZONE DHCP_R_CROSSZONE
114 1.2.6.1 martin #define ISC_R_NO_TSIG DHCP_R_NO_TSIG
115 1.2.6.1 martin #define ISC_R_NOT_EQUAL DHCP_R_NOT_EQUAL
116 1.2.6.1 martin #define ISC_R_CONNRESET DHCP_R_CONNRESET
117 1.2.6.1 martin #define ISC_R_UNKNOWNATTRIBUTE DHCP_R_UNKNOWNATTRIBUTE
118 1.1 christos #endif
119 1.1 christos
120 1.1 christos isc_result_t
121 1.1 christos dhcp_result_register(void);
122 1.1 christos
123 1.1 christos #endif /* DHCP_RESULT_H */
124