ldap_count_attributes()--Retrieve Count of Attributes for an LDAP Entry
Syntax
#include <ldap.h> int ldap_count_attributes( LDAP *ld, LDAPMessage *entry)
Library Name/Service Program: QSYS/QGLDCLNT
Default Public Authority: *USE
Threadsafe: Yes
The ldap_count_attributes() function returns a count of the number of attributes in an LDAP entry.
Authorities and Locks
No IBM® i authority is required.
Parameters
- ld
- (Input) The LDAP pointer returned by a previous call to
ldap_init(),
ldap_ssl_init(), or
ldap_open().
- entry
- (Input) The attribute information as returned by ldap_first_entry() or ldap_next_entry().
Return Value
- Number of Attributes
- if the request was successful.
- -1
- if the request was not successful.
Error Conditions
The ldap_count_attributes() API returns -1 if a null entry is passed as input to ldap_count_attributes().
Error Messages
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_count_attributes API. |
Related Information
- ldap_first_attribute() -- Return first attribute name in an entry.
- ldap_next_attribute() -- Return next attribute name in an entry.
- ldap_first_entry() -- Retrieve First LDAP Entry
- ldap_next_entry() -- Retrieve Next LDAP Entry
API introduced: V4R3
[ Back to top | LDAP APIs | APIs by category ]