sdb.c revision 6f7abb89ec22aef5eda40ed60fcf605a42b78d4d
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
07dcadc6e24f4572f2b7d7cae7d47d0f5256d129Andreas Gustafsson * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
4cd765650776027d05fe7fca248478918e02e63bDavid Lawrence * Permission to use, copy, modify, and/or distribute this software for any
4cd765650776027d05fe7fca248478918e02e63bDavid Lawrence * purpose with or without fee is hereby granted, provided that the above
4cd765650776027d05fe7fca248478918e02e63bDavid Lawrence * copyright notice and this permission notice appear in all copies.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
4cd765650776027d05fe7fca248478918e02e63bDavid Lawrence unsigned int flags;
struct dns_sdb {
char *zone;
void *dbdata;
unsigned int references;
struct dns_sdblookup {
unsigned int magic;
unsigned int references;
struct dns_sdballnodes {
typedef struct sdb_rdatasetiter {
#ifdef __COVERITY__
static int dummy;
DNS_SDBFLAG_DNS64)) == 0);
return (ISC_R_NOMEMORY);
goto cleanup_mctx;
goto cleanup_mutex;
return (ISC_R_SUCCESS);
return (result);
unsigned int size;
return (size);
unsigned int rdlen)
return (ISC_R_NOMEMORY);
return (DNS_R_BADTTL);
return (ISC_R_NOMEMORY);
goto failure;
®ion);
return (result);
const char *data)
unsigned int datalen;
unsigned char *p = NULL;
isc_buffer_t b;
return (result);
goto failure;
goto failure;
if (p == NULL) {
goto failure;
origin, 0,
p = NULL;
goto failure;
if (p != NULL)
return (result);
static isc_result_t
isc_buffer_t b;
return (result);
return (result);
return (ISC_R_NOMEMORY);
return (result);
return (ISC_R_SUCCESS);
return (result);
return (result);
if (n >= (int)sizeof(str) || n < 0)
return (ISC_R_NOSPACE);
if (need_destroy)
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
static isc_result_t
return (ISC_R_NOMEMORY);
return (result);
return (ISC_R_SUCCESS);
isc_buffer_t *b;
isc_buffer_free(&b);
static isc_result_t
isc_buffer_t b;
unsigned int labels;
return (result);
return (result);
isc_buffer_putuint8(&b, 0);
return (result);
return (result);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int flags;
return (DNS_R_NXDOMAIN);
for (; i <= nlabels; i++) {
if (i == olabels)
return (DNS_R_BADDB);
return (result);
goto skip;
goto skip;
if (i < nlabels) {
(sigrdataset)) {
(sigrdataset);
if (i < nlabels) {
skip:
return (DNS_R_BADDB);
return (result);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
if (need_destroy)
static isc_result_t
INSIST(0);
return (ISC_R_UNEXPECTED);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_NOMEMORY);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
static isc_result_t
return (ISC_R_NOTIMPLEMENTED);
static isc_boolean_t
return (ISC_FALSE);
static isc_boolean_t
return (ISC_TRUE);
NULL,
dump,
NULL,
NULL,
static isc_result_t
isc_buffer_t b;
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_NOMEMORY);
goto cleanup_mctx;
goto cleanup_lock;
goto cleanup_origin;
isc_buffer_putuint8(&b, 0);
goto cleanup_origin;
goto cleanup_zonestr;
return (ISC_R_SUCCESS);
return (result);
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
static isc_result_t
return (ISC_R_NOMORE);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOMORE);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
return (ISC_R_NOTFOUND);
static isc_result_t
return (ISC_R_NOMORE);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOMORE);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
static isc_result_t
sizeof(sdb_rdatasetiter_t));
static isc_result_t
return (ISC_R_NOMORE);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOMORE);
return (ISC_R_SUCCESS);
rdataset);