ldap_count_values() function returns the number of values in an array of strings. Use the ldap_count_values_len() function instead of this function if the array contains berval structures.
For additional information, see "Getting the Values of an Attribute" on page 131.
#include <ldap.h>
int ldap_count_values( char **values );
values |
#include <ldap.h>
...
LDAP *ld;
LDAPMessage *e;
char *a="cn";
char **vals;
int count;
...
/* Get the values of the cn attribute */
vals = ldap_get_values( ld, e, a );
/* Count the values of the attribute */
count = ldap_count_values( vals );
...
ldap_count_values_len(), ldap_get_values().
Last Updated: 10/01/98 17:06:23