rdatalist.c revision fd9f6afdff9faf55411dfd5f828529601cab0511
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley * Copyright (C) 1999, 2000 Internet Software Consortium.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * Permission to use, copy, modify, and distribute this software for any
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * purpose with or without fee is hereby granted, provided that the above
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * copyright notice and this permission notice appear in all copies.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
ed04318ef686581fc9a20965a5be02abfb4f1bd5Andreas Gustafssonstatic void rdatalist_disassociate(dns_rdataset_t *rdatasetp);
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssonstatic isc_result_t rdatalist_first(dns_rdataset_t *rdataset);
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssonstatic isc_result_t rdatalist_next(dns_rdataset_t *rdataset);
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssonstatic void rdatalist_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata);
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssonstatic void rdatalist_clone(dns_rdataset_t *source, dns_rdataset_t *target);
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssonstatic unsigned int rdatalist_count(dns_rdataset_t *rdataset);
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssondns_rdatalist_init(dns_rdatalist_t *rdatalist) {
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * Initialize rdatalist.
a928d619170d61da40c3bff29800ff73709140daAndreas Gustafssondns_rdatalist_tordataset(dns_rdatalist_t *rdatalist,
a928d619170d61da40c3bff29800ff73709140daAndreas Gustafsson * Make 'rdataset' refer to the rdata in 'rdatalist'.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson REQUIRE(! dns_rdataset_isassociated(rdataset));
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssonrdatalist_disassociate(dns_rdataset_t *rdataset) {
ed04318ef686581fc9a20965a5be02abfb4f1bd5Andreas Gustafssonrdatalist_first(dns_rdataset_t *rdataset) {
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson rdataset->private2 = ISC_LIST_HEAD(rdatalist->rdata);
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssonrdatalist_next(dns_rdataset_t *rdataset) {
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson rdataset->private2 = ISC_LIST_NEXT(rdata, link);
9b0e18da3d5c2290f90b285d122d368173f17c63Andreas Gustafssonrdatalist_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafssonrdatalist_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson * Reset iterator state.
9b0e18da3d5c2290f90b285d122d368173f17c63Andreas Gustafssonstatic unsigned int
9b0e18da3d5c2290f90b285d122d368173f17c63Andreas Gustafssonrdatalist_count(dns_rdataset_t *rdataset) {