xref: /openbsd/usr.bin/dig/lib/dns/include/dns/rcode.h (revision 905646f0)
1 /*
2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14  * PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /* $Id: rcode.h,v 1.4 2020/02/23 19:54:25 jung Exp $ */
18 
19 #ifndef DNS_RCODE_H
20 #define DNS_RCODE_H 1
21 
22 /*! \file dns/rcode.h */
23 
24 #include <dns/types.h>
25 
26 isc_result_t dns_tsigrcode_totext(dns_rcode_t rcode, isc_buffer_t *target);
27 /*%<
28  * Put a textual representation of TSIG/TKEY error 'rcode' into 'target'.
29  *
30  * Requires:
31  *\li	'rcode' is a valid TSIG/TKEY error code.
32  *
33  *\li	'target' is a valid text buffer.
34  *
35  * Ensures:
36  *\li	If the result is success:
37  *		The used space in 'target' is updated.
38  *
39  * Returns:
40  *\li	#ISC_R_SUCCESS			on success
41  *\li	#ISC_R_NOSPACE			target buffer is too small
42  */
43 
44 #endif /* DNS_RCODE_H */
45