1*cb5caa98Sdjl /* 2*cb5caa98Sdjl * CDDL HEADER START 3*cb5caa98Sdjl * 4*cb5caa98Sdjl * The contents of this file are subject to the terms of the 5*cb5caa98Sdjl * Common Development and Distribution License (the "License"). 6*cb5caa98Sdjl * You may not use this file except in compliance with the License. 7*cb5caa98Sdjl * 8*cb5caa98Sdjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*cb5caa98Sdjl * or http://www.opensolaris.org/os/licensing. 10*cb5caa98Sdjl * See the License for the specific language governing permissions 11*cb5caa98Sdjl * and limitations under the License. 12*cb5caa98Sdjl * 13*cb5caa98Sdjl * When distributing Covered Code, include this CDDL HEADER in each 14*cb5caa98Sdjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*cb5caa98Sdjl * If applicable, add the following below this CDDL HEADER, with the 16*cb5caa98Sdjl * fields enclosed by brackets "[]" replaced with your own identifying 17*cb5caa98Sdjl * information: Portions Copyright [yyyy] [name of copyright owner] 18*cb5caa98Sdjl * 19*cb5caa98Sdjl * CDDL HEADER END 20*cb5caa98Sdjl */ 21*cb5caa98Sdjl /* 22*cb5caa98Sdjl * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*cb5caa98Sdjl * Use is subject to license terms. 24*cb5caa98Sdjl */ 25*cb5caa98Sdjl 26*cb5caa98Sdjl #ifndef _NSCD_ADMIN_H 27*cb5caa98Sdjl #define _NSCD_ADMIN_H 28*cb5caa98Sdjl 29*cb5caa98Sdjl #pragma ident "%Z%%M% %I% %E% SMI" 30*cb5caa98Sdjl 31*cb5caa98Sdjl #ifdef __cplusplus 32*cb5caa98Sdjl extern "C" { 33*cb5caa98Sdjl #endif 34*cb5caa98Sdjl 35*cb5caa98Sdjl #include "cache.h" 36*cb5caa98Sdjl #include "nscd_common.h" 37*cb5caa98Sdjl #include "nscd_config.h" 38*cb5caa98Sdjl 39*cb5caa98Sdjl #define NSCD_LOGFILE_LEN 128 40*cb5caa98Sdjl 41*cb5caa98Sdjl /* 42*cb5caa98Sdjl * structure used for door call NSCD_GETADMIN and NSCD_GETPUADMIN 43*cb5caa98Sdjl */ 44*cb5caa98Sdjl typedef struct nscd_admin { 45*cb5caa98Sdjl int debug_level; 46*cb5caa98Sdjl char logfile[NSCD_LOGFILE_LEN]; 47*cb5caa98Sdjl nscd_cfg_cache_t cache_cfg[CACHE_CTX_COUNT]; 48*cb5caa98Sdjl nscd_cfg_stat_cache_t cache_stats[CACHE_CTX_COUNT]; 49*cb5caa98Sdjl } nscd_admin_t; 50*cb5caa98Sdjl 51*cb5caa98Sdjl /* 52*cb5caa98Sdjl * structure used for door call NSCD_SETADMIN and NSCD_SETPUADMIN 53*cb5caa98Sdjl */ 54*cb5caa98Sdjl typedef struct nscd_admin_mod { 55*cb5caa98Sdjl int total_size; 56*cb5caa98Sdjl nscd_bool_t debug_level_set; 57*cb5caa98Sdjl nscd_bool_t logfile_set; 58*cb5caa98Sdjl uint8_t cache_cfg_set[CACHE_CTX_COUNT]; 59*cb5caa98Sdjl uint8_t cache_flush_set[CACHE_CTX_COUNT]; 60*cb5caa98Sdjl nscd_bool_t global_cfg_set; 61*cb5caa98Sdjl uint8_t cache_cfg_num; 62*cb5caa98Sdjl uint8_t cache_flush_num; 63*cb5caa98Sdjl int debug_level; 64*cb5caa98Sdjl char logfile[NSCD_LOGFILE_LEN]; 65*cb5caa98Sdjl nscd_cfg_cache_t cache_cfg[CACHE_CTX_COUNT]; 66*cb5caa98Sdjl } nscd_admin_mod_t; 67*cb5caa98Sdjl 68*cb5caa98Sdjl #ifdef __cplusplus 69*cb5caa98Sdjl } 70*cb5caa98Sdjl #endif 71*cb5caa98Sdjl 72*cb5caa98Sdjl int _nscd_client_getadmin(char opt); 73*cb5caa98Sdjl int _nscd_client_setadmin(); 74*cb5caa98Sdjl void _nscd_client_showstats(); 75*cb5caa98Sdjl nscd_rc_t _nscd_server_setadmin(nscd_admin_mod_t *set); 76*cb5caa98Sdjl int _nscd_door_getadmin(void *outbuf); 77*cb5caa98Sdjl void _nscd_door_setadmin(void *buf); 78*cb5caa98Sdjl int _nscd_add_admin_mod(char *dbname, char opt, 79*cb5caa98Sdjl char *val, char *msg, int msglen); 80*cb5caa98Sdjl 81*cb5caa98Sdjl #endif /* _NSCD_ADMIN_H */ 82