rdatalist.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2008, 2015  Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (C) 1999-2001  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00010  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00011  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00012  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00013  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00014  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00015  * PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 /* $Id$ */
00019 
00020 #ifndef DNS_RDATALIST_H
00021 #define DNS_RDATALIST_H 1
00022 
00023 /*****
00024  ***** Module Info
00025  *****/
00026 
00027 /*! \file dns/rdatalist.h
00028  * \brief
00029  * A DNS rdatalist is a list of rdata of a common type and class.
00030  *
00031  * MP:
00032  *\li   Clients of this module must impose any required synchronization.
00033  *
00034  * Reliability:
00035  *\li   No anticipated impact.
00036  *
00037  * Resources:
00038  *\li   TBS
00039  *
00040  * Security:
00041  *\li   No anticipated impact.
00042  *
00043  * Standards:
00044  *\li   None.
00045  */
00046 
00047 #include <isc/lang.h>
00048 
00049 #include <dns/types.h>
00050 
00051 /*%
00052  * Clients may use this type directly.
00053  */
00054 struct dns_rdatalist {
00055         dns_rdataclass_t                rdclass;
00056         dns_rdatatype_t                 type;
00057         dns_rdatatype_t                 covers;
00058         dns_ttl_t                       ttl;
00059         ISC_LIST(dns_rdata_t)           rdata;
00060         ISC_LINK(dns_rdatalist_t)       link;
00061         /*%<
00062          * Case vector.  If the bit is set then the corresponding
00063          * character in the owner name needs to be AND'd with 0x20,
00064          * rendering that character upper case.
00065          */
00066         unsigned char                   upper[32];
00067 };
00068 
00069 ISC_LANG_BEGINDECLS
00070 
00071 void
00072 dns_rdatalist_init(dns_rdatalist_t *rdatalist);
00073 /*%<
00074  * Initialize rdatalist.
00075  *
00076  * Ensures:
00077  *\li   All fields of rdatalist have been initialized to their default
00078  *      values.
00079  */
00080 
00081 isc_result_t
00082 dns_rdatalist_tordataset(dns_rdatalist_t *rdatalist,
00083                          dns_rdataset_t *rdataset);
00084 /*%<
00085  * Make 'rdataset' refer to the rdata in 'rdatalist'.
00086  *
00087  * Note:
00088  *\li   The caller must ensure that 'rdatalist' remains valid and unchanged
00089  *      while 'rdataset' is associated with it.
00090  *
00091  * Requires:
00092  *
00093  *\li   'rdatalist' is a valid rdatalist.
00094  *
00095  *\li   'rdataset' is a valid rdataset that is not currently associated with
00096  *      any rdata.
00097  *
00098  * Ensures,
00099  *      on success,
00100  *
00101  *\li           'rdataset' is associated with the rdata in rdatalist.
00102  *
00103  * Returns:
00104  *\li   #ISC_R_SUCCESS
00105  */
00106 
00107 isc_result_t
00108 dns_rdatalist_fromrdataset(dns_rdataset_t *rdataset,
00109                            dns_rdatalist_t **rdatalist);
00110 /*%<
00111  * Point 'rdatalist' to the rdatalist in 'rdataset'.
00112  *
00113  * Requires:
00114  *
00115  *\li   'rdatalist' is a pointer to a NULL dns_rdatalist_t pointer.
00116  *
00117  *\li   'rdataset' is a valid rdataset associated with an rdatalist.
00118  *
00119  * Ensures,
00120  *      on success,
00121  *
00122  *\li           'rdatalist' is pointed to the rdatalist in rdataset.
00123  *
00124  * Returns:
00125  *\li   #ISC_R_SUCCESS
00126  */
00127 
00128 ISC_LANG_ENDDECLS
00129 
00130 #endif /* DNS_RDATALIST_H */

Generated on Tue Apr 28 17:40:57 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha