confview.c revision da47a1b89683200737dbc5b750d44fbe2e1991b6
/*
* 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.16 2000/03/28 22:58:24 brister Exp $ */
#include <config.h>
#include <isc/assertions.h>
#include <dns/confzone.h>
#include <dns/confcommon.h>
#include <dns/confview.h>
#include <dns/confzone.h>
#include "confpvt.h"
#define CHECKNAME_PRIM_BIT 1
#define CHECKNAME_SEC_BIT 2
#define CHECKNAME_RESP_BIT 3
#define MULTIPLE_CNAMES_BIT 4
#define DIALUP_BIT 5
#define FETCH_GLUE_BIT 6
#define HAS_OLD_CLIENTS_BIT 7
#define HOST_STATISTICS_BIT 8
#define MAINTAIN_IXFR_BASE_BIT 9
#define NOTIFY_BIT 11
#define RECURSION_BIT 12
#define RFC2308_TYPE1_BIT 13
#define USE_ID_POOL_BIT 14
#define FAKE_IQUERY_BIT 15
#define USE_IXFR_BIT 16
#define TCP_CLIENTS_BIT 17
#define RECURSIVE_CLIENTS_BIT 18
#define CLEAN_INTERVAL_BIT 19
#define MAX_LOG_SIZE_IXFR_BIT 20
#define MAX_NCACHE_TTL_BIT 21
#define MAX_TRANSFER_TIME_IN_BIT 22
#define MAX_TRANSFER_TIME_OUT_BIT 23
#define MAX_TRANSFER_IDLE_IN_BIT 24
#define MAX_TRANSFER_IDLE_OUT_BIT 25
#define STATS_INTERVAL_BIT 26
#define TRANSFERS_IN_BIT 27
#define TRANSFERS_OUT_BIT 28
#define TRANSFERS_PER_NS_BIT 29
#define TRANSFER_FORMAT_BIT 30
{
"Out of memory");
return (ISC_R_NOMEMORY);
}
return (ISC_R_SUCCESS);
}
{
return (ISC_R_SUCCESS);
}
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);
}
{
int i;
return (ISC_R_NOMEMORY);
}
/* XXXJAB not portable -- should set each field */
for (i = 0 ; i < DNS_C_TRANSCOUNT ; i++) {
}
view->clean_interval = 0;
view->max_log_size_ixfr = 0;
view->max_ncache_ttl = 0;
view->max_transfer_time_in = 0;
view->max_transfer_time_out = 0;
view->max_transfer_idle_in = 0;
view->max_transfer_idle_out = 0;
view->stats_interval = 0;
view->transfers_in = 0;
view->transfers_out = 0;
view->transfers_per_ns = 0;
"Insufficient memory");
}
return (ISC_R_SUCCESS);
}
void
{
}
}
void
{
view->allowquery);
}
view->transferacl);
}
view->recursionacl);
}
}
}
view->forwarders);
}
}
}
}
ISC_TRUE),
ISC_TRUE));
}
ISC_TRUE),
ISC_TRUE));
}
ISC_TRUE),
ISC_TRUE));
}
ISC_TRUE));
}
/* XXXJAB rest of view fields */
}
}
{
}
if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
}
if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
}
if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
}
if (deepcopy) {
ipml);
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
}
if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
}
if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
if (res == ISC_R_SUCCESS) {
} else {
return (res);
}
}
{
}
if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
}
if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
isc_result_t r;
r = ISC_R_SUCCESS;
} else {
if (r != ISC_R_SUCCESS) {
return (r);
}
}
return (r);
}
{
}
}
return (ISC_R_SUCCESS);
}
{
return (ISC_R_SUCCESS);
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
}
}
{
if (copy) {
if (res != ISC_R_SUCCESS) {
return (res);
}
} else {
}
} else {
}
res = ISC_R_SUCCESS;
}
res = ISC_R_EXISTS;
}
return (res);
}
{
}
}
{
switch(transtype) {
case dns_trans_primary:
break;
case dns_trans_secondary:
break;
case dns_trans_response:
break;
default:
"bad transport value: %d", transtype);
return (ISC_R_FAILURE);
}
}
{
switch (transtype) {
case dns_trans_primary:
break;
case dns_trans_secondary:
break;
case dns_trans_response:
break;
default:
"bad transport value: %d", transtype);
return (ISC_R_FAILURE);
}
if (isset) {
res = ISC_R_SUCCESS;
} else {
}
return (res);
}
{
}
{
return (ISC_R_NOTFOUND);
}
return (ISC_R_SUCCESS);
}