8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libnisdb / yptol / dit_access_utils.h
bloba0364c7cd68e29d682af030f830b46e32b334b3b
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
25 #ifndef _DIT_ACCESS_UTILS_H
26 #define _DIT_ACCESS_UTILS_H
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 #ifndef ERROR
33 #define ERROR -1
34 #endif
36 /* Keywords */
37 #define N2LKEY "rf_key"
38 #define N2LIPKEY "rf_ipkey"
39 #define N2LSEARCHKEY "rf_searchkey"
40 #define N2LSEARCHIPKEY "rf_searchipkey"
41 #define N2LDOMAIN "rf_domain"
42 #define N2LCOMMENT "rf_comment"
44 /* libldap ignores usec. Hence using 1 sec timeout */
45 #define SINGLE_ACCESS_TIMEOUT_SEC 1
46 #define SINGLE_ACCESS_TIMEOUT_USEC 0
48 extern __yp_domain_context_t ypDomains;
50 extern char *getFullMapName(char *map, char *domain);
51 extern __nis_value_t *stringToValue(char *dptr, int dsize);
52 extern __nis_rule_value_t *processSplitField(__nis_table_mapping_t *sf,
53 __nis_value_t *inVal, int *nv, int *statP);
54 extern __nis_rule_value_t *datumToRuleValue(datum *key, datum *value,
55 __nis_table_mapping_t *t, int *nv,
56 char *domain, bool_t readonly, int *statP);
57 extern __nis_table_mapping_t *mappingFromMap(char *map, char *domain,
58 int *statP);
59 extern bool_t singleReadFromDIT(char *map, char *domain,
60 datum *key,
61 datum *value, int *statP);
62 extern suc_code singleWriteToDIT(char *map, char *domain,
63 datum *key, datum *value, bool_t replace);
64 extern suc_code buildNISRuleValue(__nis_table_mapping_t *t,
65 __nis_rule_value_t *rv, char *domain);
66 extern suc_code addSplitFieldValues(__nis_table_mapping_t *t,
67 __nis_rule_value_t *rv, __nis_rule_value_t *trv,
68 int numVals, char *domain);
69 extern datum *ruleValueToDatum(__nis_table_mapping_t *t,
70 __nis_rule_value_t *rv, int *statP);
71 extern datum *getKeyFromRuleValue(__nis_table_mapping_t *t,
72 __nis_rule_value_t *rv, int *nv, int *statP,
73 bool_t xlate_to_lcase);
74 extern const char *getObjectClass(char *rdn);
75 extern suc_code makeNISObject(char *domain, char *dn);
76 extern suc_code addNISObject(char *domain, char *dn,
77 int *ldap_rc);
78 extern suc_code addParent(char *dn, char **attr);
79 extern bool_t is_fatal_error(int res);
80 extern suc_code alloc_temp_names(char *name,
81 char **temp_entries, char **temp_ttl);
82 extern suc_code collapseRuleValue(__nis_rule_value_t *rv);
84 #ifdef __cplusplus
86 #endif
88 #endif /* _DIT_ACCESS_UTILS_H */