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: secalg.h,v 1.3 2020/02/23 19:54:25 jung Exp $ */ 18 19 #ifndef DNS_SECALG_H 20 #define DNS_SECALG_H 1 21 22 /*! \file dns/secalg.h */ 23 24 #include <dns/types.h> 25 26 isc_result_t 27 dns_secalg_totext(dns_secalg_t secalg, isc_buffer_t *target); 28 /*%< 29 * Put a textual representation of the DNSSEC security algorithm 'secalg' 30 * into 'target'. 31 * 32 * Requires: 33 *\li 'secalg' is a valid secalg. 34 * 35 *\li 'target' is a valid text buffer. 36 * 37 * Ensures, 38 * if the result is success: 39 *\li 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 #define DNS_SECALG_FORMATSIZE 20 47 void 48 dns_secalg_format(dns_secalg_t alg, char *cp, unsigned int size); 49 /*%< 50 * Wrapper for dns_secalg_totext(), writing text into 'cp' 51 */ 52 53 #endif /* DNS_SECALG_H */ 54