xref: /titanic_44/usr/src/lib/libnisdb/nis_db.h (revision db8b037b5616a366b7dfdc01ef9552f02f9adfdd)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 
27 #ifndef	_NIS_DB_H
28 #define	_NIS_DB_H
29 
30 #ifdef	__cplusplus
31 #include "db.h"
32 extern "C" {
33 #else
34 #include "db_c.h"
35 #endif	/* __cplusplus */
36 
37 #include "ldap_parse.h"
38 
39 extern int	useLDAPrespository;
40 
41 void		db_free_result(db_result *dr);
42 char		*entryName(const char *msg, char *objName, char **tableP);
43 nis_object	*dbFindObject(char *objName, db_status *statP);
44 db_status	dbDeleteObj(char *objName);
45 db_status	dbTouchObj(char *objName);
46 db_status	dbRefreshObj(char *name, nis_object *o);
47 db_status	dbCreateFromLDAP(char *intName, int *ldapStat);
48 nis_object	*ldapFindObj(__nis_table_mapping_t *t, char *objName,
49 			int *statP);
50 nis_object	*findObj(char *name, db_status *statP, int *lstatP);
51 bool_t		replaceMappingObj(__nis_table_mapping_t *t, nis_object *n);
52 int		setMappingObjTypeEtc(__nis_table_mapping_t *t, nis_object *o);
53 int		loadAllLDAP(int fromLDAP, void *cookie, db_status *dstatP);
54 
55 #ifdef	__cplusplus
56 }
57 #endif	/* __cplusplus */
58 
59 #endif	/* _NIS_DB_H */
60