conflog.c revision 15a44745412679c30a6d022733925af70a38b715
/*
* 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: conflog.c,v 1.17 2000/07/27 09:47:05 tale Exp $ */
#include <config.h>
#include "confpvt.h"
/*
* Bit positions in the dns_c_logchan_t structure setflags field.
*/
#define CHAN_VERSIONS_BIT 0
#define CHAN_SIZE_BIT 1
#define CHAN_SEVERITY_BIT 2
#define CHAN_DEBUG_LEVEL_BIT 3
#define CHAN_PCAT_BIT 4
#define CHAN_PSEV_BIT 5
#define CHAN_PTIME_BIT 6
#define CHAN_FACILITY_BIT 7
static void
static void
static isc_boolean_t
return (ISC_R_NOMEMORY);
}
return (ISC_R_SUCCESS);
}
l = *list;
if (res != ISC_R_SUCCESS) {
return (res);
}
}
if (res != ISC_R_SUCCESS) {
return (res);
}
}
l->magic = 0;
isc_mem_put(l->mem, l, sizeof *l);
return (ISC_R_SUCCESS);
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
if (res != ISC_R_SUCCESS) {
return (res);
}
}
if (res != ISC_R_SUCCESS) {
return (res);
}
}
return (ISC_R_SUCCESS);
}
static isc_boolean_t
if (!logchan->predefined) {
return ISC_FALSE;
}
}
if (!logcat->predefined) {
return ISC_FALSE;
}
}
return ISC_TRUE;
}
void
{
if (logginglist_empty(ll)) {
return;
}
}
}
}
{
if (deepcopy) {
if (res != ISC_R_SUCCESS) {
return (res);
}
} else {
}
if (res != ISC_R_SUCCESS) {
if (deepcopy) {
}
return (res);
}
break;
}
}
/* replacing a predefined channel is a plain success. */
}
{
if (deepcopy) {
if (res != ISC_R_SUCCESS) {
return (res);
}
} else {
}
/* Remove old category defintion if there. */
if (res != ISC_R_SUCCESS) {
if (deepcopy) {
}
return (res);
}
break;
}
}
/* replacing a predefined category is a simple success. */
}
const char *name)
{
if (res == ISC_R_SUCCESS) {
}
return (res);
}
const char *name)
{
if (res == ISC_R_SUCCESS) {
}
return (res);
}
const char *name,
{
break;
}
}
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
const char *name,
{
break;
}
}
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
#if 0
{
break;
}
}
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
#endif
/* ************************************************************************ */
/* **************************** LOGGING CHANNELS ************************** */
/* ************************************************************************ */
{
return (ISC_R_NOMEMORY);
}
newc->debug_level = 0;
return (ISC_R_NOMEMORY);
}
switch (ctype) {
case dns_c_logchan_file:
break;
case dns_c_logchan_syslog:
case dns_c_logchan_null:
case dns_c_logchan_stderr:
break;
}
return (ISC_R_SUCCESS);
}
case dns_c_logchan_file:
}
break;
case dns_c_logchan_syslog:
case dns_c_logchan_null:
case dns_c_logchan_stderr:
break;
}
return (ISC_R_SUCCESS);
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
case dns_c_logchan_file:
break;
case dns_c_logchan_syslog:
break;
case dns_c_logchan_null:
case dns_c_logchan_stderr:
break;
}
return (ISC_R_SUCCESS);
}
void
{
return;
}
case dns_c_logchan_file:
} else {
}
}
}
break;
case dns_c_logchan_syslog:
break;
case dns_c_logchan_null:
break;
case dns_c_logchan_stderr:
break;
}
}
}
}
}
}
}
"This type of channel doesn't have a "
"path field");
return (ISC_R_FAILURE);
}
}
return (ISC_R_NOMEMORY);
} else {
}
}
"This type of channel doesn't have a "
"version field");
return (ISC_R_FAILURE);
}
}
"This type of channel doesn't have a "
"size field");
return (ISC_R_FAILURE);
}
}
"This type of channel doesn't have a "
"facility field");
return (ISC_R_FAILURE);
}
"Not a legal facility for a syslog channel: %d",
facility);
return (ISC_R_FAILURE);
}
}
{
}
} else {
return (ISC_R_FAILURE);
}
}
}
}
}
return (ISC_R_SUCCESS);
}
res = ISC_R_SUCCESS;
} else {
res = ISC_R_FAILURE;
}
return (res);
}
res = ISC_R_SUCCESS;
} else {
res = ISC_R_FAILURE;
}
return (res);
}
res = ISC_R_SUCCESS;
} else {
res = ISC_R_FAILURE;
}
return (res);
}
res = ISC_R_SUCCESS;
} else {
res = ISC_R_FAILURE;
}
return (res);
}
{
res = ISC_R_SUCCESS;
} else {
}
return (res);
}
res = ISC_R_SUCCESS;
} else {
}
return (res);
}
res = ISC_R_SUCCESS;
} else {
}
return (res);
}
res = ISC_R_SUCCESS;
} else {
}
return (res);
}
res = ISC_R_SUCCESS;
} else {
}
return (res);
}
return (ISC_R_SUCCESS);
}
/*
* Logging category
*/
unsigned int i;
return (ISC_R_NOMEMORY);
}
sizeof (char *) * newc->cnames_len);
return (ISC_R_NOMEMORY);
}
for (i = 0 ; i < newc->cnames_len ; i++) {
}
return (ISC_R_SUCCESS);
}
unsigned int i;
return (ISC_R_SUCCESS);
}
}
sizeof (char *) * logc->cnames_len);
return (ISC_R_SUCCESS);
}
unsigned int i;
if (res != ISC_R_SUCCESS) {
return (res);
}
if (res != ISC_R_SUCCESS) {
return (res);
}
}
return (ISC_R_SUCCESS);
}
void
{
unsigned int i;
return;
}
}
}
unsigned int i;
newsize * sizeof (char *));
return (ISC_R_NOMEMORY);
}
for (i = 0 ; i < newsize ; i++) {
if (i < logcat->cnames_len) {
} else {
}
}
sizeof (char *) * logcat->cnames_len);
}
return (ISC_R_NOMEMORY);
}
return (ISC_R_SUCCESS);
}
unsigned int i ;
break;
}
}
res = ISC_R_SUCCESS;
i++;
}
} else {
}
return (res);
}
return (ISC_R_SUCCESS);
}
return (ISC_R_SUCCESS);
}
/***************************************************************************/
static void
}
static void
}