6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / man / man3ldap / ldap_searchprefs.3ldap
blobb5301647aea5ddcd414769544b15d04331e1fb81
1 '\" te
2 .\" Copyright (C) 1990, Regents of the University of Michigan.  All Rights Reserved.
3 .\" Portions Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH LDAP_SEARCHPREFS 3LDAP "Jan 27, 2002"
8 .SH NAME
9 ldap_searchprefs, ldap_init_searchprefs, ldap_init_searchprefs_buf,
10 ldap_free_searchprefs, ldap_first_searchobj, ldap_next_searchobj \- LDAP search
11 preference configuration routeines
12 .SH SYNOPSIS
13 .LP
14 .nf
15 cc[ \fIflag\fR... ] \fIfile\fR... -lldap[ \fIlibrary\fR... ]
16 # include <lber.h>
17 # include <ldap.h>
19 \fBint\fR \fBldap_init_searchprefs\fR(\fBchar\fR \fI**file\fR,
20      \fBstruct ldap_searchobj\fR \fI***solistp\fR);
21 .fi
23 .LP
24 .nf
25 \fBint\fR \fBldap_init_searchprefs_buf\fR(\fBchar\fR \fI**buf\fR, \fBunsigned\fR \fIlonglen\fR,
26      \fBstruct ldap_searchobj\fR \fI**solistp\fR);
27 .fi
29 .LP
30 .nf
31 \fBstruct ldap_searchobj\fR \fB**ldap_free_searchprefs\fR
32      (\fBstruct ldap_searchobj\fR \fI**solist\fR);
33 .fi
35 .LP
36 .nf
37 \fBstruct ldap_searchobj\fR \fB**ldap_first_searchobj\fR
38      (\fBstruct ldap_seachobj\fR \fI**solist\fR);
39 .fi
41 .LP
42 .nf
43 \fBstruct ldap_searchobj\fR \fB**ldap_next_searchobj\fR
44      (\fBstruct ldap_seachobj\fR \fI**solist\fR, \fBstruct ldap_seachobj\fR \fI**so\fR);
45 .fi
47 .SH DESCRIPTION
48 .sp
49 .LP
50 These functions provide a standard way to access LDAP search preference
51 configuration data.  LDAP search preference configurations are typically used
52 by LDAP client programs to specify which attributes a user may search by,
53 labels for the attributes, and LDAP filters and scopes associated with those
54 searches.  Client software presents these choices to a user, who can then
55 specify the type of search to be performed.
56 .sp
57 .LP
58 \fBldap_init_searchprefs()\fR reads a sequence of search preference
59 configurations from a valid LDAP  searchpref configuration file. See
60 \fBldapsearchprefs.conf\fR(4). Upon success, \fB0\fR is returned and
61 \fIsolistp\fR is set to point to a list of search preference data structures.
62 .sp
63 .LP
64 \fBldap_init_searchprefs_buf()\fR reads a sequence of search preference
65 configurations from \fIbuf\fR, whose size is \fIbuflen.\fR \fIbuf\fR should
66 point to the data in the format defined for an LDAP search preference
67 configuration file. See  \fBldapsearchprefs.conf\fR(4). Upon success, \fB0\fR
68 is returned and \fIsolistp\fR is set to point to a list of search preference
69 data structures.
70 .sp
71 .LP
72 \fBldap_free_searchprefs()\fR disposes of the data structures allocated by
73 \fBldap_init_searchprefs()\fR.
74 .sp
75 .LP
76 \fBldap_first_searchpref()\fR returns the first search preference data
77 structure in the list \fIsolist.\fR The \fIsolist\fR is typically obtained by
78 calling \fBldap_init_searchprefs()\fR.
79 .sp
80 .LP
81 \fBldap_next_searchpref()\fR returns the search preference after \fIso\fR in
82 the template list \fIsolist.\fR A NULL pointer is returned if \fIso\fR is the
83 last entry in the list.
84 .SH ERRORS
85 .sp
86 .LP
87 \fBldap_init_search_prefs()\fR and \fBldap_init_search_prefs_bufs()\fR return:
88 .sp
89 .ne 2
90 .na
91 \fB\fBLDAP_SEARCHPREF_ERR_VERSION\fR\fR
92 .ad
93 .sp .6
94 .RS 4n
95 \fI**buf\fR points to data that is newer than can be handled.
96 .RE
98 .sp
99 .ne 2
101 \fB\fBLDAP_SEARCHPREF_ERR_MEM\fR\fR
103 .sp .6
104 .RS 4n
105 Memory allocation problem.
108 .SH ATTRIBUTES
111 See \fBattributes\fR(5) for a description of the following attributes:
116 box;
117 c | c
118 l | l .
119 ATTRIBUTE TYPE  ATTRIBUTE VALUE
120 Interface Stability     Evolving
123 .SH SEE ALSO
126 \fBldap\fR(3LDAP), \fBldapsearchprefs.conf\fR(4), \fBattributes\fR(5)
129 Yeong, W., Howes, T., and Hardcastle-Kille, S., "Lightweight Directory Access
130 Protocol", OSI-DS-26, April 1992.
133 Howes, T., Hardcastle-Kille, S., Yeong, W., and Robbins, C., "Lightweight
134 Directory Access Protocol", OSI-DS-26, April 1992.
137 Hardcastle-Kille, S., "A String Representation of Distinguished Names",
138 OSI-DS-23, April 1992.
141 Information Processing - Open Systems Interconnection - The Directory,
142 International Organization for Standardization.  International Standard 9594,
143 (1988).