This book describes writing server plug-ins to customize and extended the capabilities of the Netscape Directory Server.
Sections:
Changes to the API
The following changes were made to the API between the Netscape Directory Server 3.x release and the 4.0 release of the server:
The syntax for the plugin directive in the slapd.*.conf files has changed in the 4.0 release. See "Editing the slapd.conf File" on page 40 for details.
New return codes have been defined for database functions. See "Writing Database Plug-In Functions" on page 82 for more information.
The slapi_entry_dup() function passes in a const Slapi_Entry * argument (rather than an Slapi_Entry * argument).
You can use the following new API functions when working with values of attributes in entries:
slapi_entry_attr_delete() (see page 272)
slapi_entry_attr_get_charptr() (see page 274)
slapi_entry_attr_get_int() (see page 275)
slapi_entry_attr_hasvalue() (see page 276)
slapi_entry_attr_replace() (see page 278)
slapi_entry_attr_set_charptr() (see page 279)
slapi_entry_attr_set_long() (see page 280)
You can use the Slapi_MatchingRuleEntry structure (see page 213) and the following new API functions when working with matching rule plug-ins:
slapi_matchingrule_free() (see page 310)
slapi_matchingrule_get() (see page 311)
slapi_matchingrule_new() (see page 312)
slapi_matchingrule_register() (see page 313)
slapi_matchingrule_set() (see page 314)
slapi_matchingrule_unregister() (see page 315)
The slapi_dn_issuffix() function and the slapi_dn_isparent() function both pass const arguments now.
You can use the following new API functions for locking and working with condition variables:
slapi_new_mutex() (see page 323)
slapi_lock_mutex() (see page 307)
slapi_unlock_mutex() (see page 348)
slapi_destroy_mutex() (see page 258)
slapi_new_condvar() (see page 322)
slapi_wait_condvar() (see page 351)
slapi_notify_condvar() (see page 324)
slapi_destroy_condvar() (see page 257)
The Slapi_Mutex structure (see page 214) represents a mutex and the Slapi_CondVar structure represents a condition variable (see page 210).
If you need to connect to another LDAP server from your plug-in, you can use the following API functions to initialize the LDAP session and to end the LDAP session:
slapi_ldap_init() (see page 304)
slapi_ldap_unbind() (see page 306)
The SLAPI_BE_MONITORDN parameter (used in the Netscape Directory Server 3.x releases to specify the DN for monitoring the back-end) is no longer available for use in the Netscape Directory Server 4.0 release.
If you are integrating your own back-end database with the server, you can define and register a function for generating indexes for the database. See "Generating Indexes for the Database" on page 118 for details.
If you are writing a database import function for your own back-end, you should check the following new parameters that the front-end can specify:
The SLAPI_LDIF2DB_NOATTRINDEXES parameter specifies whether or not indexes for the database should be generated automatically when the database is created.
The SLAPI_LDIF2DB_INCLUDE parameter specifies the suffixes and DNs of entries in the LDIF file that should be included in the database.
The SLAPI_LDIF2DB_EXCLUDE parameter specifies the suffixes and DNs of entries in the LDIF file that should be excluded from the database.
For more information, see the section "Importing an LDIF File into the Database" on page 114.
If you are writing your own back-end database functions, you can use the SLAPI_OPERATION_NOTES parameter to specify notes that you want appended to access log entries when the server sends a result or entry to an LDAP client. For more information, see the section "Adding Notes to Access Log Entries" on page 50.
For more information, see the section "Adding Notes to Access Log Entries" on page 50.
The following changes were made between the 3.0 version and the 4.0 release of the manual:
Added Chapter 12, "Writing Matching Rule Plug-Ins".
Corrected description of the database search functions and added more material under "Processing an LDAP Search Operation" on page 101.
A general understanding of the Internet and the World Wide Web (WWW).
A general understanding of the Lightweight Directory Access Protocol (LDAP) and the Netscape Directory Server. This book does not duplicate basic information on server administration or LDAP concepts.
Programming experience in C or C++.
If you're going to write a database plug-in, working knowledge of your database and its programming interfaces.
For information on installing, configuring, and managing the Netscape Directory Server, see the Netscape Directory Server Administrator's Guide and Managing Netscape Servers.
For information on writing LDAP clients with the LDAP C and Java API, see the Netscape LDAP C SDK Programmer's Guide and Reference and the Netscape LDAP Java SDK Programmer's Guide.
This book (the Netscape Directory Server Programmer's Guide and Reference) explains how to write your own server plug-ins to customize the Netscape Directory Server. You can write plug-ins that validate data before the data is stored in the directory, that notify users when data has changed, or that replace the standard database in the Directory Server with your own database.
http://help.netscape.com/
This is Netscape's technical support site. You can read the FAQ on the Netscape Directory Server or search the knowledge base for tips and information.
http://developer.netscape.com/one/directory/index.html This is LDAP Directory Developer Central. From this page, you can access the documentation online, download the client SDKs, read the release notes, and find support information and additional resources.
This is LDAP Directory Developer Central. From this page, you can access the documentation online, download the client SDKs, read the release notes, and find support information and additional resources.
This book uses Uniform Resource Locators (URLs) of the form
http://server.domain/path/file.html
In these URLs, server represents the name of the server on which you run your application, such as research1 or www; domain represents your Internet domain name, such as netscape.com or uiuc.edu; path represents the directory structure on the server; and file.html represents an individual filename. In general, items in italics in URLs are variables and items in normal monospace font are literals. If your server has Secure Sockets Layer (SSL) enabled, you would use https instead of http in the URL.
This book uses the following font conventions:
The monospace font is used for sample code and code listings, API and language elements (such as function names and class names), filenames, pathnames, directory names, HTML tags, and any text that must be typed on the screen. (Monospace italic font is used for placeholders embedded in code.)
Italic type is used for book titles, emphasis, variables and placeholders, and words used in the literal sense.
Boldface type is used for glossary terms.