sdb.c revision ab023a65562e62b85a824509d829b6fad87e00b1
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * Permission to use, copy, modify, and distribute this software for any
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * purpose with or without fee is hereby granted, provided that the above
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * copyright notice and this permission notice appear in all copies.
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington * PERFORMANCE OF THIS SOFTWARE.
fa342c624a5e7df0d10ef34586f8cfffbcd92c69Brian Wellington/* $Id: sdb.c,v 1.48 2005/04/27 04:56:51 sra Exp $ */
#include <config.h>
#include <string.h>
#include "rdatalist_p.h"
struct dns_sdbimplementation {
void *driverdata;
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 {
static int dummy;
DNS_SDBFLAG_THREADSAFE)) == 0);
return (ISC_R_NOMEMORY);
goto cleanup_mctx;
goto cleanup_mutex;
return (ISC_R_SUCCESS);
return (result);
unsigned int size;
return (size);
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 (ISC_R_UNEXPECTED);
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
return (DNS_R_NXDOMAIN);
if (i < nlabels) {
(sigrdataset);
if (i < nlabels) {
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_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);
dump,
find,
NULL,
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,
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);