rdataset.c revision e7857b5ee05414961bb11f9e57f654163fae6acb
7d98a1783f222964bcde7d56dab77b822706204dBob Halley * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Copyright (C) 1999-2003 Internet Software Consortium.
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley * Permission to use, copy, modify, and/or distribute this software for any
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley * purpose with or without fee is hereby granted, provided that the above
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
15a44745412679c30a6d022733925af70a38b715David Lawrence * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15a44745412679c30a6d022733925af70a38b715David Lawrence * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15a44745412679c30a6d022733925af70a38b715David Lawrence * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15a44745412679c30a6d022733925af70a38b715David Lawrence * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15a44745412679c30a6d022733925af70a38b715David Lawrence * PERFORMANCE OF THIS SOFTWARE.
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halleystatic const char *trustnames[] = {
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley "pending-additional",
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley "pending-answer",
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley "additional",
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley "authauthority",
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley "authanswer",
878d3073b13833ee1a50dfeabf8e400b6fdfc754Brian Wellington if (trust >= sizeof(trustnames)/sizeof(*trustnames))
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley return ("bad");
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley * Make 'rdataset' a valid, disassociated rdataset.
e02c696ea586f8dcc7c6145cc0f143f887960cd4Andreas Gustafssondns_rdataset_invalidate(dns_rdataset_t *rdataset) {
e02c696ea586f8dcc7c6145cc0f143f887960cd4Andreas Gustafsson * Invalidate 'rdataset'.
11d435aa4cf77e035445978f7e3776a3589715fdAndreas Gustafssondns_rdataset_disassociate(dns_rdataset_t *rdataset) {
11d435aa4cf77e035445978f7e3776a3589715fdAndreas Gustafsson * Disassociate 'rdataset' from its rdata, allowing it to be reused.
a0f6cda5fd9f2fcc4154bb63628f849b639a40caAndreas Gustafsson (rdataset->methods->disassociate)(rdataset);
7193a1762e428cfba06907e51fa9e4bce3b5569aAndreas Gustafssondns_rdataset_isassociated(dns_rdataset_t *rdataset) {
7193a1762e428cfba06907e51fa9e4bce3b5569aAndreas Gustafsson * Is 'rdataset' associated?
7193a1762e428cfba06907e51fa9e4bce3b5569aAndreas Gustafssonquestion_disassociate(dns_rdataset_t *rdataset) {
a0f6cda5fd9f2fcc4154bb63628f849b639a40caAndreas Gustafssonquestion_cursor(dns_rdataset_t *rdataset) {
5542df09597c479be604da0ece8271cbc6fd9c4aDavid Lawrencequestion_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halley * This routine should never be called.
1687985cdfc3a4c330c5bdb02c131835f8756e3cBob Halleyquestion_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
REQUIRE(0);
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
struct towire_sort {
int key;
static isc_result_t
isc_region_t r;
unsigned int headlen;
unsigned int ncache_opts = 0;
countp));
return (ISC_R_SUCCESS);
return (result);
if (shuffle) {
goto cleanup;
for (i = 0; i < count; i++) {
for (i = 0; i < count; i++) {
for (i = 0; i < count; i++) {
if (j == count)
added = 0;
goto rollback;
if (!question)
goto rollback;
if (!question) {
if (shuffle)
goto rollback;
added++;
if (shuffle) {
if (i == count)
goto rollback;
goto cleanup;
goto cleanup;
*countp = 0;
return (result);
const void *order_arg,
unsigned int options,
unsigned int *countp)
const void *order_arg,
unsigned int options,
unsigned int *countp,
void **state)
unsigned int options,
unsigned int *countp)
return (result);
return (result);
return (ISC_R_SUCCESS);
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
if (acceptexpired &&