Netscape logo Plug-in Programmer's Guide
Netscape Directory Server                                                                                                                                  

Previous
Contents
Index
DocHome Next

 

Chapter 16   Parameter Block Reference



This chapter describes the parameters available in the Slapi_PBlock parameter block, the type of data associated with each parameter, and the plug-in functions in which those parameters are accessible.

To get the values of these parameters, call the slapi_pblock_get() function. To set the values of these parameters, call the slapi_pblock_set() function. Using these parameters, you can get and set the following information:


Parameters for Registering Plug-in Functions

The parameters listed in this section identify plug-in functions recognized by the server. To register your plug-in function, set the value of the appropriate parameter to the name of your function.


Note 

With the exception of the parameters for matching rule plug-in functions, you do not need to get the value of any of these parameters.


The parameters for registering plug-in functions are organized in the following sections:



Note 

Database plug-ins are not supported in current releases of Directory Server. Please use the pre-operation, post-operation, and/or extended operation API to register plug-in functions.



Pre-Operation/Data Validation Plug-ins

The parameters listed in this section are used to register pre-operation/data validation plug-in functions.

To register your plug-in function, write an initialization function that sets the values of the following parameters to your functions.  

Parameter ID

Description

SLAPI_PLUGIN_PRE_BIND_FN

This function is called before an LDAP bind operation is completed.

SLAPI_PLUGIN_PRE_UNBIND_FN

This function is called before an LDAP unbind operation is completed.

SLAPI_PLUGIN_PRE_SEARCH_FN

This function is called before an LDAP search operation is completed.

SLAPI_PLUGIN_PRE_COMPARE_FN

This function is called before an LDAP compare operation is completed.

SLAPI_PLUGIN_PRE_MODIFY_FN

This function is called before an LDAP modify operation is completed.

SLAPI_PLUGIN_PRE_MODRDN_FN

This function is called before an LDAP modify RDN operation is completed.

SLAPI_PLUGIN_PRE_ADD_FN

This function is called before an LDAP add operation is completed.

SLAPI_PLUGIN_PRE_DELETE_FN

This function is called before an LDAP delete operation is completed.

SLAPI_PLUGIN_PRE_ENTRY_FN

This function is called before an entry is sent back to the client.

SLAPI_PLUGIN_PRE_REFERRAL_FN

This function is called before a set of referrals is sent back to the client.

SLAPI_PLUGIN_PRE_RESULT_FN

This function is called before a set of search results is sent back to the client.

SLAPI_PLUGIN_START_FN

This function is called after the server starts up. You can specify a start function for each pre-operation plug-in.

SLAPI_PLUGIN_CLOSE_FN

This function is called before the server shuts down. You can specify a close function for each pre-operation plug-in.

SLAPI_PLUGIN_DESTROY_FN

This function is for freeing a filter function or indexer function.

SLAPI_PLUGIN_INTERNAL_PRE_ADD_FN

This function is called before an internal LDAP add operation is completed.

SLAPI_PLUGIN_INTERNAL_PRE_DELETE_FN

This function is called before an internal LDAP delete operation is completed.

SLAPI_PLUGIN_INTERNAL_PRE_MODIFY_FN

This function is called before an internal LDAP modify operation is completed.

SLAPI_PLUGIN_INTERNAL_PRE_MODRDN_FN

This function is called before an internal LDAP modify RDN operation is completed.


Post-Operation/Data Notification Plug-ins

The parameters listed in this section are used to register post-operation/data notification plug-in functions.  

Parameter ID

Description

SLAPI_PLUGIN_POST_BIND_FN

This function is called after an LDAP bind operation is completed.

SLAPI_PLUGIN_POST_UNBIND_FN

This function is called after an LDAP unbind operation is completed.

SLAPI_PLUGIN_POST_SEARCH_FN

This function is called after an LDAP search operation is completed.

SLAPI_PLUGIN_POST_COMPARE_FN

This function is called after an LDAP compare operation is completed.

SLAPI_PLUGIN_POST_MODIFY_FN

This function is called after an LDAP modify operation is completed.

SLAPI_PLUGIN_POST_MODRDN_FN

This function is called after an LDAP modify RDN operation is completed.

SLAPI_PLUGIN_POST_ADD_FN

This function is called after an LDAP add operation is completed.

SLAPI_PLUGIN_POST_DELETE_FN

This function is called after an LDAP delete operation is completed.

SLAPI_PLUGIN_POST_ABANDON_FN

This function is called after an LDAP abandon operation is completed.

SLAPI_PLUGIN_POST_ENTRY_FN

This function is called after an entry is sent back to the client.

SLAPI_PLUGIN_POST_REFERRAL_FN

This function is called after a set of referrals is sent back to the client.

SLAPI_PLUGIN_POST_RESULT_FN

This function is called after a set of search results is sent back to the client.

SLAPI_PLUGIN_START_FN

This function is called after the server starts up. You can specify a start function for each post-operation plug-in.

SLAPI_PLUGIN_INTERNAL_POST_ADD_FN

This function is called after an internal LDAP add operation is completed.

SLAPI_PLUGIN_INTERNAL_POST_DELETE_FN

This function is called after an internal LDAP delete operation is completed.

SLAPI_PLUGIN_INTERNAL_POST_MODIFY_FN

This function is called after an internal LDAP modify operation is completed.

SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN

This function is called after an internal LDAP modify RDN operation is completed.


Matching Rule Plug-ins

The parameters listed below are used with matching rule plug-in functions that can be registered.  

Parameter ID

Description

SLAPI_PLUGIN_MR_FILTER_CREATE_FN

This is a factory function for creating filter functions. This function must be thread-safe since the server may call it concurrently with other functions.

SLAPI_PLUGIN_MR_INDEXER_CREATE_FN

This is a factory function for creating indexer functions. This function must be thread-safe since the server may call it concurrently with other functions.

SLAPI_PLUGIN_MR_FILTER_MATCH_FN

This functions uses the ID to set and get a filter function.

SLAPI_PLUGIN_MR_FILTER_INDEX_FN

This is a filter function that uses an index to accelerate the processing of a search request.

SLAPI_PLUGIN_MR_FILTER_RESET_FN

This function resets the filter function.

SLAPI_PLUGIN_MR_INDEX_FN

This function uses the ID to get and set the index function.


Entry Plug-ins

The parameters listed below are used for entry store and entry fetch plug-in functions. These plug-in functions are called by the server before writing an entry to disk and after reading an entry from disk. Entry store and entry fetch plug-in functions are passed using the string representation (in LDIF) of the entry.


Note 

The Directory Server caches recently added and retrieved entries in memory. The entry fetch plug-in function is called only when reading the entry from the disk, not when reading the entry from the cache.


 

Parameter ID

Description

SLAPI_PLUGIN_ENTRY_FETCH_FUNC

This function fetches information that represents an LDAP entry.

SLAPI_PLUGIN_ENTRY_STORE_FUNC

This function stores information about an entry that was fetched by the SLAPI_PLUGIN_ENTRY_FETCH_FUNC function.


Parameters Accessible to All Plug-ins

The parameters listed in this section are accessible to all types of plug-ins. The parameters in this section are organized in the following sections:


Information about the Database

The parameters listed below specify information about the backend database. These parameters are available for all types of plug-ins. These specific parameters cannot be set by calling slapi_pblock_set(). You can, however, get these parameters by calling slapi_pblock_get ().  

Parameter ID

Data Type

Description

SLAPI_BACKEND

Slapi_Backend *

The database backend servicing this operation. The value may be NULL if there is currently no backend associated with the operation.

SLAPI_BE_MONITORDN

char *

This is no longer supported.

SLAPI_BE_TYPE

char *

Type of backend database; this is the type specified by the nsslapd-database directive in the server configuration file.

SLAPI_BE_READONLY

int

Specifies whether the backend database is read-only; this is determined by the nsslapd-readonly directive in the server configuration file.

  • 1 means that the database backend is read-only.

  • 0 means that the database backend is writeable.

SLAPI_DBSIZE

int

Specifies the size of the backend database.

SLAPI_BE_LASTMOD

int

If 0 (false), the database does not keep track of the last modification time and who modified it. If non-zero (true), the database does keep track. The default is true.

SLAPI_BE_FLAG_REMOTE_DATA

int

Flag that indicates the entries held by the backend are remote.

SLAPI_BE_ALL_BACKENDS

int

Special value that is returned by a distribution plug-in function to indicate that all back-ends should be searched. Used only for search operations.

SLAPI_BE_MAXNESTLEVEL

int *

Indicates the maximum number of nesting levels allowed within groups for access control evaluation.

SLAPI_CLIENT_DNS

struct berval **

Contains a list of client IP addresses that are registered in DNS. Used to determine the authorization type.

SLAPI_FAIL_DISKFULL

int

Return code for a backend API call that indicates the disk is full and the operation has failed.

SLAPI_FAIL_GENERAL

int

Return code for a backend API call that indicates that the operation has failed due to some cause other than disk full.


Information about the Connection

The parameters listed below specify information about the connection. These parameters are available for all types of plug-ins.  

Parameter ID

Data Type

Description

SLAPI_CONN_CERT

CERTCertificate *

Note: This is an NSS database. See http://mozilla.org/projects/security/pki/nss/

The client certificate associated with the connection; may be absent.

SLAPI_CONN_IS_REPLICATION_
SESSION

char *

Indicates the current connection is a replication session.

SLAPI_CONN_IS_SSL_
CONNECTION

char *

Indicates the current connection is through SSL.

SLAPI_CONNECTION

Slapi_Connection *

Information about the current client connection.

SLAPI_CONN_ID

int *

ID identifying the current connection.

SLAPI_CONN_DN

char *

DN of the user authenticated on the current connection. If you call slapi_pblock_get() to get this DN, you should call slapi_ch_free_string() to free the resulting DN when done.

SLAPI_CONN_AUTHMETHOD

char *

Method used to authenticate the current user. If you call slapi_pblock_get() to get this value, you should call slapi_ch_free_string() to free the resulting value when done. This parameter can have one of the following values:

  • SLAPD_AUTH_NONE specifies that no authentication mechanism was used (for example, in cases of anonymous authentication).

  • SLAPD_AUTH_SIMPLE specifies that simple authentication (user name and password) was used to authenticate the current user.

  • SLAPD_AUTH_SSL specifies that SSL (certificate-based authentication) was used to authenticate the current user.

  • SLAPD_AUTH_SASL specifies that a SASL (Simple Authentication and Security Layer) mechanism was used to authenticate the current user.

SLAPI_CONN_AUTHTYPE

char *

This parameter has been deprecated for current releases. Use SLAPI_CONN_AUTHMETHOD instead.

SLAPI_CONN_CLIENTIP

struct in_addr

IP address of the client requesting the operation. This parameter has been replaced by SLAPI_CONN_CLIENTNETADDR but is provided here for backward compatibility.

SLAPI_CONN_SERVERIP

struct in_addr

IP address to which the client is connecting. You might want to use this parameter if, for example, your server accepts connections on multiple IP addresses.This parameter has been replaced by SLAPI_CONN_SERVERADDR but is provided here for backward compatibility

SLAPI_CONN_CLIENTNETADDR*

PRNetAddr

IP address of the client requesting the operation.

SLAPI_CONN_SERVERNETADDR*

PRNetAddr

IP address to which the client is connecting. You might want to use this parameter if, for example, your server accepts connections on multiple IP addresses.

*These parameters use an NSPR structure. See http://www.mozilla.org/projects/nspr for more information.


Information about the Operation

The parameters listed below specify information about the current operation. These parameters are available for all types of plug-ins.  

Parameter ID

Data Type

Description

SLAPI_OPERATION

Slapi_Operation *

Information about the operation currently in progress.

SLAPI_OPINITIATED_TIME

time_t

Time when the server began processing the operation.

SLAPI_REQUESTOR_ISROOT

int

Specifies whether the user requesting the operation is the root DN.

  • 1 means that the root DN is requesting the operation.

  • 0 means that the user requesting the operation is not the root DN.

The root DN is the superuser of the directory. This DN is specified by the nsslapd-rootdn attribute in the cn=config entry in the server configuration file.

SLAPI_REQUESTOR_ISUPDATEDN

int

Deprecated.

SLAPI_REQUESTOR_DN

char *

Specifies the DN of the user requesting the operation.

SLAPI_TARGET_DN

char *

Specifies the DN to which the operation applies; for example, the DN of the entry being added or removed.

SLAPI_REQCONTROLS

LDAPControl **

Array of the controls specified in the request.

SLAPI_CONTROLS_ARG

LDAPControl **

Allows control arguments to be passed before an operation object is created.


Information about Extended Operations

The following table lists the parameters in the parameter block passed to extended operation functions. If you are writing your own plug-in function for performing this work, you can get these values by calling the slapi_pblock_get() function.  

Parameter ID

Data Type

Description

SLAPI_EXT_OP_REQ_OID

char *

Object ID (OID) of the extended operation specified in the request.

SLAPI_EXT_OP_REQ_VALUE

struct berval*

Value specified in the request.

SLAPI_EXT_OP_RET_OID

char *

Object ID (OID) that you want sent back to the client.

SLAPI_EXT_OP_RET_VALUE

struct berval*

Return value that you want sent back to the client.


Information about the Transaction

The parameters listed below specify information about the current transaction. These parameters are available for all types of plug-ins.  

Parameter ID

Data Type

Description

SLAPI_PARENT_TXN

void *

Parent transaction.

SLAPI_TXN

void *

ID for current transaction.


Information about Access Control Lists

The parameters listed below are used with the access control list (ACL) plug-in functions to determine access control levels.  

Parameter ID

Data Type

Description

SLAPI_PLUGIN_ACL_ALLOW_ACCESS

int

Flag sent to the ACL plug-in when it is called that indicates that ACL access is allowed.

SLAPI_PLUGIN_ACL_INIT

int

Flag that is set when ACL plug-ins are initialized that allows the use of ACL plug-in access functions.

SLAPI_PLUGIN_ACL_MODS_ALLOWED

int

Flag that indicates if the modifications that were made are allowed.

SLAPI_PLUGIN_ACL_MODS_UPDATE

int

Flag that indicates you can modify (remove, ad, or change) the access control items (ACIs).

SLAPI_PLUGIN_ACL_SYNTAX_CHECK

int

Flag that verifies the ACI being added for the entry has a valid syntax.


Notes in the Access Log

The parameters listed below specify notes that can be appended to access log entries. These parameters are available for all types of plug-ins.  

Parameter ID

Data Type

Description

SLAPI_OPERATION_NOTES

unsigned int

Flags specifying the notes that you want appended to access log entries.

You can set this parameter to the following value:

  • SLAPI_OP_NOTE_UNINDEXED specifies that you want the string Notes=U appended to access log entries. You can use this to indicate that a search operation could not use indexes to generate a smaller list of candidates.

If no flags are set, no notes are appended to access log entries.


Information about the Plug-in

The parameters listed below specify information about the plug-in that is available to all plug-in functions defined in the current library. These parameters are available for all types of plug-ins.  

Parameter ID

Data Type

Description

SLAPI_PLUGIN

void *

Pointer to the internal server representation of this plug-in.

SLAPI_PLUGIN_PRIVATE

void *

Private data that you want passed to your plug-in functions.

SLAPI_PLUGIN_TYPE

int

Specifies the type of plug-in function (see Types of Plug-ins)

SLAPI_PLUGIN_ARGV

char **

NULL-terminated array of command-line arguments specified for the plugin directive in the server configuration file.

SLAPI_PLUGIN_ARGC

int

Number of command-line arguments specified for the plugin directive in the server configuration file.

SLAPI_PLUGIN_VERSION

char *

Specifies the version of the plug-in function (see Version Information).

SLAPI_PLUGIN_OPRETURN

int

Specifies the return value of the LDAP operation that has just been processed.

SLAPI_PLUGIN_OBJECT

void *

Reserved for internal use only; used with filter processing.

SLAPI_PLUGIN_DESTROY_FN

void *

Reserved for internal use only; used with filter processing.

SLAPI_PLUGIN_DESCRIPTION

char *

Provides a description of this plug-in function.

SLAPI_PLUGIN_IDENTITY

char *

Identifies this plug-in function.


Types of Plug-ins

The SLAPI_PLUGIN_TYPE parameter can have one of the following values, which identifies the type of the current plug-in:  

Defined Constant

Description

SLAPI_PLUGIN_DATABASE

Deprecated.

SLAPI_PLUGIN_EXTENDEDOP

Extended operation plug-in.

SLAPI_PLUGIN_PREOPERATION

Pre-operation/data validation plug-in.

SLAPI_PLUGIN_POSTOPERATION

Post-operation/data notification plug-in.

SLAPI_PLUGIN_MATCHINGRULE

Matching rule plug-in.

SLAPI_PLUGIN_SYNTAX

Syntax plug-in.

SLAPI_PLUGIN_ACL

Access control plug-in.

SLAPI_PLUG_BEPREOPERATION

Database pre-operation plug-in.

SLAPI_PLUGIN_BEPOSTOPERATION

Database post-operation plug-in.

SLAPI_PLUGIN_PWD_STORAGE_SCHEME

Password storage scheme plug-in.

SLAPI_PLUGIN_REVER_PWD_STORAGE_
SCHEME

Reverse password storage scheme plug-in.

SLAPI_PLUGIN_VATTR_SP

Virtual attribute service provider plug-in.

SLAPI_PLUGIN_INDEX

Indexing plug-in.

SLAPI_PLUGIN_TYPE_OBJECT

Object type plug-in.

SLAPI_PLUGIN_LDBM_ENTRY_FETCH_
STORE

Plug-in that fetches and stores an entry from the default backend database (ldbm).


Version Information

To set the value of the SLAPI_PLUGIN_VERSION parameter, you can specify one of the following values:  

Defined Constant

Description

SLAPI_PLUGIN_CURRENT_VERSION

The current version of the Directory Server plug-in.

SLAPI_PLUGIN_VERSION_01

Version 1 of the plug-in interface, which is supported by the Directory Server 3.x and subsequent releases (including 4.0).

SLAPI_PLUGIN_VERSION_02

Version 2 of the plug-in interface, which is supported by the Directory Server 4.x release but not by previous releases.

SLAPI_PLUGIN_VERSION_03

Version 3 of the plug-in interface, which is supported by current releases of Directory Server but not by previous releases.


Information about Command-Line Arguments

The parameters listed below are used to determine the command-line arguments with which a plug-in was invoked.  

Parameter ID

Data Type

Description

SLAPI_ARGC

int

Determines the number of command-line arguments with which the the Directory Server was invoked.

SLAPI_ARGV

char **

Pointer to an array of character strings that contain the command-line arguments, one per string, with which the Directory Server was invoked.


Information about Attributes

The parameters listed below provide the following information about attributes:


Attribute Names

The parameters listed below are used to check for commonly-used attribute names. These are not pblock parameters but macros that define strings; for example, SLAPI_ATTR_OBJECTCLASS is objectclass.  

Parameter ID

Data Type

Description

SLAPI_ATTR_NSCP_ENTRYDN

int

The nscpEntryDN attribute value.

SLAPI_ATTR_OBJECTCLASS

int

The objectclass attribute value.

SLAPI_ATTR_UNIQUEID

int

The nsuniqueid (unique ID) attribute value.

SLAPI_ATTR_VALUE_PARENT_UNIQUEID

int

The nsParentUniqueID attribute value.

SLAPI_ATTR_VALUE_TOMBSTONE

int

The nsTombstone attribute value.


Attribute Flags

The parameters listed below are used by the slapi_attr_get_flags() function to get the flags associated with the specified attribute. These flags can identify an attribute as a single-valued attribute, an operational attribute, or as a read-only attribute.  

Parameter ID

Description

SLAPI_ATTR_FLAG_COLLECTIVE

Flag that indicates the optional collective marker has been set. This is not supported.

SLAPI_ATTR_FLAG_NOUSERMOD

Flag that indicates this attribute cannot be modified by a user over LDAP.

SLAPI_ATTR_FLAG_OBSOLETE

Flag that indicates this attribute is obsolete.

SLAPI_ATTR_FLAG_OPATTR

Flag that determines if the attribute is an operational attribute.

SLAPI_ATTR_FLAG_READONLY

Flag that determines if the attribute is read-only.

SLAPI_ATTR_FLAG_SINGLE

Flag that determines if the attribute is single-valued.

SLAPI_ATTR_FLAG_STD_ATTR

Flag that indicates that this is a standard, non-user-defined attribute that is not listed in the user defined schema file, which is typically the schema file named 99user.ldif. Standard attribute types can't be deleted by modifying the subschema subentry (cn=schema) over LDAP.


Attribute Comparisons

The parameters listed below are used with the slapi_attr_type_cmp() plug-in function to compare two components of an attribute.  

Parameter ID

Description

SLAPI_TYPE_CMP_BASE

Ignores the options on both names and compares the base names only.

SLAPI_TYPE_CMP_EXACT

Compares the base name plus options, as specified.

SLAPI_TYPE_CMP_SUBTYPE

Ignores the options on the second name that are not in the first name.


Information about Targets

The parameters listed below provide information about targets. These parameters are available for all types of plug-ins.  

Parameter ID

Data Type

Description

SLAPI_TARGET_ADDRESS

void *

Indicates the target address (DN + uniqueid) should be normalized.

SLAPI_TARGET_DN

char *

Indicates the target DN of the operation, which is normalized.

SLAPI_TARGET_UNIQUEID

char *

Indicates the target uniqueid should be normalized.


Parameters for the Bind Function

The following table lists the parameters in the parameter block passed to the database bind function. If you are writing a pre-operation, database, or post-operation bind function, you can get these values by calling the slapi_pblock_get() function.  

Parameter ID

Data Type

Description

SLAPI_BIND_TARGET

char *

DN of the entry to which to bind.

SLAPI_BIND_METHOD

int

Authentication method used; for example, LDAP_AUTH_SIMPLE or LDAP_AUTH_SASL.

SLAPI_BIND_CREDENTIALS

struct berval *

Credentials from the bind request.

SLAPI_BIND_RET_SASLCREDS

struct berval *

Simple Authentication and Security Layer (SASL) credentials that you want to send back to the client. Set this before calling slapi_send_ldap_result().

SLAPI_BIND_SASLMECHANISM

char *

Simple Authentication and Security Layer (SASL) mechanism that is used (for example, LDAP_SASL_EXTERNAL).

See Processing an LDAP Bind Operation for more information on these parameters.


Parameters for the Search Function

The following parameters are used with the search function:


Parameters Passed to the Search Function

The following table lists the parameters in the parameter block passed to the database search function. If you are writing a pre-operation, database, or post-operation search function, you can get these values by calling the slapi_pblock_get() function.  

Parameter ID

Data Type

Description

SLAPI_SEARCH_TARGET

char *

DN of the base entry in the search operation; the starting point of the search.

SLAPI_SEARCH_SCOPE

int

The scope of the search. The scope can be one of the following values:

  • LDAP_SCOPE_BASE
  • LDAP_SCOPE_ONELEVEL
  • LDAP_SCOPE_SUBTREE

SLAPI_SEARCH_DEREF

int

Method for handling aliases in a search. This method can be one of the following values:

  • LDAP_DEREF_NEVER
  • LDAP_DEREF_SEARCHING
  • LDAP_DEREF_FINDING
  • LDAP_DEREF_ALWAYS

SLAPI_SEARCH_SIZELIMIT

int

Maximum number of entries to return in the search results.

SLAPI_SEARCH_TIMELIMIT

int

Maximum amount of time (in seconds) allowed for the search operation.

SLAPI_SEARCH_FILTER

Slapi_Filter *

Slapi_Filter structure (an opaque data structure) representing the filter to be used in the search.

SLAPI_SEARCH_STRFILTER

char *

String representation of the filter to be used in the search.

SLAPI_SEARCH_ATTRS

char **

Array of attribute types to be returned in the search results.

SLAPI_SEARCH_ATTRSONLY

int

Specifies whether the search results return attribute types only or attribute types and values. 0 means return both attributes and values; 1 means return attribute types only.


Parameters for Executing the Search

The following parameters are set by the front-end and backend database as part of the process of executing the search.  

Parameter ID

Data Type

Description

SLAPI_SEARCH_RESULT_SET

void *

Set of search results.

SLAPI_SEARCH_RESULT_ENTRY

void *

Entry returned from iterating through the results set.

SLAPI_SEARCH_RESULT_ENTRY_EXT

void *

Reserved for future use.

SLAPI_NENTRIES

int

Number of search results found.

SLAPI_SEARCH_REFERRALS

struct berval **

Array of the URLs to other LDAP servers to which the current server is referring the client.

See Processing an LDAP Search Operation and Iterating through Candidates for more information on these parameters.


Parameters for the Search Results

The entry and referrals options listed below are set/read by both the front-end and backend database while stepping through the search results.

Parameters that Return Data Types

The parameters listed below return data types.  

Parameter ID

Data Type

Description

SLAPI_RESULT_CODE

int *

Result code that was encountered during the search; this corresponds to the resultCode field within an LDAPResult message.

SLAPI_RESULT_MATCHED

char *

The portion of the target DN that was matched; this corresponds to the matchedDN field within an LDAPResult message.

SLAPI_RESULT_TEXT

char *

The textual error message; this corresponds to the errorMessage field within an LDAPResult message.

SLAPI_PB_RESULT_TEXT

char *

A textual error message passed from internal subsystems to a plug-in. Currently used by the slapi_entry_schema_check() function to provide extra explantory information when it returns a non-zero value, when the schema check fails.


Parameters that Convert Strings to Entries

The parameters listed below are pblock parameters; they are flags that can be passed to the slapi_str2entry() function.  

Parameter ID

Description

SLAPI_STR2ENTRY_ADDRDNVALS

In the conversion from strings to entries, adds the RDN value as an attribute if it is not present.

SLAPI_STR2ENTRY_BIGENTRY

Provides a hint that the entry is large; this enables some optimizations related to large entries.

SLAPI_STR2ENTRY_EXPAND_OBJECTCLASSES

Adds any missing ancestor values based on the object class hierarchy.

SLAPI_STR2ENTRY_IGNORE_STATE

Ignores entry state information if present.

SLAPI_STR2ENTRY_INCLUDE_VERSION_STR

Returns entries that have a version: 1 line as part of the LDIF representation.

SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF

Informs slapi_str2entry() that the LDIF input is not well formed. Well formed LDIF input has no duplicate attribute values, already has the RDN as an attribute of the entry, and has all values for a given attribute type listed contiguously.

SLAPI_STR2ENTRY_REMOVEDUPVALS

Removes duplicate values.

SLAPI_STR2ENTRY_TOMBSTONE_CHECK

Checks to see if the entry is a tombstone; if so, sets the tombstone flag.


Parameters for the Add Function

The following table lists the parameters in the parameter block passed to the database add function. If you are writing a pre-operation, database, or post-operation add function, you can get these values by calling the slapi_pblock_get() function.  

Parameter ID

Data Type

Description

SLAPI_ADD_TARGET

char *

DN of the entry to be added.

SLAPI_ADD_ENTRY

Slapi_Entry *

The entry to be added (specified as the opaque Slapi_Entry datatype).

SLAPI_ADD_EXISTING_DN_ENTRY

Slapi_Entry *

Internal only; used by the multi-master replication update resolution procedure code. If adding an entry that already exists, this is the entry which has the same DN.

SLAPI_ADD_PARENT_ENTRY

Slapi_Entry *

Internal only; used by the multi-master replication update resolution procedure code. This is the parent entry of the entry to add.

SLAPI_ADD_PARENT_UNIQUEID

char *

Internal only; used by the multi-master replication update resolution procedure code. This is the unique ID of the parent entry of the entry to add.

SLAPI_ADD_EXISTING_UNIQUEID_ENTRY