LDAP_GET_VALUES(3) | Library Functions Manual | LDAP_GET_VALUES(3) |
#include <ldap.h>
char **ldap_get_values(ld, entry, attr) LDAP *ld; LDAPMessage *entry; char *attr;
struct berval **ldap_get_values_len(ld, entry, attr) LDAP *ld; LDAPMessage *entry; char *attr;
int ldap_count_values(vals) char **vals;
int ldap_count_values_len(vals) struct berval **vals;
void ldap_value_free(vals) char **vals;
void ldap_value_free_len(vals) struct berval **vals;
The number of values in the array can be counted by calling ldap_count_values(). The array of values returned can be freed by calling ldap_value_free().
If the attribute values are binary in nature, and thus not suitable to be returned as an array of char *'s, the ldap_get_values_len() routine can be used instead. It takes the same parameters as ldap_get_values(), but returns a NULL-terminated array of pointers to berval structures, each containing the length of and a pointer to a value.
The number of values in the array can be counted by calling ldap_count_values_len(). The array of values returned can be freed by calling ldap_value_free_len().
2014/01/26 | OpenLDAP 2.4.39 |