[Next] [Index]

Netscape Directory SDK Programmer's Guide

Who Should Read This Guide?
What's in This Guide?
Conventions in This Book

Part 1 Writing Clients with the Directory SDK

Chapter 1  Understanding LDAP

How Directory Services Work
How LDAP Servers Organize Directories
How LDAP Clients and Servers Work

Chapter 2  Using the Directory SDK

LDAP Application Programming Interface
Directory SDK
Including the LDAP Header File
Compiling Clients
Compiling Clients on UNIX
Compiling Clients on Windows
Compiling Clients on Mac OS
Getting Version Information

Chapter 3  Writing LDAP Clients

Initializing an LDAP Session
Getting and Setting Session Options
Setting Time Limits and Size Limits for Searches
Handling Aliases
Handling Referrals
Using Threads
Initializing a Session Over SSL
Enabling Your Client to Connect Over SSL
Alternative Method for Connecting Over SSL
Authenticating the client to an LDAP Server
Performing a Synchronous Authentication Operation
Performing an Asynchronous Authentication Operation
Authenticating as an Anonymous User
Reauthentication When Clients Are Referred to Other Servers
Performing LDAP Operations
Closing the Connection to the Server
Freeing Memory
Checking for Errors
Printing Out Error Messages
Getting Information About the Error
Converting an Error Code to an Error Message
Setting error codes
Synchronous and Asynchronous Functions
Calling Synchronous Functions
Calling Asynchronous Functions
Checking the Status of the LDAP Operation
Determining Whether the Operation Was Successful
Canceling an Operation in Progress
Example of Calling an Asynchronous Function
A Simple Example

Chapter 4  Searching the Directory

Specifying Search Criteria
Simple Search Syntax
Advanced Search Syntax
Initiating a Search
Specifying the scope of the search
Example of a subtree search
Getting Search Results
Getting Entries from the Results
Getting Distinguished Names from the Results
Getting the Distinguished Name of an Entry
Getting the Components of a Distinguished Name
Getting Attributes from an Entry
Getting the Values of an Attribute
Freeing the Results of a Search
Example: Searching the Directory
Sorting the Search Results
Sorting Entries by an Attribute
Sorting Entries by Multiple Attributes
Sorting the Values of an Attribute
Reading an Entry
Listing Subentries

Chapter 5  Using Filter Configuration Files

Understanding the Configuration File Syntax
Understanding %v Parameters
Loading a Filter Configuration File
Retrieving Filters
Adding filter prefixes and suffixes
Freeing Filters from Memory
Building Filters

Chapter 6  Adding and Updating Entries

Specifying Changes to an Attribute
Adding a New Entry
Specifying the Values of an Attribute
Specifying a Single Value in an Attribute
Specifying Multiple Values in an Attribute
Specifying Binary Data as the Values of an Attribute
Specifying the Attributes in the Entry
Adding the Entry to the Directory
Performing a Synchronous Add Operation
Performing an Asynchronous Add Operation
Modifying an Existing Entry
Specifying the Changes to an Attribute
Changing the Values of an Attribute
Removing an Attribute
Adding an Attribute
Assembling the List of Changes
Modifying the Entry in the Directory
Performing a Synchronous Modify Operation
Performing an Asynchronous Modify Operation
Deleting an Entry
Performing a Synchronous Delete Operation
Performing an Asynchronous Delete Operation
Changing the Name of an Entry
Performing a Synchronous Renaming Operation
Performing an Asynchronous Renaming Operation
Comparing the Value of an Attribute
Performing a Synchronous Comparison Operation
Performing an Asynchronous Comparison Operation

Chapter 7  Working with LDAP URLs

Components of an LDAP URL
Examples of LDAP URLs
Determining Whether a URL is an LDAP URL
Getting the Components of a URL
Freeing a URL Description
Processing an LDAP URL

Part 2 Reference

Chapter 8  Data Structures

berval
BerElement
FriendlyMap
LDAP
LDAPFiltDesc
LDAPFiltInfo
ldap_io_fns
LDAPMod
LDAPMessage
ldap_thread_fns
LDAPURLDesc
LDAPVersion

Chapter 9  Functions

Summary of Functions by Task
Initializing and Ending LDAP Sessions
Authenticating to an LDAP Server
Performing LDAP Operations
Getting Search Results
Sorting Search Results
Working with Search Filters
Working with Distinguished Names
Working with LDAP URLs
Handling Errors
Freeing Memory
Functions (in alphabetical order)
ldap_abandon()
ldap_add()
ldap_add_s()
ldap_ber_free()
ldap_build_filter()
ldap_compare()
ldap_compare_s()
ldap_count_entries()
ldap_count_values()
ldap_count_values_len()
ldap_create_filter()
ldap_delete()
ldap_delete_s()
ldap_err2string()
ldap_explode_dn()
ldap_explode_rdn()
ldap_first_attribute()
ldap_first_entry()
ldap_free_friendlymap()
ldap_free_urldesc()
ldap_friendly_name()
ldap_get_dn()
ldap_getfilter_free()
ldap_getfirstfilter()
ldap_get_lderrno()
ldap_getnextfilter()
ldap_get_option()
ldap_get_values()
ldap_get_values_len()
ldap_init()
ldap_init_getfilter()
ldap_init_getfilter_buf()
ldap_is_ldap_url()
ldap_memfree()
ldap_modify()
ldap_modify_s()
ldap_modrdn()
ldap_modrdn_s()
ldap_modrdn2()
ldap_modrdn2_s()
ldap_mods_free()
ldap_msgfree()
ldap_msgid()
ldap_msgtype()
ldap_multisort_entries()
ldap_next_attribute()
ldap_next_entry()
ldap_perror()
ldap_result()
ldap_result2error()
ldap_search()
ldap_search_s()
ldap_search_st()
ldap_set_filter_additions()
ldap_setfilteraffixes()
ldap_set_lderrno()
ldap_set_option()
ldap_set_rebind_proc()
ldap_simple_bind()
ldap_simple_bind_s()
ldap_sort_entries()
ldap_sort_values()
ldap_sort_strcasecmp()
ldap_unbind()
ldap_unbind_s()
ldap_url_parse()
ldap_url_search()
ldap_url_search_s()
ldap_url_search_st()
ldap_value_free()
ldap_value_free_len()
ldap_version()
ldapssl_client_init()
ldapssl_init()
ldapssl_install_routines()

Chapter 10  Status Codes

Part 3 Appendixes

Appendix A  Distinguished Names

Distinguished Name Syntax
Distinguished Name Attributes
Distinguished Name Examples

Appendix B  Entries and Attributes

Schema Checking
Entry Type Definition
Attribute Definition
Entry Types
Attributes

Appendix C  Writing Multithreaded Clients

Specifying Thread Functions
Setting Up the ldap_thread_fns Structure
Setting the Session Options
Example of a Pthreads Client Application

Appendix D  LDAP Command-Line Utilities

Using LDIF Format
Using LDIF to Add Entries
Specifying an Organizational Person
Example: Using an LDIF File to Add Entries
Using LDIF to Update Entries
Specifying Different Types of Changes
changetype: add
changetype: delete
changetype: modrdn
changetype: modify
Example: Using LDIF update statements
Using the Command-Line Utilities
General Instructions
Using Quotation Marks
Providing Input from the Command Line
ldapadd
ldapdelete
ldapmodify
ldapmodrdn
ldapsearch

Index


[Next] [Index]

Last modified: March 31, 1997
Copyright © 1997 Netscape Communications Corporation