xref: /titanic_50/usr/src/cmd/ldapcachemgr/cachemgr.h (revision 1e1ddd6cc98ab5af8293f7ebd132be62900730fd)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_CACHEMGR_H
28 #define	_CACHEMGR_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #include "ns_sldap.h"
37 #include "ns_internal.h"
38 #include "ns_cache_door.h"
39 #include "cachemgr_door.h"
40 
41 #define	LOGFILE		"/var/ldap/cachemgr.log"
42 #define	KILLCACHEMGR	"/var/lib/ldap/ldap_cachemgr -K"
43 #define	MAXBITSIZE	30
44 #define	MAXDEBUG	DBG_ALL
45 #define	DEFAULTTTL	3600		/* 1 hour */
46 
47 typedef	union {
48 	ldap_data_t	data;
49 	char		space[BUFFERSIZE];
50 } dataunion;
51 
52 extern char *getcacheopt(char *s);
53 extern void logit(char *format, ...);
54 extern void do_update(ldap_call_t *in);
55 extern int load_admin_defaults(admin_t *ptr, int will_become_server);
56 extern int getldap_init(void);
57 extern void getldap_revalidate(void);
58 extern int getldap_uidkeepalive(int keep, int interval);
59 extern int getldap_invalidate(void);
60 extern void getldap_lookup(ldap_return_t *out, ldap_call_t *in);
61 extern void getldap_refresh(void);
62 extern int cachemgr_set_dl(admin_t *ptr, int value);
63 extern int cachemgr_set_ttl(ldap_stat_t *cache, char *name, int value);
64 extern int get_clearance(int callnumber);
65 extern int release_clearance(int callnumber);
66 #ifdef SLP
67 extern void discover();
68 #endif /* SLP */
69 extern void getldap_serverInfo_refresh(void);
70 extern void getldap_getserver(ldap_return_t *out, ldap_call_t *in);
71 extern void getldap_get_cacheData(ldap_return_t *out, ldap_call_t *in);
72 extern void getldap_set_cacheData(ldap_return_t *out, ldap_call_t *in);
73 extern void getldap_get_cacheStat(ldap_return_t *out);
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif /* _CACHEMGR_H */
79