ldap_parse_vlv_control

Decodes the information returned from a search operation that used a VLV (virtual list view) control.

LDAP Version:v3
Library:*ldapsdk.*
NDS Version:8.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  int ldap_parse_vlv_control (
     LDAP             *ld
     LDAPControl     **ctrlp,
     unsigned long    *target_posp,
     unsigned long    *list_countp,
     struct berval   **contextp,
     int              *errcodep);
  
  

Parameters

ld

(IN) Points to the handle of the LDAP session.

ctrlp

(IN) Points to a NULL-terminated array of LDAPControl structures, typically obtained by calling the ldap_parse_result function.

target_posp

(OUT) Points to the list index of the target entry. If this parameter is NULL, the target position is not returned. The index returned is an approximation of the position of the target entry. It is not guaranteed to be exact.

list_countp

(OUT) Points to the server's estimate of the size of the list. If this parameter is NULL, the size is not returned.

contextp

(OUT) Points to the address of a berval structure that contains a server-generated context identifier if server returns one. If server does not return a context identifier, the server returns a NULL in this parameter. If this parameter is set to NULL, the context identifier is not returned.

You should use this returned context in the next call to create a VLV control.

When the berval structure is no longer needed, you should free the memory by calling the ber_bvfree function.

errcodep

(OUT) Points to the result code returned by the server. If this parameter is NULL, the result code is not returned. See Remarks for a list of possible return codes.

Return Values

0x00

LDAP_SUCCESS

Non-zero

Failure. See LDAP Return Codes.

0x5D

LDAP_CONTROL_NOT_FOUND

Remarks

The errcodep parameter returns one of the following values.

Return Value

Description

success (0)

Server returned VLV results.

operationsError (1)

Server had an internal failure.

timeLimitExceeded (3)

Server reached the time limit before the virtual list view was completed.

adminLimitExceeded (11)

The results contain too many matching entries for the server to place in a virtual list view.

insufficientAccessRights (50)

Server refused to return sorted results to this client.

busy (51)

Server is too busy to process.

unwillingToPerform (53)

Server is unable to sort the results.

sortControlMissing (60)

The sort control for the virtual list view is missing.

offsetRangeError (61)

The offset is set to less than zero.

other (80)

An error occurred.

For example code, see vlvcntl.c.

See Also

berval, LDAPControl