Previous Contents Index Next
List of Code Examples Code Example 2-1 Source Code to Retrieve LDAP Entry Code Example 2-2 Solaris Makefile for Sample Client Code Example 3-1 Source Code for LDAP search operation Code Example 3-2 Passing an LDAP Server with the Default LDAP Port Code Example 3-3 Passing Multiple LDAP Servers with Default LDAP Port Code Example 3-4 Passing Non-Default LDAP Ports Code Example 3-5 Initializing an LDAP Session Code Example 3-6 Passing Restart Preferences to Function Code Example 3-7 Passing the LDAP Protocol Version Number Code Example 3-8 Synchronous Authentication Code Example 3-9 Asynchronous Authentication Code Example 3-10 Binding Anonymously Code Example 3-11 Closing an LDAP Server Connection Code Example 4-1 Calling Synchronous ldap_delete_ext_s to Delete an Entry Code Example 4-2 Calling Asynchronous ldap_delete_ext and Send Verification Code Example 4-3 Sample Loop to Poll for Results Code Example 4-4 While Loop to Call Function Code Example 4-5 Calling ldap_parse_result() Function Code Example 4-6 Retrieve Error Information from LDAPMessage Structure Code Example 4-7 Asynchronous Function to Delete Entry Code Code Example 4-8 Retrieving SDK Version Information with ldap_get_option() Code Example 4-9 Setting an Error Code Code Example 4-10 Calling ldap_parse_result() Function Code Example 4-11 Get and Print Error Information from LDAPMessage Structure Code Example 4-12 Calling ldap_get_lderrno() Function Code Example 4-13 To Get Error Message from an LDAP Structure Code Example 4-14 Retrieving an Error Message from an Error Code Code Example 4-15 Printing Error Codes Code Example 4-16 Disabling Referrals Code Example 4-17 Rebind Function Definition Code Example 4-18 Creating an In-Memory Cache Code Example 4-19 Initializing a New Connection Handle Code Example 4-20 Reconnecting to an Existing Connection Handle Code Example 4-21 Reconnecting to Server After Disconnect Code Example 5-1 ldap_search_ext_s() Search Request Code Example 5-2 ldap_search_ext() Search Request Code Example 5-3 Sample Code to Set Session Search Preferences Code Example 5-4 Synchronous Searching Code Example 5-5 Declaring ldap_result() Code Example 5-6 Retrieving Search Results One at a Time Code Example 5-7 Printing Results of Asynchronous Search Code Example 5-8 Retrieving a Chain of Results Code Example 5-9 Obtaining DN for Search Result Entries Code Example 5-10 Retrieving Entry Attributes Code Example 5-11 Retrieving Attribute Values Code Example 5-12 Getting and Saving Attribute Value Code Example 5-13 Obtaining a Referral Code Example 5-14 Sorting Entries by Attribute Value Code Example 5-15 Sorting Entries by Multiple Values Code Example 5-16 Sorting Attribute Values Code Example 5-17 Reading a Specific Entry with a Search Code Example 5-18 Listing Subentries Code Example 5-19 Sample Code to Send a Search Request Code Example 6-1 Section of Filter Configuration File Code Example 6-2 Syntax for Filter Configuration File Code Example 6-3 Retrieving Configuration Filters Code Example 6-4 Adding Prefixes and Suffixes Code Example 6-5 Freeing Filters from Memory Code Example 6-6 Creating Filters Code Example 7-1 Defining a LDAPMod Structure Code Example 7-2 Setting Up an Attribute Structure Code Example 7-3 Specifying Multiple Values in an Attribute Code Example 7-4 Berval Structure Code Example 7-5 Adding a Value to an Attribute Code Example 7-6 Adding Array of Structures to an Attribute Code Example 7-7 Synchronous Add Operation Code Example 7-8 Sample Synchronous Add Entry Program Code Example 7-9 Asynchronous Add Operation Code Example 7-10 Sample Asynchronous Add Program Code Example 7-11 Modifying an Attribute Value Code Example 7-12 Removing an Attribute Value Code Example 7-13 Adding Values to an Attribute Code Example 7-14 Assembling an Array of LDAPMod Structures Code Example 7-15 Synchronous Modify Operation Code Example 7-16 Sample Synchronous Modify Program Code Example 7-17 Asynchronous Modify Operation Code Example 7-18 Sample Asynchronous Modify Program Code Example 7-19 Synchronous Delete Operation Code Example 7-20 Sample Synchronous Delete Program Code Example 7-21 Asynchronous Delete Operation Code Example 7-22 Sample Asynchronous Delete Program Code Example 7-23 Synchronous Renaming Operation Code Example 7-24 Asynchronous Renaming Operation Code Example 7-25 Synchronous Relocating of an Entry Code Example 7-26 Asynchronous Relocating of an Entry Code Example 8-1 Synchronous Compare Operation Code Example 8-2 Sample Synchronous Comparison Program Code Example 8-3 Asynchronous Compare Operation Code Example 8-4 Sample Asynchronous Comparison Program Code Example 9-1 Determining an LDAP URL Code Example 9-2 LDAPURLDesc Structure Code Example 9-3 Parsing an LDAP URL Code Example 9-4 Results of Parsing an LDAP URL Code Example 9-5 Freeing LDAPURLDesc Structure From Memory Code Example 9-6 Processing an LDAP URL Search Request Code Example 10-1 Getting the Root DSE Attribute Values Code Example 10-2 Determining the Supported LDAP Version Code Example 11-1 Initializing a Client SSL Connection Code Example 11-2 An Alternate Client SSL Initialization Code Example 11-3 Setting Custom SSL I/O Functions Code Example 12-1 Authenticating over SASL Code Example 13-1 Example of LDAPControl Structure Code Example 13-2 Sample Program to Search for Supported Controls Code Example 13-3 Sample Program to Apply Server-sorting Control Code Example 13-4 Calling ldap_create_persistentsearch_control() Code Example 13-5 Proxy Right ACI Code Example 13-6 Proxied Authorization Control Example Code Example 14-1 ldap_thread_fns Structure Code Example 14-2 Declaring ldap_extra_thread_fns Structure Code Example 14-3 Setting Up an ldap_thread_fns Structure Code Example 14-4 Using POSIX Threading Under Solaris Code Example 15-1 Requesting an Extended Operation Code Example 16-1 berval Definition Code Example 16-2 LDAPAPIFeatureInfo Definition Code Example 16-3 Sequence to Retrieve LDAPAPIFeatureInfo Code Example 16-4 LDAPAPIInfo Definition Code Example 16-5 Sequence to Retrieve LDAPAPIInfo Code Example 16-6 LDAP_CMP_CALLBACK Prototype Code Example 16-7 Definition of LDAPControl Code Example 16-8 LDAP_DNSFN_GETHOSTBYADDR Prototype Code Example 16-9 LDAP_DNSFN_GETHOSTBYNAME Prototype Code Example 16-10 ldap_dns_fns Definition Code Example 16-11 ldap_extra_thread_fns Definition Code Example 16-12 LDAPFiltInfo Definition Code Example 16-13 Sample LDAPFiltInfo Code Code Example 16-14 LDAPHostEnt Definition Code Example 16-15 LDAP_IOF_CLOSE_CONNECT_CALLBACK Prototype Code Example 16-16 LDAP_IOF_CONNECT_CALLBACK Prototype Code Example 16-17 LDAP_IOF_IOCTL_CALLBACK Prototype Code Example 16-18 LDAP_IOF_READ_CALLBACK Prototype Code Example 16-19 LDAP_IOF_SELECT_CALLBACK Prototype Code Example 16-20 LDAP_IOF_SOCKET_CALLBACK Prototype Code Example 16-21 LDAP_IOF_SSL_ENABLE_CALLBACK Prototype Code Example 16-22 LDAP_IOF_WRITE_CALLBACK Prototype Code Example 16-23 ldap_io_fns Structure Code Example 16-24 Installing ldap_memalloc_fns Code Example 16-25 LDAPMod Definition Code Example 16-26 Setting Up an LDAPMod Structure Code Example 16-27 LDAP_REBINDPROC_CALLBACK Prototype Code Example 16-28 LDAPsortkey Definition Code Example 16-29 LDAP_TF_GET_ERRNO_CALLBACK Prototype Code Example 16-30 LDAP_TF_GET_LDERRNO_CALLBACK Prototype Code Example 16-31 LDAP_TF_SET_ERRNO_CALLBACK Prototype Code Example 16-32 LDAP_TF_SET_LDERRNO_CALLBACK Prototype Code Example 16-33 LDAP_TF_MUTEX_ALLOC_CALLBACK Prototype Code Example 16-34 LDAP_TF_MUTEX_FREE_CALLBACK Prototype Code Example 16-35 LDAP_TF_MUTEX_LOCK_CALLBACK Prototype Code Example 16-36 LDAP_TF_MUTEX_UNLOCK_CALLBACK Prototype Code Example 16-37 LDAP_TF_THREADID_CALLBACK Prototype Code Example 16-38 ldap_thread_fns Structure Definition Code Example 16-39 LDAPURLDesc Definition Code Example 16-40 LDAP_VALCMP_CALLBACK Prototype Code Example 16-41 LDAPVersion Definition Code Example 16-42 LDAPVirtualList Definition Code Example 16-43 LDAP_X_EXTIOF_CLOSE_CALLBACK Prototype Code Example 16-44 LDAP_X_EXTIOF_CONNECT_CALLBACK Prototype Code Example 16-45 LDAP_X_EXTIOF_DISPOSEHANDLE_CALLBACK Prototype Code Example 16-46 LDAP_X_EXTIOF NEWHANDLE_CALLBACK Prototype Code Example 16-47 ldap_x_ext_io_fns Definition Code Example 16-48 LDAP_X_EXTIOF_POLL_CALLBACK Prototype Code Example 16-49 ldap_x_hostlist_status Definition Code Example 16-50 LDAP_X_PollFD Structure Definition Code Example 17-1 ber_free() Code Example Code Example 17-2 Cancelling an ldap_url_search() Operation Code Example 17-3 ldap_abandon_ext() Code Example Code Example 17-4 ldap_add() Code Example Code Example 17-5 ldap_add_s Code Example Code Example 17-6 ldap_compare() Code Sample Code Example 17-7 ldap_compare_s() Code Sample Code Example 17-8 ldap_count_values() Code Example Code Example 17-9 ldap_count_values_len() Code Example Code Example 17-10 Creating a Filter with ldap_create_filter() Code Example 17-11 ldap_delete() Code Example Code Example 17-12 ldap_delete_s() Code Example Code Example 17-13 ldap_err2string() Code Example Code Example 17-14 ldap_first_attribute() Code Example Code Example 17-15 ldap_free_friendlymap() Code Example Code Example 17-16 ldap_free_urldesc() Code Example Code Example 17-17 Unfriendly to Friendly Name Mapping File Code Example 17-18 ldap_friendly_name() Code Example Code Example 17-19 ldap_get_dn() Code Example Code Example 17-20 ldap_getfilter_free Code Example Code Example 17-21 ldap_getfirstfilter() Code Example Code Example 17-22 ldap_get_lderrno() Code Example Code Example 17-23 ldap_get_option() Code Example Code Example 17-24 LDAP_OPT_API_FEATURE_INFO and LDAP_OPT_API_INFO Usage Code Example 17-25 ldap_get_values() Code Example Code Example 17-26 ldap_get_values_len() Code Example Code Example 17-27 Space-Delimited List for ldap_init() Code Example 17-28 ldap_init() Example Using Variable Argument Code Example 17-29 ldap_init() Code Example Code Example 17-30 Loading a Filter Configuration File Code Example 17-31 ldap_init_getfilter() Code Example Code Example 17-32 ldap_is_ldap_url() Code Example Code Example 17-33 ldap_memfree() Code Example Code Example 17-34 ldap_modify() Code Example Code Example 17-35 ldap_modify_s() Code Example Code Example 17-36 ldap_modrdn2() Code Example Code Example 17-37 ldap_modrdn2_s() Code Example Code Example 17-38 ldap_mods_free() Code Example Code Example 17-39 ldap_msgfree() Code Example Code Example 17-40 ldap_msgid() Code Example Code Example 17-41 ldap_msgtype() Code Example Code Example 17-42 ldap_multisort_entries() Code Example Code Example 17-43 ldap_perror() Code Example Code Example 17-44 ldap_search() Code Example Code Example 17-45 ldap_search_s() Code Example Code Example 17-46 ldap_set_filter_additions() Code Example Code Example 17-47 ldap_set_lderrno() Code Example Code Example 17-48 ldap_set_option() Code Example Code Example 17-49 ldap_set_rebind_proc() Code Example Code Example 17-50 ldap_simple_bind() Code Example Code Example 17-51 ldap_simple_bind_s() Code Example Code Example 17-52 ldap_sort_entries() Code Example Code Example 17-53 ldap_sort_values() Code Example Code Example 17-54 ldapssl_advclientauth_init() Code Example Code Example 17-55 ldapssl_client_init() Code Example Code Example 17-56 ldapssl_clientauth_init() Code Example Code Example 17-57 ldapssl_init() Code Example Code Example 17-58 ldapssl_install_routines() Code Example Code Example 17-59 ldapssl_pkcs_fns Structure Definition Code Example 17-60 ldap_unbind() Code Example Code Example 17-61 ldap_unbind_s() Code Example Code Example 17-62 ldap_url_parse() Code Example Code Example 17-63 ldap_url_search() Code Example Code Example 17-64 ldap_url_search_s() Code Example Code Example A-1 Sample LDAP Entry Code Example A-2 Entry for Jennifer Jensen Code Example A-3 Generic LDIF Format Previous Contents Index Next Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Copyright 2004 Sun Microsystems, Inc. All rights reserved.