dirdb.c revision c0003bfcaffdb03cea7da20d47592c37b6a07fa9
/*
* Copyright (C) 2000 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dirdb.c,v 1.4 2000/11/18 01:29:10 bwelling Exp $ */
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/sysmacros.h>
/*
* A simple database driver that returns basic directory information.
*/
} while (0)
do { n = (op); \
if (n < 0) return (ISC_R_FAILURE); \
} while (0)
/*
* This database operates on relative names.
*
* Any name will be interpreted as a pathname offset from the directory
* specified in the configuration file.
*/
static isc_result_t
{
char filename[255];
char filename2[255];
char buf[1024];
int n;
else
"\"%sdev\" \"major %d\" \"minor %d\"",
buf[n] = 0;
filename2));
else {
}
return (ISC_R_SUCCESS);
}
/*
* lookup () does not return SOA or NS records, so authority() must be defined.
*/
static isc_result_t
return (ISC_R_SUCCESS);
}
/*
* Each database stores the top-level directory as the dbdata opaque
* object. The create() function allocates it. argv[0] holds the top
* level directory.
*/
static isc_result_t
void *driverdata, void **dbdata)
{
if (argc < 1)
return (ISC_R_FAILURE);
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
}
/*
* The destroy() function frees the memory allocated by create().
*/
static void
}
/*
* This zone does not support zone transfer, so allnodes() is NULL.
*/
static dns_sdbmethods_t dirdb_methods = {
NULL, /* allnodes */
};
/*
* Wrapper around dns_sdb_register(). Note that the first ns_g_mctx is
* being passed as the "driverdata" parameter, so that will it will be
* passed to create() and destroy().
*/
dirdb_init(void) {
unsigned int flags;
}
/*
* Wrapper around dns_sdb_unregister().
*/
void
dirdb_clear(void) {
}