cachemgr.h revision b57459abfba36eb3068cfe44c6921168b4c4f774
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * CDDL HEADER START
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * The contents of this file are subject to the terms of the
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * Common Development and Distribution License (the "License").
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * You may not use this file except in compliance with the License.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * See the License for the specific language governing permissions
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * and limitations under the License.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * When distributing Covered Code, include this CDDL HEADER in each
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * If applicable, add the following below this CDDL HEADER, with the
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * fields enclosed by brackets "[]" replaced with your own identifying
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * information: Portions Copyright [yyyy] [name of copyright owner]
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * CDDL HEADER END
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * Use is subject to license terms.
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts#define KILLCACHEMGR "/var/lib/ldap/ldap_cachemgr -K"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fostertypedef union {
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * In ldap_cachemgr, it return -99 for some case, start with -100 here
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fostertypedef struct waiting_list {
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster /* thread */
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster /* cleaned up */
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster struct waiting_list *prev; /* previous node in the */
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster /* linked list */
57a1b25dcdf865eacb2fe2e17c5ca83e942da047David Luna struct waiting_list *next; /* next node in the linked */
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer * This structure contains the buffer for the chang data and a wating list to
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer * regester all the threads that handle GETSTATUSCHANGE START call and are
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer * waiting for the change notification.
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer * The notification threads save the data in the buffer then send broadcast
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer * to wake up the GETSTATUSCHANGE START threads to copy data to the stack and
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer * door_return().
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packertypedef struct chg_info {
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer mutex_t chg_lock; /* mutex for this data structure */
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer cond_t chg_cv; /* cond var for synchronization */
be34d3a7cf588cb751d61e9acc86f1ff328e0344ian.packer /* synchronization */
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster waiting_list_t *chg_w_first; /* the head of the linked list */
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster waiting_list_t *chg_w_last; /* the tail of the linked list */
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster char *chg_data; /* the buffer for the change data */
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster int chg_data_size; /* the size of the change data */
} chg_info_t;
extern char *getcacheopt(char *s);
extern int getldap_init(void);
extern void getldap_revalidate(void);
extern int getldap_invalidate(void);
extern void getldap_refresh(void);
#ifdef SLP
extern void discover();
extern void getldap_serverInfo_refresh(void);
#ifdef __cplusplus