"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.11.23/lib/dns/include/dns/dsdigest.h" (7 Sep 2020, 1721 Bytes) of package /linux/misc/dns/bind9/9.11.23/bind-9.11.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dsdigest.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 
   13 #ifndef DNS_DSDIGEST_H
   14 #define DNS_DSDIGEST_H 1
   15 
   16 /*! \file dns/dsdigest.h */
   17 
   18 #include <isc/lang.h>
   19 
   20 #include <dns/types.h>
   21 
   22 ISC_LANG_BEGINDECLS
   23 
   24 isc_result_t
   25 dns_dsdigest_fromtext(dns_dsdigest_t *dsdigestp, isc_textregion_t *source);
   26 /*%<
   27  * Convert the text 'source' refers to into a DS/DLV digest type value.
   28  * The text may contain either a mnemonic digest name or a decimal
   29  * digest number.
   30  *
   31  * Requires:
   32  *\li   'dsdigestp' is a valid pointer.
   33  *
   34  *\li   'source' is a valid text region.
   35  *
   36  * Returns:
   37  *\li   ISC_R_SUCCESS           on success
   38  *\li   ISC_R_RANGE         numeric type is out of range
   39  *\li   DNS_R_UNKNOWN           mnemonic type is unknown
   40  */
   41 
   42 isc_result_t
   43 dns_dsdigest_totext(dns_dsdigest_t dsdigest, isc_buffer_t *target);
   44 /*%<
   45  * Put a textual representation of the DS/DLV digest type 'dsdigest'
   46  * into 'target'.
   47  *
   48  * Requires:
   49  *\li   'dsdigest' is a valid dsdigest.
   50  *
   51  *\li   'target' is a valid text buffer.
   52  *
   53  * Ensures,
   54  *  if the result is success:
   55  *\li       The used space in 'target' is updated.
   56  *
   57  * Returns:
   58  *\li   ISC_R_SUCCESS           on success
   59  *\li   ISC_R_NOSPACE           target buffer is too small
   60  */
   61 
   62 #define DNS_DSDIGEST_FORMATSIZE 20
   63 void
   64 dns_dsdigest_format(dns_dsdigest_t typ, char *cp, unsigned int size);
   65 /*%<
   66  * Wrapper for dns_dsdigest_totext(), writing text into 'cp'
   67  */
   68 
   69 ISC_LANG_ENDDECLS
   70 
   71 #endif /* DNS_DSDIGEST_H */