cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * CDDL HEADER START
cb5caa98562cf06753163f558cbcfe30b8f4673adjl *
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * The contents of this file are subject to the terms of the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Common Development and Distribution License (the "License").
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * You may not use this file except in compliance with the License.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl *
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * or http://www.opensolaris.org/os/licensing.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * See the License for the specific language governing permissions
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * and limitations under the License.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl *
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * When distributing Covered Code, include this CDDL HEADER in each
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * If applicable, add the following below this CDDL HEADER, with the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * fields enclosed by brackets "[]" replaced with your own identifying
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * information: Portions Copyright [yyyy] [name of copyright owner]
cb5caa98562cf06753163f558cbcfe30b8f4673adjl *
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * CDDL HEADER END
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Use is subject to license terms.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#ifndef _NSCD_ADMIN_H
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#define _NSCD_ADMIN_H
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#pragma ident "%Z%%M% %I% %E% SMI"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#ifdef __cplusplus
cb5caa98562cf06753163f558cbcfe30b8f4673adjlextern "C" {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#endif
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#include "cache.h"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#include "nscd_common.h"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#include "nscd_config.h"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#define NSCD_LOGFILE_LEN 128
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * structure used for door call NSCD_GETADMIN and NSCD_GETPUADMIN
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct nscd_admin {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl int debug_level;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl char logfile[NSCD_LOGFILE_LEN];
cb5caa98562cf06753163f558cbcfe30b8f4673adjl nscd_cfg_cache_t cache_cfg[CACHE_CTX_COUNT];
cb5caa98562cf06753163f558cbcfe30b8f4673adjl nscd_cfg_stat_cache_t cache_stats[CACHE_CTX_COUNT];
cb5caa98562cf06753163f558cbcfe30b8f4673adjl} nscd_admin_t;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * structure used for door call NSCD_SETADMIN and NSCD_SETPUADMIN
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct nscd_admin_mod {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl int total_size;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl nscd_bool_t debug_level_set;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl nscd_bool_t logfile_set;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl uint8_t cache_cfg_set[CACHE_CTX_COUNT];
cb5caa98562cf06753163f558cbcfe30b8f4673adjl uint8_t cache_flush_set[CACHE_CTX_COUNT];
cb5caa98562cf06753163f558cbcfe30b8f4673adjl nscd_bool_t global_cfg_set;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl uint8_t cache_cfg_num;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl uint8_t cache_flush_num;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl int debug_level;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl char logfile[NSCD_LOGFILE_LEN];
cb5caa98562cf06753163f558cbcfe30b8f4673adjl nscd_cfg_cache_t cache_cfg[CACHE_CTX_COUNT];
cb5caa98562cf06753163f558cbcfe30b8f4673adjl} nscd_admin_mod_t;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#ifdef __cplusplus
cb5caa98562cf06753163f558cbcfe30b8f4673adjl}
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#endif
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjlint _nscd_client_getadmin(char opt);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlint _nscd_client_setadmin();
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_client_showstats();
cb5caa98562cf06753163f558cbcfe30b8f4673adjlnscd_rc_t _nscd_server_setadmin(nscd_admin_mod_t *set);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlint _nscd_door_getadmin(void *outbuf);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_door_setadmin(void *buf);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlint _nscd_add_admin_mod(char *dbname, char opt,
cb5caa98562cf06753163f558cbcfe30b8f4673adjl char *val, char *msg, int msglen);
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#endif /* _NSCD_ADMIN_H */