---
name: "ldap_parse_vlv_control"
section: "3"
platform: "linux"
package: "libldap"
version: "2.7.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/ldap_parse_vlv_control"
---

# ldap\_parse\_vlv\_control(3)

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

## NAME

ldap\_parse\_vlv\_control - Decode the information returned from a search operation that used a VLV (virtual list view) control

## LIBRARY

OpenLDAP LDAP (libldap, -lldap)

## SYNOPSIS

```
#include <ldap.h>
```

**int ldap\_parse\_vlv\_control( ld, ctrlp, target\_posp, list\_countp, contextp, errcodep )** **LDAP \*ld;** **LDAPControl \*\*ctrlp;** **unsigned long \*target\_posp, \*list\_countp;** **struct berval \*\*contextp;** **int \*errcodep;**

## DESCRIPTION

**The** **ldap\_parse\_vlv\_control** **is used to decode the information returned from a search operation that used a** **VLV (virtual list view)control. It takes a null terminated array of LDAPControl** **structures, usually obtained by a call to the**  **ldap\_parse\_result**function, **a** *target\_pos* **which 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. The parameter** *list\_countp* **points to**  **the server's estimate of the size of the list. If this parameter is NULL, the** **size is not returned.** *contextp* **is a pointer 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.e* *errcodep* **is an output parameter, which points to the result code returned** **by the server. If this parameter is NULL, the result code is not returned.**

**See** **ldap.h for a list of possible return codes.**

## SEE ALSO

[**ldap\_search**(3)](/ldap_search/3.md)

## ACKNOWLEDGEMENTS

**OpenLDAP Software** **is developed and maintained by The OpenLDAP Project \<http://www.openldap.org/\>.** **OpenLDAP Software** **is derived from the University of Michigan LDAP 3.3 Release.**
