#include <ldap.h> char *ldap_first_attribute( LDAP *ld, LDAPMessage *entry, BerElement **berptr)
The ldap_first_attribute() function returns the first attribute in an entry. The ldap_first_attribute() and ldap_next_attribute() functions are used to step through the attributes in an LDAP entry.
ldap_first_attribute() takes an entry returned by ldap_first_entry() or ldap_next_entry() and returns a pointer to a buffer containing a null terminated string that is the first attribute type in the entry. This buffer must be freed when its use is completed using ldap_memfree(). *berptr also must be freed when its use is completed using ldap_ber_free().
No i5/OS authority is required.
If ldap_first_attribute() is not successful, NULL is returned, and ld_errno will be set to indicate the error. See LDAP Client API Error Conditions for possible LDAP error code values. Use ldap_get_errno() function to retrieve the error information.
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_first_attribute API. |
Top | LDAP APIs | APIs by category |