This section summarizes features that were added since the Directory Server 4 was released up to and including Directory Server 5. This section does not include features that are reserved for internal use.
For information about a function, see Chapter 16, Function Reference, Part I.
The header file slapi-plugin.h identifies the current plug-in API as version 3. Plug-ins supporting API version 3 indicate the version in their description with SLAPI_PLUGIN_VERSION_03 or currently SLAPI_PLUGIN_CURRENT_VERSION.
New plug-in types have been added since the version 4 releases. For a list of supported plug-in types, refer to How Plug-Ins Interact With the Server.
Configuration entries rather than directives are now used to configure Directory Server plug-ins. Refer to Plugging Libraries Into Directory Server for details on using configuration entries to load and configure plug-ins.
The Netscape Portable Runtime (NSPR) API allows compliant applications to use system facilities. The system facilities include threads, thread synchronization, I/O, interval timing, atomic operations, and other low-level services. NSPR allows access to these facilities in a platform-independent manner.
For information about the version of NSPR used currently, refer to http://www.mozilla.org/projects/nspr/release-notes/.
The following table shows new flags defined for use with existing functions for handling attributes.
Table 3–6 New Flags for Handling Attributes
Function |
Flags Added |
---|---|
slapi_attr_get_flags() |
SLAPI_ATTR_FLAG_COLLECTIVE SLAPI_ATTR_FLAG_NOUSERMOD SLAPI_ATTR_FLAG_OBSOLETE SLAPI_ATTR_FLAG_STD_ATTR |
slapi_attr_type_cmp() |
SLAPI_TYPE_CMP_BASE SLAPI_TYPE_CMP_EXACT SLAPI_TYPE_CMP_SUBTYPE |
The old flags are still available. Refer to comments in slapi-plugin.h for hints on how to use the flags.
The following functions have been added to handle attributes and their values:
slapi_attr_add_value() slapi_attr_first_value() slapi_attr_get_numvalues() slapi_attr_get_valueset() slapi_attr_init() slapi_attr_next_value() slapi_attr_set_valueset() slapi_attr_syntax_normalize() slapi_attr_types_equivalent()
The following functions have been added to handle Slapi_Backend structures:
slapi_be_exist() slapi_be_get_name() slapi_be_get_readonly() slapi_be_getsuffix() slapi_be_gettype() slapi_be_is_flag_set() slapi_be_issuffix() slapi_be_logchanges() slapi_be_private() slapi_be_select() slapi_be_select_by_instance_name() slapi_free_suffix_list() slapi_get_first_backend() slapi_get_next_backend() slapi_get_suffix_list() slapi_is_root_suffix()
slapi_build_control() slapi_build_control_from_berval() slapi_dup_control()
The following data structures are now defined in slapi-plugin.h to wrap key objects used by Directory Server plug-ins:
Slapi_Attr Slapi_Backend Slapi_ComponentId Slapi_Connection Slapi_DN Slapi_Entry Slapi_Filter Slapi_MatchingRuleEntry Slapi_Mod Slapi_Mods Slapi_Operation Slapi_PBlock Slapi_RDN Slapi_Value Slapi_ValueSet
The following functions have been added to handle Slapi_DN structures:
slapi_dn_normalize_to_end() slapi_dn_plus_rdn() slapi_moddn_get_newdn() slapi_sdn_compare() slapi_sdn_copy() slapi_sdn_done() slapi_sdn_dup() slapi_sdn_free() slapi_sdn_get_backend_parent() slapi_sdn_get_dn() slapi_sdn_get_ndn() slapi_sdn_get_ndn_len() slapi_sdn_get_parent() slapi_sdn_get_rdn() slapi_sdn_is_rdn_component() slapi_sdn_isempty() slapi_sdn_isgrandparent() slapi_sdn_isparent() slapi_sdn_issuffix() slapi_sdn_new() slapi_sdn_new_dn_byref() slapi_sdn_new_dn_byval() slapi_sdn_new_dn_passin() slapi_sdn_new_ndn_byref() slapi_sdn_new_ndn_byval() slapi_sdn_scope_test() slapi_sdn_set_dn_byref() slapi_sdn_set_dn_byval() slapi_sdn_set_dn_passin() slapi_sdn_set_ndn_byref() slapi_sdn_set_ndn_byval() slapi_sdn_set_parent() slapi_sdn_set_rdn()
The slapi_str2entry() function contains the following new flags defined for handling entries:
SLAPI_STR2ENTRY_EXPAND_OBJECTCLASSES SLAPI_STR2ENTRY_IGNORE_STATE SLAPI_STR2ENTRY_INCLUDE_VERSION_STR SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF SLAPI_STR2ENTRY_TOMBSTONE_CHECK
The old flags are still available. Refer to comments in slapi-plugin.h for hints on how to use the flags.
The following functions have been added to handle entries:
slapi_entry2str_with_options() slapi_entry_add_string() slapi_entry_add_value() slapi_entry_attr_add() slapi_entry_attr_get_long() slapi_entry_attr_get_uint() slapi_entry_attr_get_ulong() slapi_entry_attr_remove() slapi_entry_attr_set_int() slapi_entry_attr_set_uint() slapi_entry_attr_set_ulong() slapi_entry_delete_string() slapi_entry_get_dn_const() slapi_entry_get_ndn() slapi_entry_get_sdn() slapi_entry_get_sdn_const() slapi_entry_get_uniqueid() slapi_entry_has_children() slapi_entry_init() slapi_entry_set_sdn() slapi_entry_size() slapi_is_rootdse()
The following functions have been added to handle Slapi_Filter structures:
slapi_filter_apply() slapi_filter_compare() slapi_filter_get_attribute_type() slapi_filter_has_extension() slapi_filter_test_simple() slapi_find_matching_paren() slapi_vattr_filter_test()
The following new functions are intended for use with the updated interface:
slapi_add_entry_internal_set_pb() slapi_add_internal_set_pb() slapi_delete_internal_set_pb() slapi_modify_internal_set_pb() slapi_rename_internal_set_pb() slapi_search_internal_get_entry() slapi_search_internal_set_pb()
Refer to Chapter 1, Before You Start Writing Plug-Ins to see how to use the updated interface.
The following table shows functions that have been added to manage memory.
Table 3–7 New Functions for Managing Memory
The following functions have been added to handle Slapi_Mod structures:
slapi_mod_add_value() slapi_mod_done() slapi_mod_dump() slapi_mod_free() slapi_mod_get_first_value() slapi_mod_get_next_value() slapi_mod_get_num_values() slapi_mod_get_operation() slapi_mod_get_type() slapi_mod_init() slapi_mod_init_byref() slapi_mod_init_byval() slapi_mod_init_passin() slapi_mod_isvalid() slapi_mod_new() slapi_mod_remove_value() slapi_mod_set_operation() slapi_mod_set_type()
The following functions have been added to handle Slapi_Mods structures:
slapi_entry2mods() slapi_mods2entry() slapi_mods_add() slapi_mods_add_ldapmod() slapi_mods_add_mod_values() slapi_mods_add_modbvps() slapi_mods_add_smod() slapi_mods_add_string() slapi_mods_done() slapi_mods_dump() slapi_mods_free() slapi_mods_get_first_smod() slapi_mods_get_next_mod() slapi_mods_get_next_smod() slapi_mods_get_num_mods() slapi_mods_init() slapi_mods_init_byref() slapi_mods_init_passin() slapi_mods_insert_after() slapi_mods_insert_at() slapi_mods_insert_before() slapi_mods_insert_smod_at() slapi_mods_insert_smod_before() slapi_mods_iterator_backone() slapi_mods_new() slapi_mods_remove()
Object extensions offer a new way of passing data through Directory Server from plug-in to plug-in. The following macros define extensible objects:
SLAPI_EXT_CONNECTION SLAPI_EXT_ENTRY SLAPI_EXT_MTNODE SLAPI_EXT_OPERATION
The following new functions and associated constructor and destructor callbacks are part of the object extension interface:
slapi_extension_constructor_fnptr slapi_extension_destructor_fnptr slapi_get_object_extension() slapi_register_object_extension() slapi_set_object_extension()
slapi_op_get_type()
slapi_op_is_flag_set()
SLAPI_CLIENT_DNS SLAPI_CONFIG_DIRECTORY SLAPI_CONN_CERT SLAPI_CONN_CLIENTNETADDR SLAPI_CONN_IS_REPLICATION_SESSION SLAPI_CONN_IS_SSL_SESSION SLAPI_CONN_SERVERNETADDR SLAPI_CONTROLS_ARG SLAPI_DESTROY_CONTENT SLAPI_IS_INTERNAL_OPERATION SLAPI_IS_REPLICATED_OPERATION SLAPI_ORIGINAL_TARGET SLAPI_ORIGINAL_TARGET_DN SLAPI_PLUGIN_ENTRY_FETCH_FUNC SLAPI_PLUGIN_ENTRY_STORE_FUNC SLAPI_PLUGIN_IDENTITY SLAPI_PLUGIN_INTERNAL_POST_ADD_FN SLAPI_PLUGIN_INTERNAL_POST_DELETE_FN SLAPI_PLUGIN_INTERNAL_POST_MODIFY_FN SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN SLAPI_PLUGIN_INTERNAL_PRE_ADD_FN SLAPI_PLUGIN_INTERNAL_PRE_DELETE_FN SLAPI_PLUGIN_INTERNAL_PRE_MODIFY_FN SLAPI_PLUGIN_INTERNAL_PRE_MODRDN_FN SLAPI_PLUGIN_POSTSTART_FN SLAPI_PLUGIN_PWD_STORAGE_SCHEME_CMP_FN SLAPI_PLUGIN_PWD_STORAGE_SCHEME_DB_PWD SLAPI_PLUGIN_PWD_STORAGE_SCHEME_DEC_FN SLAPI_PLUGIN_PWD_STORAGE_SCHEME_ENC_FN SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME SLAPI_PLUGIN_PWD_STORAGE_SCHEME_USER_PWD SLAPI_RESULT_CODE SLAPI_RESULT_MATCHED SLAPI_RESULT_TEXT
The following functions have been added to handle Slapi_RDN structures:
slapi_rdn_add() slapi_rdn_compare() slapi_rdn_contains() slapi_rdn_contains_attr() slapi_rdn_done() slapi_rdn_free() slapi_rdn_get_first() slapi_rdn_get_index() slapi_rdn_get_index_attr() slapi_rdn_get_next() slapi_rdn_get_nrdn() slapi_rdn_get_num_components() slapi_rdn_get_rdn() slapi_rdn_init() slapi_rdn_init_dn() slapi_rdn_init_rdn() slapi_rdn_init_sdn() slapi_rdn_isempty() slapi_rdn_new() slapi_rdn_new_dn() slapi_rdn_new_rdn() slapi_rdn_new_sdn() slapi_rdn_remove() slapi_rdn_remove_attr() slapi_rdn_remove_index() slapi_rdn_set_dn() slapi_rdn_set_rdn() slapi_rdn_set_sdn() slapi_sdn_add_rdn()
The following functions have been added to handle UTF8 encoding and decoding:
slapi_has8thBit() slapi_UTF8CASECMP() slapi_UTF8ISLOWER() slapi_UTF8ISUPPER() slapi_UTF8NCASECMP() slapi_UTF8STRTOLOWER() slapi_UTF8STRTOUPPER() slapi_UTF8TOLOWER() slapi_UTF8TOUPPER()
The following functions have been added to handle Slapi_Value structures:
slapi_value_compare() slapi_value_dup() slapi_value_free() slapi_value_get_berval() slapi_value_get_int() slapi_value_get_length() slapi_value_get_long() slapi_value_get_string() slapi_value_get_uint() slapi_value_get_ulong() slapi_value_init() slapi_value_init_berval() slapi_value_init_string() slapi_value_init_string_passin() slapi_value_new() slapi_value_new_berval() slapi_value_new_string() slapi_value_new_string_passin() slapi_value_new_value() slapi_value_set() slapi_value_set_berval() slapi_value_set_int() slapi_value_set_string() slapi_value_set_string_passin() slapi_value_set_value() slapi_valuearray_free()
The following functions have been added to handle Slapi_Valueset structures:
slapi_valueset_add_value() slapi_valueset_count() slapi_valueset_done() slapi_valueset_find() slapi_valueset_first_value() slapi_valueset_free() slapi_valueset_init() slapi_valueset_new() slapi_valueset_next_value() slapi_valueset_set_from_smod() slapi_valueset_set_valueset()
slapi_entry_vattr_find() slapi_vattr_attr_free() slapi_vattr_attrs_free() slapi_vattr_is_registered() slapi_vattr_list_attrs() slapi_vattr_values_free() slapi_vattr_values_get_ex()