"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/dns/include/dns/fixedname.h" (4 Sep 2020, 1651 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


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 "fixedname.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 #ifndef DNS_FIXEDNAME_H
   13 #define DNS_FIXEDNAME_H 1
   14 
   15 /*****
   16 ***** Module Info
   17 *****/
   18 
   19 /*! \file dns/fixedname.h
   20  * \brief
   21  * Fixed-size Names
   22  *
   23  * dns_fixedname_t is a convenience type containing a name, an offsets
   24  * table, and a dedicated buffer big enough for the longest possible
   25  * name. This is typically used for stack-allocated names.
   26  *
   27  * MP:
   28  *\li   The caller must ensure any required synchronization.
   29  *
   30  * Reliability:
   31  *\li   No anticipated impact.
   32  *
   33  * Resources:
   34  *\li   Per dns_fixedname_t:
   35  *\code
   36  *      sizeof(dns_name_t) + sizeof(dns_offsets_t) +
   37  *      sizeof(isc_buffer_t) + 255 bytes + structure padding
   38  *\endcode
   39  *
   40  * Security:
   41  *\li   No anticipated impact.
   42  *
   43  * Standards:
   44  *\li   None.
   45  */
   46 
   47 /*****
   48 ***** Imports
   49 *****/
   50 
   51 #include <isc/buffer.h>
   52 #include <isc/lang.h>
   53 
   54 #include <dns/name.h>
   55 
   56 /*****
   57 ***** Types
   58 *****/
   59 
   60 struct dns_fixedname {
   61     dns_name_t    name;
   62     dns_offsets_t offsets;
   63     isc_buffer_t  buffer;
   64     unsigned char data[DNS_NAME_MAXWIRE];
   65 };
   66 
   67 ISC_LANG_BEGINDECLS
   68 
   69 void
   70 dns_fixedname_init(dns_fixedname_t *fixed);
   71 
   72 void
   73 dns_fixedname_invalidate(dns_fixedname_t *fixed);
   74 
   75 dns_name_t *
   76 dns_fixedname_name(dns_fixedname_t *fixed);
   77 
   78 dns_name_t *
   79 dns_fixedname_initname(dns_fixedname_t *fixed);
   80 
   81 ISC_LANG_ENDDECLS
   82 
   83 #endif /* DNS_FIXEDNAME_H */