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
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.
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]
23 * Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <rpcsvc/nis.h>
34 #include "ldap_parse.h"
35 #include "ldap_structs.h"
36 #include "nis_hashitem.h"
37 #include "db_query_c.h"
43 extern __nis_hash_table_mt ldapMappingList
;
53 /* Exported functions */
54 db_query
**mapFromLDAP(__nis_table_mapping_t
*t
, db_query
*qin
,
55 int *numQueries
, char *dbId
, int *ldapStat
,
56 __nis_obj_attr_t
***objAttr
);
57 int mapToLDAP(__nis_table_mapping_t
*t
, int numQueries
,
58 db_query
**oldQ
, db_query
**newQ
,
59 __nis_rule_value_t
*rvIn
, int firstOnly
,
61 int verifyIndexMatch(__nis_table_mapping_t
*x
,
62 db_query
*q
, __nis_rule_value_t
*rv
,
63 char *name
, char *val
);
64 __nis_table_mapping_t
**selectTableMapping(__nis_table_mapping_t
*t
,
65 db_query
*q
, int wantWrite
, int wantObj
,
66 char *dbId
, int *numMatches
);
67 int haveIndexedMapping(__nis_table_mapping_t
*t
);
68 int getNisPlusObj(char *objName
, char *msg
,
70 int objToLDAP(__nis_table_mapping_t
*t
, nis_object
*o
,
71 entry_obj
**ea
, int numEa
);
72 int objFromLDAP(__nis_table_mapping_t
*t
, nis_object
**o
,
73 entry_obj
***eaP
, int *numEaP
);
74 int deleteLDAPobj(__nis_table_mapping_t
*t
);
75 __nis_obj_attr_t
*ruleValue2ObjAttr(__nis_rule_value_t
*rv
);
76 void freeSingleObjAttr(__nis_obj_attr_t
*attr
);
77 void freeObjAttr(__nis_obj_attr_t
**attr
, int numAttr
);
78 __nis_obj_attr_t
*cloneObjAttr(__nis_obj_attr_t
*old
);
79 int isObjAttrString(char *str
);
80 char *isObjAttr(__nis_single_value_t
*val
);
81 int setObjAttrField(char *attrName
,
82 __nis_single_value_t
*val
,
83 __nis_obj_attr_t
**objAttr
);
84 int setColumnNames(__nis_table_mapping_t
*t
);
85 __nis_rule_value_t
*addObjAttr2RuleValue(nis_object
*obj
,
86 __nis_rule_value_t
*rvIn
);
90 #endif /* __cplusplus */
92 #endif /* _LDAP_MAP_H */