xref: /netbsd-src/external/mpl/dhcp/bind/dist/lib/dns/include/dns/opcode.h (revision 4afad4b7fa6d4a0d3dedf41d1587a7250710ae54)
1 /*	$NetBSD: opcode.h,v 1.1 2024/02/18 20:57:37 christos Exp $	*/
2 
3 /*
4  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
5  *
6  * SPDX-License-Identifier: MPL-2.0
7  *
8  * This Source Code Form is subject to the terms of the Mozilla Public
9  * License, v. 2.0. If a copy of the MPL was not distributed with this
10  * file, you can obtain one at https://mozilla.org/MPL/2.0/.
11  *
12  * See the COPYRIGHT file distributed with this work for additional
13  * information regarding copyright ownership.
14  */
15 
16 #ifndef DNS_OPCODE_H
17 #define DNS_OPCODE_H 1
18 
19 /*! \file dns/opcode.h */
20 
21 #include <isc/lang.h>
22 
23 #include <dns/types.h>
24 
25 ISC_LANG_BEGINDECLS
26 
27 isc_result_t
28 dns_opcode_totext(dns_opcode_t opcode, isc_buffer_t *target);
29 /*%<
30  * Put a textual representation of error 'opcode' into 'target'.
31  *
32  * Requires:
33  *\li	'opcode' is a valid opcode.
34  *
35  *\li	'target' is a valid text buffer.
36  *
37  * Ensures:
38  *\li	If the result is success:
39  *		The used space in 'target' is updated.
40  *
41  * Returns:
42  *\li	#ISC_R_SUCCESS			on success
43  *\li	#ISC_R_NOSPACE			target buffer is too small
44  */
45 
46 ISC_LANG_ENDDECLS
47 
48 #endif /* DNS_OPCODE_H */
49