Lines Matching refs:ld

31 #define LDAP_GET_BITOPT( ld, bit ) \
32 ((ld)->ld_options & bit ) != 0 ? 1 : 0
40 ldap_get_option( LDAP *ld, int option, void *optdata )
67 if ( ld != NULL ) {
68 LDAP_SET_LDERRNO( ld, rc, NULL, NULL );
86 * if ld is NULL, arrange to return options from our default settings
88 if ( ld == NULL ) {
89 ld = &nsldapi_ld_defaults;
92 if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) {
97 if (ld != &nsldapi_ld_defaults)
98 LDAP_MUTEX_LOCK( ld, LDAP_OPTION_LOCK );
102 *((int *) optdata) = LDAP_GET_BITOPT( ld, LDAP_BITOPT_DNS );
108 LDAP_GET_BITOPT( ld, LDAP_BITOPT_REFERRALS );
113 *((int *) optdata) = LDAP_GET_BITOPT( ld, LDAP_BITOPT_SSL );
117 *((int *) optdata) = LDAP_GET_BITOPT( ld, LDAP_BITOPT_RESTART );
122 LDAP_GET_BITOPT( ld, LDAP_BITOPT_RECONNECT );
128 LDAP_GET_BITOPT( ld, LDAP_BITOPT_ASYNC );
134 *((Sockbuf **) optdata) = ld->ld_sbp;
137 if ( ber_sockbuf_get_option( ld->ld_sbp,
139 LDAP_SET_LDERRNO( ld, LDAP_LOCAL_ERROR, NULL, NULL );
146 *((int *) optdata) = ld->ld_deref;
149 *((int *) optdata) = ld->ld_sizelimit;
152 *((int *) optdata) = ld->ld_timelimit;
155 *((int *) optdata) = ld->ld_refhoplimit;
158 *((int *) optdata) = ld->ld_version;
165 rc = nsldapi_dup_controls( ld, (LDAPControl ***)optdata,
167 ld->ld_servercontrols : ld->ld_clientcontrols );
172 *((LDAP_REBINDPROC_CALLBACK **) optdata) = ld->ld_rebind_fn;
175 *((void **) optdata) = ld->ld_rebind_arg;
181 if ( ld->ld_io_fns_ptr == NULL ) {
185 *((struct ldap_io_fns *)optdata) = *(ld->ld_io_fns_ptr);
192 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_close = ld->ld_extclose_fn;
193 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_connect = ld->ld_extconnect_fn;
194 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_read = ld->ld_extread_fn;
195 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_write = ld->ld_extwrite_fn;
196 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_poll = ld->ld_extpoll_fn;
197 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_newhandle = ld->ld_extnewhandle_fn;
198 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_disposehandle = ld->ld_extdisposehandle_fn;
199 ((struct ldap_x_ext_io_fns_rev0 *) optdata)->lextiof_session_arg = ld->ld_ext_session_arg;
203 *((struct ldap_x_ext_io_fns *) optdata) = ld->ld_ext_io_fns;
205 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL );
214 *((struct ldap_thread_fns *) optdata) = ld->ld_thread;
220 *((struct ldap_dns_fns *) optdata) = ld->ld_dnsfn;
226 *((struct ldap_cache_fns *) optdata) = ld->ld_cache;
229 *((int *) optdata) = ld->ld_cache_strategy;
232 *((int *) optdata) = ld->ld_cache_on;
236 *((int *) optdata) = LDAP_GET_LDERRNO( ld, NULL, NULL );
240 (void)LDAP_GET_LDERRNO( ld, NULL, (char **)optdata );
245 (void)LDAP_GET_LDERRNO( ld, (char **)optdata, NULL );
250 if ( NULL != ld->ld_preferred_language ) {
252 nsldapi_strdup(ld->ld_preferred_language);
261 LDAP_SET_LDERRNO( ld, rc, NULL, NULL );
267 *((char **) optdata) = nsldapi_strdup( ld->ld_defhost );
271 *((int *) optdata) = ld->ld_connect_timeout;
277 *((char **) optdata) = nsldapi_strdup(ld->ld_def_sasl_mech);
280 *((char **) optdata) = nsldapi_strdup(ld->ld_def_sasl_realm);
283 *((char **) optdata) = nsldapi_strdup(ld->ld_def_sasl_authcid);
286 *((char **) optdata) = nsldapi_strdup(ld->ld_def_sasl_authzid);
293 if( ld->ld_defconn == NULL ||
294 ld->ld_defconn->lconn_sb == NULL ) {
297 ctx = (sasl_conn_t *)(ld->ld_defconn->lconn_sb->sb_sasl_ctx);
309 *((sasl_ssf_t *) optdata) = ld->ld_sasl_secprops.min_ssf;
312 *((sasl_ssf_t *) optdata) = ld->ld_sasl_secprops.max_ssf;
315 *((sasl_ssf_t *) optdata) = ld->ld_sasl_secprops.maxbufsize;
325 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL );
331 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL );
334 if (ld != &nsldapi_ld_defaults)
335 LDAP_MUTEX_UNLOCK( ld, LDAP_OPTION_LOCK );