xref: /onnv-gate/usr/src/lib/libldap5/sources/ldap/common/llib-lldap (revision 0:68f95e015346)
1*0Sstevel@tonic-gate/* LINTLIBRARY */
2*0Sstevel@tonic-gate/* PROTOLIB1 */
3*0Sstevel@tonic-gate
4*0Sstevel@tonic-gate/*
5*0Sstevel@tonic-gate * Copyright 2001, 2003 Sun Microsystems, Inc.  All rights reserved.
6*0Sstevel@tonic-gate * Use is subject to license terms.
7*0Sstevel@tonic-gate */
8*0Sstevel@tonic-gate
9*0Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
10*0Sstevel@tonic-gate
11*0Sstevel@tonic-gate#include <stdio.h>
12*0Sstevel@tonic-gate#include <sys/types.h>
13*0Sstevel@tonic-gate#include <lber.h>
14*0Sstevel@tonic-gate#include <ldap.h>
15*0Sstevel@tonic-gate
16*0Sstevel@tonic-gate
17*0Sstevel@tonic-gate/*
18*0Sstevel@tonic-gate * in abandon.c:
19*0Sstevel@tonic-gate */
20*0Sstevel@tonic-gateint ldap_abandon_ext(LDAP *ld, int msgid, LDAPControl **serverctrls, LDAPControl ** clientctrls);
21*0Sstevel@tonic-gate
22*0Sstevel@tonic-gateint ldap_abandon( LDAP *ld, int msgid );
23*0Sstevel@tonic-gate
24*0Sstevel@tonic-gate/*
25*0Sstevel@tonic-gate * in add.c:
26*0Sstevel@tonic-gate */
27*0Sstevel@tonic-gateint ldap_add_ext( LDAP *ld, const char *dn, LDAPMod **attrs, LDAPControl ** serverctrls, LDAPControl **clientctrls, int *msgidp);
28*0Sstevel@tonic-gate
29*0Sstevel@tonic-gateint ldap_add_ext_s( LDAP *ld, const char *dn, LDAPMod **attrs, LDAPControl ** serverctrls, LDAPControl **clientctrls);
30*0Sstevel@tonic-gate
31*0Sstevel@tonic-gateint ldap_add( LDAP *ld, const char *dn, LDAPMod **attrs );
32*0Sstevel@tonic-gateint ldap_add_s( LDAP *ld, const char *dn, LDAPMod **attrs );
33*0Sstevel@tonic-gate
34*0Sstevel@tonic-gate/*
35*0Sstevel@tonic-gate * in bind.c:
36*0Sstevel@tonic-gate */
37*0Sstevel@tonic-gateint ldap_bind(LDAP *ld, const char *dn, const char *passwd, int authmethod);
38*0Sstevel@tonic-gateint ldap_bind_s(LDAP *ld, const char *dn, const char *passwd, int authmethod);
39*0Sstevel@tonic-gatevoid ldap_set_rebind_proc(LDAP *ld, LDAP_REBINDPROC_CALLBACK *rebindproc, void *arg);
40*0Sstevel@tonic-gate
41*0Sstevel@tonic-gate/*
42*0Sstevel@tonic-gate * in sbind.c:
43*0Sstevel@tonic-gate */
44*0Sstevel@tonic-gateint ldap_simple_bind( LDAP *ld, const char *dn, const char *passwd );
45*0Sstevel@tonic-gateint ldap_simple_bind_s( LDAP *ld, const char *dn, const char *passwd );
46*0Sstevel@tonic-gate
47*0Sstevel@tonic-gate/*
48*0Sstevel@tonic-gate * in saslbind.c:
49*0Sstevel@tonic-gate */
50*0Sstevel@tonic-gateint ldap_sasl_bind(LDAP *ld, const char *dn, const char *mechanism, const struct berval *cred, LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp);
51*0Sstevel@tonic-gate
52*0Sstevel@tonic-gateint ldap_sasl_bind_s(LDAP *ld, const char *dn, const char *mechanism, const struct berval *cred, LDAPControl **serverctrls, LDAPControl **clientctrls, struct berval **servercredp);
53*0Sstevel@tonic-gate
54*0Sstevel@tonic-gate/*
55*0Sstevel@tonic-gate * in kbind.c:
56*0Sstevel@tonic-gate */
57*0Sstevel@tonic-gate
58*0Sstevel@tonic-gate/*
59*0Sstevel@tonic-gate * in cache.c
60*0Sstevel@tonic-gate */
61*0Sstevel@tonic-gate
62*0Sstevel@tonic-gate/*
63*0Sstevel@tonic-gate * in compare.c:
64*0Sstevel@tonic-gate */
65*0Sstevel@tonic-gateint ldap_compare_ext(LDAP *ld, const char *dn, const char *attr, const struct berval *bvalue, LDAPControl ** serverctrls, LDAPControl **clientctrls, int *msgidp);
66*0Sstevel@tonic-gate
67*0Sstevel@tonic-gateint ldap_compare_ext_s(LDAP *ld, const char *dn, const char *attr, const struct berval *bvalue, LDAPControl ** serverctrls, LDAPControl **clientctrls) ;
68*0Sstevel@tonic-gate
69*0Sstevel@tonic-gateint ldap_compare( LDAP *ld, const char *dn, const char *attr, const char *value );
70*0Sstevel@tonic-gate
71*0Sstevel@tonic-gateint ldap_compare_s( LDAP *ld, const char *dn, const char *attr, const char *value );
72*0Sstevel@tonic-gate
73*0Sstevel@tonic-gate/*
74*0Sstevel@tonic-gate * in delete.c:
75*0Sstevel@tonic-gate */
76*0Sstevel@tonic-gateint ldap_delete_ext(LDAP *ld, const char *dn, LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp);
77*0Sstevel@tonic-gate
78*0Sstevel@tonic-gateint ldap_delete_ext_s(LDAP *ld, const char *dn, LDAPControl **serverctrls, LDAPControl **clientctrls);
79*0Sstevel@tonic-gate
80*0Sstevel@tonic-gateint ldap_delete( LDAP *ld, const char *dn );
81*0Sstevel@tonic-gateint ldap_delete_s( LDAP *ld, const char *dn );
82*0Sstevel@tonic-gate
83*0Sstevel@tonic-gate/*
84*0Sstevel@tonic-gate * in error.c:
85*0Sstevel@tonic-gate */
86*0Sstevel@tonic-gatechar *ldap_err2string( int err );
87*0Sstevel@tonic-gatevoid ldap_perror(LDAP *ld, const char *s);
88*0Sstevel@tonic-gateint ldap_result2error(LDAP *ld, LDAPMessage *r, int freeit);
89*0Sstevel@tonic-gateint ldap_get_lderrno(LDAP *ld, char **m, char **s);
90*0Sstevel@tonic-gateint ldap_set_lderrno(LDAP *ld, int e, char *m, char *s);
91*0Sstevel@tonic-gate
92*0Sstevel@tonic-gate/*
93*0Sstevel@tonic-gate * in modify.c:
94*0Sstevel@tonic-gate */
95*0Sstevel@tonic-gateint ldap_modify_ext(LDAP *ld, const char *dn, LDAPMod **mods, LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp);
96*0Sstevel@tonic-gate
97*0Sstevel@tonic-gateint ldap_modify_ext_s(LDAP *ld, const char *dn, LDAPMod **mods, LDAPControl **serverctrls, LDAPControl **clientctrls) ;
98*0Sstevel@tonic-gate
99*0Sstevel@tonic-gateint ldap_modify( LDAP *ld, const char *dn, LDAPMod **mods );
100*0Sstevel@tonic-gateint ldtap_modify_s( LDAP *ld, const char *dn, LDAPMod **mods );
101*0Sstevel@tonic-gate
102*0Sstevel@tonic-gate/*
103*0Sstevel@tonic-gate * in modrdn.c:
104*0Sstevel@tonic-gate */
105*0Sstevel@tonic-gate
106*0Sstevel@tonic-gate/*
107*0Sstevel@tonic-gate * in rename.c:
108*0Sstevel@tonic-gate */
109*0Sstevel@tonic-gateint ldap_rename(LDAP *ld, const char *dn, const char *newrdn, const char *newparent, int deleteoldrdn, LDAPControl ** serverctrls, LDAPControl **clientctrls, int *msgidp);
110*0Sstevel@tonic-gate
111*0Sstevel@tonic-gateint ldap_rename_s(LDAP *ld, const char *dn, const char *newrdn, const char *newparent, int deleteoldrdn, LDAPControl ** serverctrls, LDAPControl **clientctrls);
112*0Sstevel@tonic-gate
113*0Sstevel@tonic-gateint ldap_modrdn(LDAP *ld, const char *dn, const char *newrdn);
114*0Sstevel@tonic-gateint ldap_modrdn_s(LDAP *ld, const char *dn, const char *newrdn);
115*0Sstevel@tonic-gateint ldap_modrdn2(LDAP *ld, const char *dn, const char *newrdn, int deleteoldrdn);
116*0Sstevel@tonic-gate
117*0Sstevel@tonic-gateint ldap_modrdn2_s(LDAP *ld, const char *dn, const char *newrdn, int deleteoldrdn);
118*0Sstevel@tonic-gate
119*0Sstevel@tonic-gate/*
120*0Sstevel@tonic-gate * in open.c:
121*0Sstevel@tonic-gate */
122*0Sstevel@tonic-gateLDAP *ldap_init( const char *defhost, int defport );
123*0Sstevel@tonic-gateLDAP *ldap_open(const char *host, int port);
124*0Sstevel@tonic-gateint ldap_version(LDAPVersion *ver);
125*0Sstevel@tonic-gate
126*0Sstevel@tonic-gate/*
127*0Sstevel@tonic-gate * in getentry.c:
128*0Sstevel@tonic-gate */
129*0Sstevel@tonic-gateLDAPMessage *ldap_first_entry( LDAP *ld, LDAPMessage *res );
130*0Sstevel@tonic-gateLDAPMessage *ldap_next_entry( LDAP *ld, LDAPMessage *entry );
131*0Sstevel@tonic-gateint ldap_count_entries( LDAP *ld, LDAPMessage *res );
132*0Sstevel@tonic-gateint ldap_get_entry_controls(LDAP *ld, LDAPMessage *entry, LDAPControl ***serverctrlsp);
133*0Sstevel@tonic-gate
134*0Sstevel@tonic-gate/*
135*0Sstevel@tonic-gate * in getmsg.c:
136*0Sstevel@tonic-gate */
137*0Sstevel@tonic-gateLDAPMessage *ldap_first_message( LDAP *ld, LDAPMessage *res );
138*0Sstevel@tonic-gateLDAPMessage *ldap_next_message( LDAP *ld, LDAPMessage *msg );
139*0Sstevel@tonic-gateint ldap_count_messages( LDAP *ld, LDAPMessage *res );
140*0Sstevel@tonic-gate
141*0Sstevel@tonic-gate/*
142*0Sstevel@tonic-gate * in getref.c:
143*0Sstevel@tonic-gate */
144*0Sstevel@tonic-gateLDAPMessage *ldap_first_reference( LDAP *ld, LDAPMessage *res );
145*0Sstevel@tonic-gateLDAPMessage *ldap_next_reference( LDAP *ld, LDAPMessage *entry );
146*0Sstevel@tonic-gateint ldap_count_references( LDAP *ld, LDAPMessage *res );
147*0Sstevel@tonic-gate
148*0Sstevel@tonic-gate/*
149*0Sstevel@tonic-gate * in getdn.c
150*0Sstevel@tonic-gate */
151*0Sstevel@tonic-gatechar *ldap_get_dn( LDAP *ld, LDAPMessage *entry );
152*0Sstevel@tonic-gatechar **ldap_explode_dn( const char *dn, const int notypes );
153*0Sstevel@tonic-gatechar ** ldap_explode_rdn( const char *rdn, const int notypes );
154*0Sstevel@tonic-gatechar *ldap_dn2ufn( const char *dn );
155*0Sstevel@tonic-gatechar **ldap_explode_dns( const char *dn );
156*0Sstevel@tonic-gateint ldap_is_dns_dn( const char *dn );
157*0Sstevel@tonic-gatechar *ldap_dns_to_dn(char *dns_name, int *nameparts);
158*0Sstevel@tonic-gate
159*0Sstevel@tonic-gate/*
160*0Sstevel@tonic-gate * in getattr.c
161*0Sstevel@tonic-gate */
162*0Sstevel@tonic-gatechar *ldap_first_attribute( LDAP *ld, LDAPMessage *entry,
163*0Sstevel@tonic-gate	BerElement **ber );
164*0Sstevel@tonic-gate
165*0Sstevel@tonic-gatechar *ldap_next_attribute( LDAP *ld, LDAPMessage *entry,
166*0Sstevel@tonic-gate	BerElement *ber );
167*0Sstevel@tonic-gate
168*0Sstevel@tonic-gatevoid ldap_memfree(void *p);
169*0Sstevel@tonic-gate
170*0Sstevel@tonic-gate/*
171*0Sstevel@tonic-gate * in getvalues.c
172*0Sstevel@tonic-gate */
173*0Sstevel@tonic-gatechar **ldap_get_values( LDAP *ld, LDAPMessage *entry, const char *target );
174*0Sstevel@tonic-gateint ldap_count_values( char **vals );
175*0Sstevel@tonic-gateint ldap_count_values_len( struct berval **vals );
176*0Sstevel@tonic-gatevoid ldap_value_free( char **vals );
177*0Sstevel@tonic-gatevoid ldap_value_free_len( struct berval **vals );
178*0Sstevel@tonic-gate
179*0Sstevel@tonic-gatestruct berval **ldap_get_values_len(LDAP *ld, LDAPMessage *entry, const char *target);
180*0Sstevel@tonic-gate
181*0Sstevel@tonic-gatechar **ldap_get_lang_values(LDAP *ld, LDAPMessage *entry, const char *target, char **type);
182*0Sstevel@tonic-gate
183*0Sstevel@tonic-gatestruct berval **ldap_get_lang_values_len(LDAP *ld, LDAPMessage *entry, const char *target, char **type);
184*0Sstevel@tonic-gate
185*0Sstevel@tonic-gate/*
186*0Sstevel@tonic-gate * in referral.c:
187*0Sstevel@tonic-gate */
188*0Sstevel@tonic-gateint ldap_parse_reference(LDAP *ld, LDAPMessage *ref,
189*0Sstevel@tonic-gate        char ***referralsp, LDAPControl ***serverctrlsp, int freeit);
190*0Sstevel@tonic-gatechar ** ldap_get_reference_urls(LDAP *ld, LDAPMessage *res);
191*0Sstevel@tonic-gate
192*0Sstevel@tonic-gate/*
193*0Sstevel@tonic-gate * in result.c:
194*0Sstevel@tonic-gate */
195*0Sstevel@tonic-gateint ldap_result( LDAP *ld, int msgid, int all,
196*0Sstevel@tonic-gate	struct timeval *timeout, LDAPMessage **result );
197*0Sstevel@tonic-gate
198*0Sstevel@tonic-gateint ldap_msgfree( LDAPMessage *lm );
199*0Sstevel@tonic-gateint ldap_msgtype( LDAPMessage *res );
200*0Sstevel@tonic-gateint ldap_msgid( LDAPMessage *res );
201*0Sstevel@tonic-gateint ldap_parse_result(LDAP *ld, LDAPMessage *res, int *errcodep, char **matcheddnp, char **errmsgp, char ***referralsp, LDAPControl ***serverctrlsp, int freeit) ;
202*0Sstevel@tonic-gate
203*0Sstevel@tonic-gateint ldap_parse_sasl_bind_result(LDAP *ld, LDAPMessage *res, struct berval **servercredp, int freeit);
204*0Sstevel@tonic-gate
205*0Sstevel@tonic-gateint ldap_parse_extended_result(LDAP *ld, LDAPMessage *res, char **resultoidp, struct berval **resultdata, int freeit);
206*0Sstevel@tonic-gate
207*0Sstevel@tonic-gate/*
208*0Sstevel@tonic-gate * in search.c:
209*0Sstevel@tonic-gate */
210*0Sstevel@tonic-gateint ldap_search_ext(LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPControl **serverctrls, LDAPControl **clientctrls, struct timeval *timeoutp, int sizelimit, int *msgidp);
211*0Sstevel@tonic-gate
212*0Sstevel@tonic-gateint ldap_search_ext_s(LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPControl **serverctrls, LDAPControl **clientctrls, struct timeval *timeoutp, int sizelimit, LDAPMessage **res);
213*0Sstevel@tonic-gate
214*0Sstevel@tonic-gateint ldap_search( LDAP *ld, const char *base, int scope, const char *filter,
215*0Sstevel@tonic-gate	char **attrs, int attrsonly );
216*0Sstevel@tonic-gate
217*0Sstevel@tonic-gateint ldap_search_s( LDAP *ld, const char *base, int scope, const char *filter,
218*0Sstevel@tonic-gate	char **attrs, int attrsonly, LDAPMessage **res );
219*0Sstevel@tonic-gate
220*0Sstevel@tonic-gateint ldap_search_st( LDAP *ld, const char *base, int scope, const char *filter,
221*0Sstevel@tonic-gate    char **attrs, int attrsonly, struct timeval *timeout, LDAPMessage **res );
222*0Sstevel@tonic-gate
223*0Sstevel@tonic-gate/*
224*0Sstevel@tonic-gate * in ufn.c
225*0Sstevel@tonic-gate */
226*0Sstevel@tonic-gateint ldap_ufn_search_c( LDAP *ld, char *ufn, char **attrs,
227*0Sstevel@tonic-gate	int attrsonly, LDAPMessage **res, LDAP_CANCELPROC_CALLBACK cancelproc,
228*0Sstevel@tonic-gate	void *cancelparm );
229*0Sstevel@tonic-gate
230*0Sstevel@tonic-gateint ldap_ufn_search_ct( LDAP *ld, char *ufn, char **attrs,
231*0Sstevel@tonic-gate	int attrsonly, LDAPMessage **res, LDAP_CANCELPROC_CALLBACK cancelproc,
232*0Sstevel@tonic-gate	void *cancelparm, char *tag1, char *tag2, char *tag3 );
233*0Sstevel@tonic-gate
234*0Sstevel@tonic-gateint ldap_ufn_search_s( LDAP *ld, char *ufn, char **attrs,
235*0Sstevel@tonic-gate	int attrsonly, LDAPMessage **res );
236*0Sstevel@tonic-gate
237*0Sstevel@tonic-gateLDAPFiltDesc *ldap_ufn_setfilter( LDAP *ld, char *fname );
238*0Sstevel@tonic-gatevoid ldap_ufn_setprefix( LDAP *ld, char *prefix );
239*0Sstevel@tonic-gateint ldap_ufn_timeout( void *tvparam );
240*0Sstevel@tonic-gate
241*0Sstevel@tonic-gate
242*0Sstevel@tonic-gate/*
243*0Sstevel@tonic-gate * in unbind.c
244*0Sstevel@tonic-gate */
245*0Sstevel@tonic-gateint ldap_unbind( LDAP *ld );
246*0Sstevel@tonic-gateint ldap_unbind_s( LDAP *ld );
247*0Sstevel@tonic-gateint ldap_unbind_ext(LDAP *ld, LDAPControl **serverctrls, LDAPControl **clientctrls);
248*0Sstevel@tonic-gate
249*0Sstevel@tonic-gate
250*0Sstevel@tonic-gate/*
251*0Sstevel@tonic-gate * in getfilter.c
252*0Sstevel@tonic-gate */
253*0Sstevel@tonic-gateLDAPFiltDesc *ldap_init_getfilter( char *fname );
254*0Sstevel@tonic-gateLDAPFiltDesc *ldap_init_getfilter_buf( char *buf, ssize_t buflen );
255*0Sstevel@tonic-gateLDAPFiltInfo *ldap_getfirstfilter( LDAPFiltDesc *lfdp, char *tagpat,
256*0Sstevel@tonic-gate	char *value );
257*0Sstevel@tonic-gate
258*0Sstevel@tonic-gateLDAPFiltInfo *ldap_getnextfilter( LDAPFiltDesc *lfdp );
259*0Sstevel@tonic-gatevoid ldap_setfilteraffixes( LDAPFiltDesc *lfdp, char *prefix, char *suffix );
260*0Sstevel@tonic-gatevoid ldap_build_filter( char *filtbuf, size_t buflen,
261*0Sstevel@tonic-gate	char *pattern, char *prefix, char *suffix, char *attr,
262*0Sstevel@tonic-gate	char *value, char **valwords );
263*0Sstevel@tonic-gate
264*0Sstevel@tonic-gateint ldap_create_filter(char *buf, unsigned long buflen, char *pattern, char *prefix, char *suffix, char *attr, char *value, char **valwords);
265*0Sstevel@tonic-gate
266*0Sstevel@tonic-gate/*
267*0Sstevel@tonic-gate * in free.c
268*0Sstevel@tonic-gate */
269*0Sstevel@tonic-gatevoid ldap_getfilter_free( LDAPFiltDesc *lfdp );
270*0Sstevel@tonic-gatevoid ldap_mods_free( LDAPMod **mods, int freemods );
271*0Sstevel@tonic-gatevoid ldap_ber_free(BerElement *ber, int freebuf);
272*0Sstevel@tonic-gate
273*0Sstevel@tonic-gate/*
274*0Sstevel@tonic-gate * in friendly.c
275*0Sstevel@tonic-gate */
276*0Sstevel@tonic-gatechar *ldap_friendly_name( char *filename, char *uname,
277*0Sstevel@tonic-gate	FriendlyMap *map );
278*0Sstevel@tonic-gate
279*0Sstevel@tonic-gatevoid ldap_free_friendlymap( FriendlyMap *map );
280*0Sstevel@tonic-gate
281*0Sstevel@tonic-gate
282*0Sstevel@tonic-gate/*
283*0Sstevel@tonic-gate * in cldap.c
284*0Sstevel@tonic-gate */
285*0Sstevel@tonic-gate
286*0Sstevel@tonic-gate
287*0Sstevel@tonic-gate/*
288*0Sstevel@tonic-gate * in sort.c
289*0Sstevel@tonic-gate */
290*0Sstevel@tonic-gateint ldap_sort_entries( LDAP *ld, LDAPMessage **chain, char *attr,
291*0Sstevel@tonic-gate	int (*cmp)() );
292*0Sstevel@tonic-gate
293*0Sstevel@tonic-gateint ldap_sort_values( LDAP *ld, char **vals, int (*cmp)() );
294*0Sstevel@tonic-gateint ldap_sort_strcasecmp( const char **a, const char **b );
295*0Sstevel@tonic-gateint ldap_multisort_entries(LDAP *ld, LDAPMessage **chain, char **attr, LDAP_CMP_CALLBACK *cmp);
296*0Sstevel@tonic-gate
297*0Sstevel@tonic-gate
298*0Sstevel@tonic-gate/*
299*0Sstevel@tonic-gate * in url.c
300*0Sstevel@tonic-gate */
301*0Sstevel@tonic-gateint ldap_is_ldap_url( const char *url );
302*0Sstevel@tonic-gateint ldap_url_parse( const char *url, LDAPURLDesc **ludpp );
303*0Sstevel@tonic-gateint ldap_url_parse_nodn(const char *url, LDAPURLDesc **ludpp);
304*0Sstevel@tonic-gatevoid ldap_free_urldesc( LDAPURLDesc *ludp );
305*0Sstevel@tonic-gateint ldap_url_search( LDAP *ld, const char *url, int attrsonly );
306*0Sstevel@tonic-gateint ldap_url_search_s( LDAP *ld, const char *url, int attrsonly,
307*0Sstevel@tonic-gate	LDAPMessage **res );
308*0Sstevel@tonic-gate
309*0Sstevel@tonic-gateint ldap_url_search_st( LDAP *ld, const char *url, int attrsonly,
310*0Sstevel@tonic-gate	struct timeval *timeout, LDAPMessage **res );
311*0Sstevel@tonic-gate
312*0Sstevel@tonic-gatechar *ldap_dns_to_url(LDAP *ld, char *dns_name, char *attrs,
313*0Sstevel@tonic-gatechar *scope, char *filter);
314*0Sstevel@tonic-gatechar *ldap_dn_to_url(LDAP *ld, char *dn, int nameparts);
315*0Sstevel@tonic-gate
316*0Sstevel@tonic-gate
317*0Sstevel@tonic-gate/*
318*0Sstevel@tonic-gate * in charset.c
319*0Sstevel@tonic-gate */
320*0Sstevel@tonic-gatevoid ldap_set_string_translators( LDAP *ld,
321*0Sstevel@tonic-gate	BERTranslateProc encode_proc, BERTranslateProc decode_proc );
322*0Sstevel@tonic-gate
323*0Sstevel@tonic-gateint ldap_translate_from_t61( LDAP *ld, char **bufp,
324*0Sstevel@tonic-gate	unsigned int *lenp, int free_input );
325*0Sstevel@tonic-gate
326*0Sstevel@tonic-gateint ldap_translate_to_t61( LDAP *ld, char **bufp,
327*0Sstevel@tonic-gate	unsigned int *lenp, int free_input );
328*0Sstevel@tonic-gate
329*0Sstevel@tonic-gatevoid ldap_enable_translation( LDAP *ld, LDAPMessage *entry,
330*0Sstevel@tonic-gate	int enable );
331*0Sstevel@tonic-gate
332*0Sstevel@tonic-gateint ldap_t61_to_8859(char **bufp, unsigned long *buflenp,
333*0Sstevel@tonic-gate        int free_input);
334*0Sstevel@tonic-gate
335*0Sstevel@tonic-gateint ldap_8859_to_t61(char **bufp, unsigned long *buflenp,
336*0Sstevel@tonic-gate        int free_input);
337*0Sstevel@tonic-gate
338*0Sstevel@tonic-gate
339*0Sstevel@tonic-gate/*
340*0Sstevel@tonic-gate * in io.c
341*0Sstevel@tonic-gate */
342*0Sstevel@tonic-gateBerElement *ber_alloc_t(int options);
343*0Sstevel@tonic-gateint ber_flatten(BerElement *ber, struct berval **bvPtr);
344*0Sstevel@tonic-gatevoid ber_free(BerElement *ber, int freebuf);
345*0Sstevel@tonic-gateBerElement *ber_alloc(void);
346*0Sstevel@tonic-gateBerElement *ber_init(const struct berval *bv);
347*0Sstevel@tonic-gate
348*0Sstevel@tonic-gate/*
349*0Sstevel@tonic-gate * in decode.c
350*0Sstevel@tonic-gate */
351*0Sstevel@tonic-gatestruct berval *ber_bvdup(const struct berval *bv);
352*0Sstevel@tonic-gatevoid ber_bvecfree(struct berval **bv);
353*0Sstevel@tonic-gatevoid ber_bvfree(struct berval *bv);
354*0Sstevel@tonic-gateber_tag_t ber_first_element(BerElement *ber, unsigned int *len, char **last);
355*0Sstevel@tonic-gateber_tag_t ber_next_element(BerElement *ber, ber_tag_t *len, char *last);
356*0Sstevel@tonic-gateber_tag_t ber_peek_tag(BerElement *ber, ber_tag_t *len);
357*0Sstevel@tonic-gateber_tag_t ber_scanf(BerElement *ber, const char *fmt, ...);
358*0Sstevel@tonic-gateber_tag_t ber_skip_tag(BerElement *ber, ber_tag_t *len);
359*0Sstevel@tonic-gateber_tag_t ber_get_int(BerElement *ber, ber_int_t *num);
360*0Sstevel@tonic-gate
361*0Sstevel@tonic-gate/*
362*0Sstevel@tonic-gate * in encode.c
363*0Sstevel@tonic-gate */
364*0Sstevel@tonic-gateint ber_printf(BerElement *ber, const char *fmt, ...);
365*0Sstevel@tonic-gate
366*0Sstevel@tonic-gate/*
367*0Sstevel@tonic-gate * in control.c
368*0Sstevel@tonic-gate */
369*0Sstevel@tonic-gatevoid ldap_control_free (LDAPControl *ctrl);
370*0Sstevel@tonic-gatevoid ldap_controls_free (LDAPControl **ctrls);
371*0Sstevel@tonic-gate
372*0Sstevel@tonic-gate/*
373*0Sstevel@tonic-gate * in spagectrl.c
374*0Sstevel@tonic-gate */
375*0Sstevel@tonic-gateint ldap_create_page_control(LDAP *ld, unsigned int pagesize, struct berval *cookie, char isCritical, LDAPControl **output);
376*0Sstevel@tonic-gate
377*0Sstevel@tonic-gateint ldap_parse_page_control(LDAP *ld, LDAPControl **controls, unsigned int *totalcount, struct berval **cookie);
378*0Sstevel@tonic-gate
379*0Sstevel@tonic-gate/*
380*0Sstevel@tonic-gate * in tmplout.c
381*0Sstevel@tonic-gate */
382*0Sstevel@tonic-gateint ldap_entry2html(LDAP *ld, char *buf, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, unsigned long opts, char *urlprefix, char *base);
383*0Sstevel@tonic-gate
384*0Sstevel@tonic-gateint ldap_entry2html_search(LDAP *ld, char *dn, char *base, LDAPMessage *entry, struct ldap_disptmpl*tmpllist, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol,int rdncount, unsigned long opts, char *urlprefix);
385*0Sstevel@tonic-gate
386*0Sstevel@tonic-gateint ldap_entry2text(LDAP *ld, char *buf, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, unsigned long opts);
387*0Sstevel@tonic-gate
388*0Sstevel@tonic-gateint ldap_entry2text_search(LDAP *ld,char *dn, char *base, LDAPMessage *entry, struct ldap_disptmpl*tmpllist, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol,int rdncount, unsigned long opts);
389*0Sstevel@tonic-gate
390*0Sstevel@tonic-gateint ldap_vals2html(LDAP *ld, char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, void *writeparm, char *eol, int rdncount, char *urlprefix);
391*0Sstevel@tonic-gate
392*0Sstevel@tonic-gateint ldap_vals2text(LDAP *ld, char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, void *writeparm, char *eol, int rdncount);
393*0Sstevel@tonic-gate
394*0Sstevel@tonic-gate/*
395*0Sstevel@tonic-gate * in extendop.c
396*0Sstevel@tonic-gate */
397*0Sstevel@tonic-gateint ldap_extended_operation(LDAP *ld, const char *requestoid, const struct berval *requestdata, LDAPControl **serverctrls, LDAPControl**clientctrls, int *msgidp);
398*0Sstevel@tonic-gate
399*0Sstevel@tonic-gateint ldap_extended_operation_s(LDAP *ld, const char *requestoid, const struct berval *requestdata, LDAPControl **serverctrls, LDAPControl **clientctrls, char **retoidp, struct berval **retdatap);
400*0Sstevel@tonic-gate
401*0Sstevel@tonic-gate/*
402*0Sstevel@tonic-gate * in disptmpl.c
403*0Sstevel@tonic-gate */
404*0Sstevel@tonic-gatestruct ldap_disptmpl *ldap_first_disptmpl(struct ldap_disptmpl *tmpllist);
405*0Sstevel@tonic-gatestruct ldap_tmplitem *ldap_first_tmplcol(struct ldap_disptmpl *tmpl,struct ldap_tmplitem *row);
406*0Sstevel@tonic-gate
407*0Sstevel@tonic-gatestruct ldap_tmplitem *ldap_first_tmplrow(struct ldap_disptmpl *tmpl);
408*0Sstevel@tonic-gatevoid ldap_free_templates(struct ldap_disptmpl *tmpllist);
409*0Sstevel@tonic-gateint ldap_init_templates(char *file, struct ldap_disptmpl **tmpllistp);
410*0Sstevel@tonic-gate
411*0Sstevel@tonic-gateint ldap_init_templates_buf(char *buf, long buflen, struct ldap_disptmpl **tmpllistp);
412*0Sstevel@tonic-gate
413*0Sstevel@tonic-gatestruct ldap_disptmpl *ldap_next_disptmpl(struct ldap_disptmpl *tmpllist, struct ldap_disptmpl *tmpl);
414*0Sstevel@tonic-gate
415*0Sstevel@tonic-gatestruct ldap_tmplitem *ldap_next_tmplcol(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row, struct ldap_tmplitem *col);
416*0Sstevel@tonic-gate
417*0Sstevel@tonic-gatestruct ldap_tmplitem *ldap_next_tmplrow(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row);
418*0Sstevel@tonic-gate
419*0Sstevel@tonic-gatestruct ldap_disptmpl *ldap_oc2template(char **oclist, struct ldap_disptmpl *tmpllist);
420*0Sstevel@tonic-gate
421*0Sstevel@tonic-gatechar **ldap_tmplattrs(struct ldap_disptmpl *tmpl, char **includeattrs, int exclude, unsigned long syntaxmask);
422*0Sstevel@tonic-gate
423*0Sstevel@tonic-gatestruct ldap_disptmpl *ldap_name2template(char *name, struct ldap_disptmpl *tmpllist);
424*0Sstevel@tonic-gate
425*0Sstevel@tonic-gate/*
426*0Sstevel@tonic-gate * in cram_md5.c
427*0Sstevel@tonic-gate */
428*0Sstevel@tonic-gateint ldap_sasl_cram_md5_bind_s(LDAP *ld, char *dn, struct berval *cred, LDAPControl **serverctrls, LDAPControl **clientctrls);
429*0Sstevel@tonic-gate
430*0Sstevel@tonic-gate/*
431*0Sstevel@tonic-gate * in setoption.c
432*0Sstevel@tonic-gate */
433*0Sstevel@tonic-gateint ldap_set_option (LDAP *ld, int option, const void *optdata);
434*0Sstevel@tonic-gate
435*0Sstevel@tonic-gate/*
436*0Sstevel@tonic-gate * in log.c
437*0Sstevel@tonic-gate */
438*0Sstevel@tonic-gatevoid ldaplogconfigf(FILE *fd);
439*0Sstevel@tonic-gate
440*0Sstevel@tonic-gate/*
441*0Sstevel@tonic-gate * in line64.c
442*0Sstevel@tonic-gate */
443*0Sstevel@tonic-gatechar *ldif_type_and_value(char *type, char *val, int vlen);
444*0Sstevel@tonic-gatechar *str_getline(char **next);
445*0Sstevel@tonic-gateint str_parse_line(char *line, char **type, char **value, int *vlen);
446*0Sstevel@tonic-gate
447*0Sstevel@tonic-gate/*
448*0Sstevel@tonic-gate * in sortctrl.c
449*0Sstevel@tonic-gate */
450*0Sstevel@tonic-gateint ldap_create_sort_control (LDAP *ld, LDAPsortkey **sortKeyList, const char ctl_iscritical, LDAPControl **ctrlp);
451*0Sstevel@tonic-gate
452*0Sstevel@tonic-gateint ldap_parse_sort_control(LDAP *ld, LDAPControl **ctrlp, unsigned long *result, char **attribute);
453*0Sstevel@tonic-gate
454*0Sstevel@tonic-gateint ldap_create_sort_keylist(LDAPsortkey ***sortKeyList, const char *string_rep);
455*0Sstevel@tonic-gate
456*0Sstevel@tonic-gatevoid ldap_free_sort_keylist(LDAPsortkey **sortKeyList);
457*0Sstevel@tonic-gate
458*0Sstevel@tonic-gate/*
459*0Sstevel@tonic-gate * in vlistctrl.c
460*0Sstevel@tonic-gate */
461*0Sstevel@tonic-gateint ldap_create_virtuallist_control(LDAP *ld, LDAPVirtualList *ldvlistp, LDAPControl **ctrlp);
462*0Sstevel@tonic-gate
463*0Sstevel@tonic-gateint ldap_parse_virtuallist_control(LDAP *ld, LDAPControl **ctrls, unsigned long *target_posp, unsigned long *list_sizep, int *errcodep);
464*0Sstevel@tonic-gate
465*0Sstevel@tonic-gate/*
466*0Sstevel@tonic-gate * in ldapsinit.c
467*0Sstevel@tonic-gate */
468*0Sstevel@tonic-gateLDAP * ldapssl_init( const char *defhost, int defport, int defsecure );
469*0Sstevel@tonic-gateint ldapssl_install_routines( LDAP *ld );
470*0Sstevel@tonic-gateint ldapssl_enable_clientauth( LDAP *ld, char *keynickname, char *keypasswd, char *certnickname );
471*0Sstevel@tonic-gate
472*0Sstevel@tonic-gate/*
473*0Sstevel@tonic-gate * in clientinit.c
474*0Sstevel@tonic-gate */
475*0Sstevel@tonic-gateint ldapssl_client_init( const char *certdbpath, void *certdbhandle);
476*0Sstevel@tonic-gateint ldapssl_clientauth_init(const char *certdbpath, void *certdbhandle, const int needkeydb, const char *keydbpath, void *keydbhandle);
477*0Sstevel@tonic-gate
478*0Sstevel@tonic-gateint ldapssl_advclientauth_init( const char *certdbpath, void *certdbhandle, const int needkeydb, const char *keydbpath, void *keydbhandle, const int needsecmoddb, const char *secmoddbpath, const int sslstrength );
479*0Sstevel@tonic-gate
480*0Sstevel@tonic-gateint ldapssl_pkcs_init( const struct ldapssl_pkcs_fns *pfns);
481*0Sstevel@tonic-gate
482*0Sstevel@tonic-gate/*
483*0Sstevel@tonic-gate * in errormap.c
484*0Sstevel@tonic-gate */
485*0Sstevel@tonic-gateconst char * ldapssl_err2string( const int prerrno );
486*0Sstevel@tonic-gate
487*0Sstevel@tonic-gate/*
488*0Sstevel@tonic-gate * in psearch.c
489*0Sstevel@tonic-gate */
490*0Sstevel@tonic-gateint ldap_create_persistentsearch_control(LDAP *ld, int changetypes, int changesonly, int return_echg_ctls, char ctl_iscritical, LDAPControl **ctrlp);
491*0Sstevel@tonic-gate
492*0Sstevel@tonic-gateint ldap_parse_entrychange_control(LDAP *ld, LDAPControl **ctrls, int *chgtypep, char **prevdnp, int *chgnumpresentp, ber_int_t *chgnump);
493*0Sstevel@tonic-gate
494*0Sstevel@tonic-gate/*
495*0Sstevel@tonic-gate * in proxyauthctrl.c
496*0Sstevel@tonic-gate */
497*0Sstevel@tonic-gateint ldap_create_proxyauth_control(LDAP *ld, const char *dn, const char ctl_iscritical, LDAPControl **ctrlp);
498*0Sstevel@tonic-gate
499*0Sstevel@tonic-gateint ldap_create_proxiedauth_control(LDAP *ld, const char *authzid, LDAPControl **ctrlp);
500*0Sstevel@tonic-gate
501*0Sstevel@tonic-gate/*
502*0Sstevel@tonic-gate * in srchpref.c
503*0Sstevel@tonic-gate */
504*0Sstevel@tonic-gatestruct ldap_searchobj *ldap_first_searchobj(struct ldap_searchobj *solist);
505*0Sstevel@tonic-gatevoid ldap_free_searchprefs(struct ldap_searchobj *solist);
506*0Sstevel@tonic-gateint ldap_init_searchprefs(char *file, struct ldap_searchobj **solistp);
507*0Sstevel@tonic-gateint ldap_init_searchprefs_buf(char *buf, long buflen, struct ldap_searchobj **solistp);
508*0Sstevel@tonic-gate
509*0Sstevel@tonic-gatestruct ldap_searchobj *ldap_next_searchobj(struct ldap_searchobj *solist, struct ldap_searchobj *so);
510*0Sstevel@tonic-gate
511*0Sstevel@tonic-gate/*
512*0Sstevel@tonic-gate * in getoption.c
513*0Sstevel@tonic-gate */
514*0Sstevel@tonic-gateint ldap_get_option (LDAP *ld, int option, void *outvalue);
515*0Sstevel@tonic-gate
516*0Sstevel@tonic-gate/*
517*0Sstevel@tonic-gate * in memcache.c
518*0Sstevel@tonic-gate */
519*0Sstevel@tonic-gateint ldap_memcache_init(unsigned long ttl, unsigned long size, char **baseDNs, struct ldap_thread_fns *thread_fns, LDAPMemCache **cachep);
520*0Sstevel@tonic-gate
521*0Sstevel@tonic-gateint ldap_memcache_set(LDAP *ld, LDAPMemCache *cache);
522*0Sstevel@tonic-gateint ldap_memcache_get(LDAP *ld, LDAPMemCache **cachep);
523*0Sstevel@tonic-gatevoid ldap_memcache_flush(LDAPMemCache *cache, char *dn, int scope);
524*0Sstevel@tonic-gatevoid ldap_memcache_destroy(LDAPMemCache *cache);
525*0Sstevel@tonic-gatevoid ldap_memcache_update(LDAPMemCache *cache);
526*0Sstevel@tonic-gate
527*0Sstevel@tonic-gate/*
528*0Sstevel@tonic-gate * in digest_md5.c
529*0Sstevel@tonic-gate */
530*0Sstevel@tonic-gateint ldap_x_sasl_digest_md5_bind_s(LDAP *ld, char *dn, struct berval *cred, LDAPControl **serverctrls, LDAPControl **clientctrls);
531