6811333 Remove prom_printf() message in emlxs driver
[opensolaris.git] / usr / src / lib / libnisdb / ldap_map.h
blob8db2065482d948a0e30c40b71b337eaa3719aa9d
1 /*
2 * CDDL HEADER START
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.
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]
20 * CDDL HEADER END
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"
29 #ifndef _LDAP_MAP_H
30 #define _LDAP_MAP_H
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"
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
43 extern __nis_hash_table_mt ldapMappingList;
45 typedef struct {
46 char *zo_owner;
47 char *zo_group;
48 char *zo_domain;
49 uint_t zo_access;
50 uint32_t zo_ttl;
51 } __nis_obj_attr_t;
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,
60 char *dbId);
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,
69 nis_result **outRes);
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);
88 #ifdef __cplusplus
90 #endif /* __cplusplus */
92 #endif /* _LDAP_MAP_H */