ldap_next_message()--Retrieve Next LDAP Message
Syntax
#include <ldap.h> LDAPMessage *ldap_next_message( LDAP *ld, LDAPMessage *msg)
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
The ldap_next_message() function is used to step through the list of messages in a result chain, as returned by ldap_result() and ldap_first_message(). It is used to return a pointer to the next message from the list.
Authorities and Locks
No IBM® i authority is required.
Parameters
- ld
- (Input) Specifies the LDAP pointer returned by a previous call to ldap_init(), ldap_ssl_init(), or ldap_open().
- msg
- (Input) Specifies the message returned by a previous call to ldap_first_message() or ldap_next_message().
Return Value
- LDAPMessage *
- pointer to the next message in list.
- NULL
- when no more messages exist in the result set to be returned or if an error occurs.
Error Conditions
If ldap_next_message() is not successful, ld_errno will be set to indicate the error. See LDAP Client API Error Conditions for possible LDAP error code values. Use the ldap_get_errno() function to retrieve the error information.
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_next_message API. |
Related Information
- ldap_count_messages() -- Return the number of messages in a result chain.
- ldap_first_entry() -- Retrieve first LDAP entry.
- ldap_first_message() -- Retrieve first LDAP message.
- ldap_first_reference() -- Return first continuation reference in a chain of search results.
- ldap_msgfree() -- Free LDAP Result Message.
- ldap_msgid() -- Retrieve Message ID Associated with an LDAP Message.
- ldap_msgtype() -- Retrieve Type of an LDAP Message.
- ldap_result2error() -- Retrieve LDAP Error Information.
API introduced: V4R5
[ Back to top | LDAP APIs | APIs by category ]