8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libnisdb / ldap_structs.h
blob66713cdf9dff2476e9c9580bddc360d21f6c956c
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 #ifndef _LDAP_STRUCTS_H
28 #define _LDAP_STRUCTS_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/time.h>
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
39 * Some functions accept a pointer to either a __nis_mapping_item_t, or
40 * a __nis_value_t. This enum tells us which it is.
42 typedef enum {fa_any, fa_item, fa_value} __nis_format_arg_t;
45 * A __nis_value_t contains either string (vt_string) or non-string
46 * (vt_ber) values.
48 typedef enum {vt_any, vt_string, vt_ber} __nis_value_type_t;
50 /* A single value. If the value is a (char *), the length includes the NUL */
51 typedef struct {
52 int length;
53 void *value;
54 } __nis_single_value_t;
57 * Holds multiple values of the specified type.
59 typedef struct {
60 __nis_value_type_t type;
61 int repeat; /* Should value be repeated ? */
62 int numVals;
63 __nis_single_value_t *val;
64 } __nis_value_t;
66 /* Structure used to build rule values */
67 typedef struct {
68 int numColumns; /* Number of col names/vals */
69 char **colName; /* Column names */
70 __nis_value_t *colVal; /* Column values */
71 int numAttrs; /* Number of attr names vals */
72 char **attrName; /* Attribute names */
73 __nis_value_t *attrVal; /* Attribute values */
74 } __nis_rule_value_t;
76 /* Structure containing information that ldap_search_s() wants */
77 typedef struct {
78 unsigned char useCon; /* Should we use existing connection ? */
79 char *base;
80 int scope;
81 int numFilterComps;
82 char **filterComp;
83 char *filter;
84 int numAttrs;
85 char **attrs;
86 int attrsonly;
87 int isDN;
88 struct timeval timeout;
89 } __nis_ldap_search_t;
91 #ifdef __cplusplus
93 #endif
95 #endif /* _LDAP_STRUCTS_H */