ldap_get_values()--Retrieve a Set of Attribute Values from an Entry




Syntax

#include <ldap.h>
 
char **ldap_get_values(
		LDAP 		*ld,
                LDAPMessage 	*entry,
                char 		*attr)



Threadsafe: Yes

The ldap_get_values() function is used to retrieve attribute values from an LDAP entry as returned by ldap_first_entry() or ldap_next_entry(). ldap_get_values() uses the entry and the attribute attr whose values are wanted and returns a NULL-terminated array of the attribute's values.

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) Specifies an LDAP entry as returned from ldap_first_entry() or ldap_next_entry().
attr
(Input) Specifies the attribute whose values are desired.

Return Value

Array of Values
if the request was successful.
NULL
if the request was not successful.

Error Conditions

ldap_get_values() will return NULL and set the ld_errno error code, if not successful. See LDAP Client API Error Conditions for possible LDAP error code values.

Error Messages

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

Related Information

    ldap_get_values_len() -- Return an attribute's binary values.
    ldap_count_values() -- Return number of values.
    ldap_count_values_len() -- Return number of binary values.
    ldap_value_free() -- Free memory allocated by
      ldap_get_values.
    ldap_value_free_len() -- Free memory allocated by ldap_get_values_len.


Top | LDAP APIs List
APIs by category

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