2 * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: rdatalist.h,v 1.22 2008/04/03 06:09:05 tbox Exp $ */
20 #ifndef DNS_RDATALIST_H
21 #define DNS_RDATALIST_H 1
27 /*! \file dns/rdatalist.h
29 * A DNS rdatalist is a list of rdata of a common type and class.
32 *\li Clients of this module must impose any required synchronization.
35 *\li No anticipated impact.
41 *\li No anticipated impact.
49 #include <dns/types.h>
52 * Clients may use this type directly.
54 struct dns_rdatalist {
55 dns_rdataclass_t rdclass;
57 dns_rdatatype_t covers;
59 ISC_LIST(dns_rdata_t) rdata;
60 ISC_LINK(dns_rdatalist_t) link;
66 dns_rdatalist_init(dns_rdatalist_t *rdatalist);
68 * Initialize rdatalist.
71 *\li All fields of rdatalist have been initialized to their default
76 dns_rdatalist_tordataset(dns_rdatalist_t *rdatalist,
77 dns_rdataset_t *rdataset);
79 * Make 'rdataset' refer to the rdata in 'rdatalist'.
82 *\li The caller must ensure that 'rdatalist' remains valid and unchanged
83 * while 'rdataset' is associated with it.
87 *\li 'rdatalist' is a valid rdatalist.
89 *\li 'rdataset' is a valid rdataset that is not currently associated with
95 *\li 'rdataset' is associated with the rdata in rdatalist.
102 dns_rdatalist_fromrdataset(dns_rdataset_t *rdataset,
103 dns_rdatalist_t **rdatalist);
105 * Point 'rdatalist' to the rdatalist in 'rdataset'.
109 *\li 'rdatalist' is a pointer to a NULL dns_rdatalist_t pointer.
111 *\li 'rdataset' is a valid rdataset associated with an rdatalist.
116 *\li 'rdatalist' is pointed to the rdatalist in rdataset.
124 #endif /* DNS_RDATALIST_H */