confview.c revision 98c2f9a11185b8a5dd601798990612beb6d1578e
/*
* Copyright (C) 1999, 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: confview.c,v 1.30 2000/06/02 15:12:31 brister Exp $ */
#include <config.h>
#include <dns/confview.h>
#include "confpvt.h"
/*
** Due to the repetive nature of the fields in a view
** we have here a collection of macros to used in defining
** Three functions are created: set, get and unset.
**
** In all the macros FUNC is a character sequence that is used in
** constructing the final function name. FIELD is the field in the view.
*/
#ifdef PVT_CONCAT
#endif
#define PVT_CONCAT(x,y) x ## y
/*
** The SET, GET and UNSETBYTYPE macros are all used whene the field in the
** view is a pointer to a fundamental type that requires no special copying,
** such as integers or booleans.
*/
\
\
return (ISC_R_NOMEMORY); \
} \
} else { \
} \
\
\
}
\
return (ISC_R_NOTFOUND); \
} else { \
return (ISC_R_SUCCESS); \
} \
}
\
return (ISC_R_NOTFOUND); \
} else { \
\
return (ISC_R_SUCCESS); \
} \
}
/*
** Now SET, GET and UNSET for dns_c_ipmatchlist_t fields
*/
{ \
\
} \
\
return (ISC_R_SUCCESS); \
}
\
return (ISC_R_SUCCESS); \
} else { \
return (ISC_R_NOTFOUND); \
} \
}
{ \
\
\
return (ISC_R_SUCCESS); \
} else { \
return (ISC_R_NOTFOUND); \
} \
}
"Out of memory");
return (ISC_R_NOMEMORY);
}
return (ISC_R_SUCCESS);
}
return (ISC_R_SUCCESS);
}
void
{
}
}
void
}
void
}
isc_result_t r;
r = dns_c_view_delete(&elem);
if (r != ISC_R_SUCCESS) {
"failed to delete view");
return (r);
}
}
return (ISC_R_SUCCESS);
}
const char *viewname,
{
break;
}
}
}
}
const char *name)
{
if (res == ISC_R_SUCCESS) {
}
return (res);
}
"view 'fetch-glue' is not yet "
"implemented");
"view 'notify' is not yet "
"implemented");
"view 'rfc2308-type1' is not yet "
"implemented");
"view 'rfc2308-type1' is not yet "
"implemented");
"view 'max-ncache-ttl' is not yet "
"implemented");
"view 'max-cache-ttl' is not yet "
"implemented");
"view 'lame-ttl' is not yet "
"implemented");
"view 'min-roots' is not yet "
"implemented");
"view 'rrset-order' is not yet "
"implemented");
}
return (result);
}
/* ***************************************************************** */
/* ***************************************************************** */
/* ***************************************************************** */
/* ***************************************************************** */
{
return (ISC_R_NOMEMORY);
}
"Insufficient memory");
return (ISC_R_NOMEMORY);
}
#if 0
#endif
return (ISC_R_SUCCESS);
}
void
}
\
\
\
if (port == 0) { \
} else { \
} \
}
}
}
}
}
}
}
view->forwarders);
}
view->also_notify);
}
}
}
}
}
}
ISC_TRUE));
}
}
}
}
#if 0
#endif
}
}
#define FREEIPMLIST(FIELD) \
} } while (0)
} } while (0)
}
}
}
}
#if 0
#endif
return (ISC_R_SUCCESS);
}
if (res == ISC_R_SUCCESS) {
}
}
return rval;
}
return (ISC_R_SUCCESS);
}
return (ISC_R_SUCCESS);
}
/*
**
*/
if (res != ISC_R_SUCCESS) {
return (res);
}
}
}
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
/*
**
*/
/*
**
*/
{
}
if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
if (res == ISC_R_SUCCESS) {
} else {
return (res);
}
}
return (ISC_R_SUCCESS);
} else {
return (ISC_R_NOTFOUND);
}
}
{
}
/*
**
*/
{
}
}
return (ISC_R_SUCCESS);
} else {
return (ISC_R_NOTFOUND);
}
}
{
}
/*
**
*/
{
if (copy) {
if (res != ISC_R_SUCCESS) {
return (res);
}
} else {
}
} else {
}
res = ISC_R_SUCCESS;
}
res = ISC_R_EXISTS;
}
return (res);
}
{
}
{
return (ISC_R_SUCCESS);
} else {
return (ISC_R_NOTFOUND);
}
}
/*
**
**
*/
{
switch(transtype) {
case dns_trans_primary:
case dns_trans_secondary:
case dns_trans_response:
break;
default:
"bad transport value: %d", transtype);
return (ISC_R_FAILURE);
}
if (!existed) {
}
}
{
switch (transtype) {
case dns_trans_primary:
case dns_trans_secondary:
case dns_trans_response:
break;
default:
"bad transport value: %d", transtype);
return (ISC_R_FAILURE);
}
} else {
}
return (result);
}
{
switch(transtype) {
case dns_trans_primary:
case dns_trans_secondary:
case dns_trans_response:
break;
default:
"bad transport value: %d", transtype);
return (ISC_R_FAILURE);
}
return (ISC_R_NOTFOUND);
}
return (ISC_R_SUCCESS);
}
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
}
return (ISC_R_SUCCESS);
}
return (ISC_R_SUCCESS);
} else {
return (ISC_R_NOTFOUND);
}
}
/*
**
*/
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
return (ISC_R_SUCCESS);
} else {
return (ISC_R_FAILURE);
}
}
}
return (ISC_R_SUCCESS);
}
/*
**
*/
return (ISC_R_NOTFOUND);
} else {
/* XXX need to replace above line with
dns_tkeylist_attach(view->trusted_keys, retval);
*/
return (ISC_R_SUCCESS);
}
}
/* XXX need to replace above line with
dns_peerlist_detach(&view->trusted_keys);
*/
return (ISC_R_SUCCESS);
} else {
return (ISC_R_FAILURE);
}
}
{
}
/* XXX need to replace below stuff with
dns_peerlist_attach(newval, &view->trusted_keys);
*/
if (copy) {
if (res != ISC_R_SUCCESS) {
return (res);
}
} else {
}
}
/*
**
*/
#if 0
/*
* XXX waiting for implementation in server to turn these on.
*/
#endif