ldap_get_values_len

Returns binary values of a specified attribute from an entry.

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>
  
  struct berval **ldap_get_values_len (
     LDAP          *ld,
     LDAPMessage   *entry,
     const char    *attr);
  
  

Parameters

ld

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

entry

(IN) Points to the entry returned by the ldap_first_entry or the ldap_next_entry function.

attr

(IN) Points to the attribute returned by the ldap_first_attribute function, the ldap_next_attribute function, or the name of an attribute in string format.

Return Values

>0

An array of values

Null

Failure or no values were found for the attribute

Remarks

The ldap_get_values_len function takes an entry and attribute and returns the attribute values in a NULL-terminated array of pointers to berval structures. The memory for the array 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, ldap_count_values, ldap_count_values_len, ldap_value_free, ldap_value_free_len