ldap_get_values, ldap_get_values_len, ldap_count_values - LDAP attribute value handling routines
OpenLDAP LDAP (libldap, -lldap)
#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 ldap_count_values(vals) char **vals; ldap_count_values_len(vals) struct berval **vals; ldap_value_free(vals) char **vals; 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().
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |