xref: /titanic_50/usr/src/lib/libnisdb/nis_db.h (revision 84f7a9b9dca4f23b5f50edef0e59d7eb44301114)
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 (c) 2001 by Sun Microsystems, Inc.
24  *	All rights reserved.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 #ifndef	_NIS_DB_H
30 #define	_NIS_DB_H
31 
32 #ifdef	__cplusplus
33 #include "db.h"
34 extern "C" {
35 #else
36 #include "db_c.h"
37 #endif	/* __cplusplus */
38 
39 #include "ldap_parse.h"
40 
41 extern int	useLDAPrespository;
42 
43 void		db_free_result(db_result *dr);
44 char		*entryName(char *msg, char *objName, char **tableP);
45 nis_object	*dbFindObject(char *objName, db_status *statP);
46 db_status	dbDeleteObj(char *objName);
47 db_status	dbTouchObj(char *objName);
48 db_status	dbRefreshObj(char *name, nis_object *o);
49 db_status	dbCreateFromLDAP(char *intName, int *ldapStat);
50 nis_object	*ldapFindObj(__nis_table_mapping_t *t, char *objName,
51 			int *statP);
52 nis_object	*findObj(char *name, db_status *statP, int *lstatP);
53 bool_t		isMaster(nis_object *o);
54 bool_t		replaceMappingObj(__nis_table_mapping_t *t, nis_object *n);
55 int		setMappingObjTypeEtc(__nis_table_mapping_t *t, nis_object *o);
56 int		loadAllLDAP(int fromLDAP, void *cookie, db_status *dstatP);
57 
58 #ifdef	__cplusplus
59 }
60 #endif	/* __cplusplus */
61 
62 #endif	/* _NIS_DB_H */
63