HELPLIB.HLB  —  LDAP  Extensions
    The ldap_extended_operation() and ldap_extended_operation_s()
    functions allow extended LDAP operations to be passed to the
    server, providing a general protocol extensibility mechanism.

            int ldap_extended_operation(
                    LDAP                               *ld,
                    const char                         *requestoid,
                    const struct berval                *request data,
                    LDAPControl                        **serverctrls,
                    LDAPControl                        **clientctrls,
                    int                                *msgidp
            );

            int ldap_extended_operation_s(
                    LDAP                               *ld,
                    const char                         *requestoid,
                    const struct berval                *request data,
                    LDAPControl                        **serverctrls,
                    LDAPControl                        **clientctrls,
                    char                               **retoidp,
                    struct berval                      **retdatap
            );

    Parameters are as follows:

    ld             The session handle.
    requestoid     The dotted-OID text string naming the request.
    requestdata    The arbitrary data required by the operation (if
                   NULL, no data is sent to the server).
    serverctrls    List of LDAP server controls.
    clientctrls    List of client controls.
    msgidp         This result parameter will be set to the message
                   id of the request if the ldap_extended_operation()
                   call succeeds.
    retoidp        Pointer to a character string that will be set
                   to an allocated, dotted- OID text string returned
                   by the server. This string should be disposed of
                   using the ldap_memfree() function. If no OID was
                   returned, *retoidp is set to NULL.
    retdatap       Pointer to a berval structure pointer that will be
                   set to an allocated copy of the data returned by
                   the server. This struct berval should be disposed
                   of using ber_bvfree(). If no data is returned,
                   *retdatap is set to NULL.

    The ldap_extended_operation() function initiates an asynchronous
    extended operation and returns either the constant LDAP_SUCCESS
    if the request was successfully sent or another LDAP error code
    if not. See Errors for more information about possible errors and
    how to interpret them. If successful, ldap_extended_operation()
    places the message id of the request in *msgidp. A subsequent
    call to ldap_result() can be used to obtain the result of the
    extended operation which can be passed to ldap_parse_extended_
    result() to obtain the OID and data contained in the response.

    The synchronous ldap_extended_operation_s() function returns
    the result of the operation, either the constant LDAP_SUCCESS
    if the operation was successful or another LDAP error code if it
    was not. See Errors for more information about possible errors
    and how to interpret them. The retoid and retdata parameters are
    filled in with the OID and data from the response. If no OID or
    data was returned, these parameters are set to NULL.

    The ldap_extended_operation() and ldap_extended_operation_
    s() functions both support LDAPv3 server controls and client
    controls.
Close Help