LDAP_PARSE_VLV_CONTROL

Use the LDAP_PARSE_VLV_CONTROL API or LDAP routine to parse a virtual list view control.

Synopsis

#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
);

Input parameters

ld
Specifies the LDAP session handle that is returned by a call to ldap_init().
ctrlp
Contains the address of NULL terminated array of LDAPControl structures, typically obtained by a call to ldap_parse_result().
target_posp
Specifies the result parameter that contains the list index of the target entry. If the value of this parameter is NULL, then the target position is not returned. The value for this result parameter is obtained from the targetPosition field in the Virtual list view response control.
list_countp
Specifies the result parameter that contains the server estimate of the list size. If the value of this parameter is NULL, then the size is not returned. The value for this result parameter is obtained from the contentCount field of the Virtual list view response control.
contextp
Specifies the result parameter that contains the address of struct berval, which contains a server generated context ID if one was returned by the server. If the server did not return any context ID, the value of the parameter is NULL. The berval structure that returned must be freed after its use by using the ber_bvfree() function.
errcodep
Specifies the result parameter that contains the Virtual list view result code. If NULL, the result code is not returned. The value of this parameter is obtained from the virtualListViewResult field of the Virtual list view response control.

Usage

The ldap_parse_vlv_control routine is used to parse the virtual list view response control. The following codes are the possible return codes from this routine:
  • LDAP_SUCCESS // on successful parsing
  • LDAP_NO_MEMORY // memory allocation failure
  • LDAP_PARAM_ERROR // bad input parameters
  • LDAP_DECODING_ERROR // decoding error

See also

ldap_create_vlv_control