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