ldap_count_values_len

Returns the number of berval structures in the array.

LDAP Version:v2 or higher
Library:*ldapsdk.*
NDS Version:7.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_count_values_len (
     struct berval   **vals);
  
  

Parameters

vals

(IN) Points to the array of values returned by the ldap_get_values or ldap_get_values_len function.

Return Values

>0

Number of values

-1

Failure

Remarks

The ldap_count_values_len function can be used to count the number of values for attributes that have binary data. Use ldap_count_values to count string attribute values.

The memory for the vals parameter is dynamically allocated. When you are done with the array, free the memory by calling the ldap_value_free_len function.

See Also

ldap_get_values_len, ldap_get_values, ldap_count_values, ldap_value_free, ldap_value_free_len