ldap_count_attributes()--Retrieve Count of Attributes for an LDAP Entry




Syntax

#include <ldap.h>
 
int ldap_count_attributes(
       LDAP           *ld,
       LDAPMessage    *entry)




Threadsafe: Yes

The ldap_count_attributes() function returns a count of the number of attributes in an LDAP entry.

Authorities and Locks

No OS/400 authority is required. All authority checking is done by the LDAP server.

Parameters

ld
(Input) Specifies 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

ldap_count_attributes() ruturns -1, if a null entry is returned from ldap_first_entry() or ldap_next_entry(), and is passed as input to ldap_count_attributes().

Error Messages

    The following message may be set from this function.
    CPF3CF2 E  Error(s) occurred during running of ldap_count_attribute API.

Related Information

    ldap_first_attribute() -- Return first attribute name in an entry. 
    ldap_next_attribute() -- Return next attribute name in an entry. 


Top | LDAP APIs List | APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]