Lines Matching refs:ld

29 #define LDAP_GET_BITOPT( ld, bit ) \  argument
30 ((ld)->ld_options & bit ) != 0 ? 1 : 0
38 ldap_get_option( LDAP *ld, int option, void *optdata ) in ldap_get_option() argument
65 if ( ld != NULL ) { in ldap_get_option()
66 LDAP_SET_LDERRNO( ld, rc, NULL, NULL ); in ldap_get_option()
86 if ( ld == NULL ) { in ldap_get_option()
87 ld = &nsldapi_ld_defaults; in ldap_get_option()
90 if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) { in ldap_get_option()
95 if (ld != &nsldapi_ld_defaults) in ldap_get_option()
96 LDAP_MUTEX_LOCK( ld, LDAP_OPTION_LOCK ); in ldap_get_option()
100 *((int *) optdata) = LDAP_GET_BITOPT( ld, LDAP_BITOPT_DNS ); in ldap_get_option()
106 LDAP_GET_BITOPT( ld, LDAP_BITOPT_REFERRALS ); in ldap_get_option()
111 *((int *) optdata) = LDAP_GET_BITOPT( ld, LDAP_BITOPT_SSL ); in ldap_get_option()
115 *((int *) optdata) = LDAP_GET_BITOPT( ld, LDAP_BITOPT_RESTART ); in ldap_get_option()
120 LDAP_GET_BITOPT( ld, LDAP_BITOPT_RECONNECT ); in ldap_get_option()
126 LDAP_GET_BITOPT( ld, LDAP_BITOPT_ASYNC ); in ldap_get_option()
132 *((Sockbuf **) optdata) = ld->ld_sbp; in ldap_get_option()
135 if ( ber_sockbuf_get_option( ld->ld_sbp, in ldap_get_option()
137 LDAP_SET_LDERRNO( ld, LDAP_LOCAL_ERROR, NULL, NULL ); in ldap_get_option()
144 *((int *) optdata) = ld->ld_deref; in ldap_get_option()
147 *((int *) optdata) = ld->ld_sizelimit; in ldap_get_option()
150 *((int *) optdata) = ld->ld_timelimit; in ldap_get_option()
153 *((int *) optdata) = ld->ld_refhoplimit; in ldap_get_option()
156 *((int *) optdata) = ld->ld_version; in ldap_get_option()
163 rc = nsldapi_dup_controls( ld, (LDAPControl ***)optdata, in ldap_get_option()
165 ld->ld_servercontrols : ld->ld_clientcontrols ); in ldap_get_option()
170 *((LDAP_REBINDPROC_CALLBACK **) optdata) = ld->ld_rebind_fn; in ldap_get_option()
173 *((void **) optdata) = ld->ld_rebind_arg; in ldap_get_option()
179 if ( ld->ld_io_fns_ptr == NULL ) { in ldap_get_option()
183 *((struct ldap_io_fns *)optdata) = *(ld->ld_io_fns_ptr); in ldap_get_option()
190 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_close = ld->ld_extclose_fn; in ldap_get_option()
191 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_connect = ld->ld_extconnect_fn; in ldap_get_option()
192 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_read = ld->ld_extread_fn; in ldap_get_option()
193 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_write = ld->ld_extwrite_fn; in ldap_get_option()
194 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_poll = ld->ld_extpoll_fn; in ldap_get_option()
195 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_newhandle = ld->ld_extnewhandle_fn; in ldap_get_option()
196 … ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_disposehandle = ld->ld_extdisposehandle_fn; in ldap_get_option()
197 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_session_arg = ld->ld_ext_session_arg; in ldap_get_option()
201 *((struct ldap_x_ext_io_fns *) optdata) = ld->ld_ext_io_fns; in ldap_get_option()
203 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL ); in ldap_get_option()
212 *((struct ldap_thread_fns *) optdata) = ld->ld_thread; in ldap_get_option()
218 *((struct ldap_dns_fns *) optdata) = ld->ld_dnsfn; in ldap_get_option()
224 *((struct ldap_cache_fns *) optdata) = ld->ld_cache; in ldap_get_option()
227 *((int *) optdata) = ld->ld_cache_strategy; in ldap_get_option()
230 *((int *) optdata) = ld->ld_cache_on; in ldap_get_option()
234 *((int *) optdata) = LDAP_GET_LDERRNO( ld, NULL, NULL ); in ldap_get_option()
238 (void)LDAP_GET_LDERRNO( ld, NULL, (char **)optdata ); in ldap_get_option()
243 (void)LDAP_GET_LDERRNO( ld, (char **)optdata, NULL ); in ldap_get_option()
248 if ( NULL != ld->ld_preferred_language ) { in ldap_get_option()
250 nsldapi_strdup(ld->ld_preferred_language); in ldap_get_option()
259 LDAP_SET_LDERRNO( ld, rc, NULL, NULL ); in ldap_get_option()
265 *((char **) optdata) = nsldapi_strdup( ld->ld_defhost ); in ldap_get_option()
269 *((int *) optdata) = ld->ld_connect_timeout; in ldap_get_option()
275 *((char **) optdata) = nsldapi_strdup(ld->ld_def_sasl_mech); in ldap_get_option()
278 *((char **) optdata) = nsldapi_strdup(ld->ld_def_sasl_realm); in ldap_get_option()
281 *((char **) optdata) = nsldapi_strdup(ld->ld_def_sasl_authcid); in ldap_get_option()
284 *((char **) optdata) = nsldapi_strdup(ld->ld_def_sasl_authzid); in ldap_get_option()
291 if( ld->ld_defconn == NULL || in ldap_get_option()
292 ld->ld_defconn->lconn_sb == NULL ) { in ldap_get_option()
295 ctx = (sasl_conn_t *)(ld->ld_defconn->lconn_sb->sb_sasl_ctx); in ldap_get_option()
307 *((sasl_ssf_t *) optdata) = ld->ld_sasl_secprops.min_ssf; in ldap_get_option()
310 *((sasl_ssf_t *) optdata) = ld->ld_sasl_secprops.max_ssf; in ldap_get_option()
313 *((sasl_ssf_t *) optdata) = ld->ld_sasl_secprops.maxbufsize; in ldap_get_option()
323 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL ); in ldap_get_option()
329 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL ); in ldap_get_option()
332 if (ld != &nsldapi_ld_defaults) in ldap_get_option()
333 LDAP_MUTEX_UNLOCK( ld, LDAP_OPTION_LOCK ); in ldap_get_option()