ldap_result() waits for and returns the result of an LDAP operation initiated by one of the asynchronous LDAP API functions (for example, ldap_search(), ldap_add(), ldap_modify()).
To identify the operation that you want to check, pass the message ID of the operation. (Asynchronous functions return a unique message ID that you can pass to the ldap_result() function.)
For more information, see "Getting the Server Response" on page 84.
#include <ldap.h>
int ldap_result( LDAP *ld, int msgid, int all,
struct timeval *timeout, LDAPMessage **result );
ld |
Connection handle, which is a pointer to an |
msgid | |
all | Specifies how the results of a search are returned. This parameter can have the following values: |
timeout | |
result |
Result of the operation. To interpret the results, pass this to the LDAP parsing routines, such as |
LDAP_RES_BIND indicates that the LDAPMessage structure contains the result of an LDAP bind operation. LDAP_RES_SEARCH_ENTRY indicates that the LDAPMessage structure contains an entry found during an LDAP search operation. LDAP_RES_SEARCH_REFERENCE indicates that the LDAPMessage structure contains an LDAP v3 search reference (a referral to another LDAP server) found during an LDAP search operation. LDAP_RES_SEARCH_RESULT indicates that the LDAPMessage structure contains the result of an LDAP search operation. LDAP_RES_MODIFY indicates that the LDAPMessage structure contains the result of an LDAP modify operation. LDAP_RES_ADD indicates that the LDAPMessage structure contains the result of an LDAP add operation. LDAP_RES_DELETE indicates that the LDAPMessage structure contains the result of an LDAP delete operation. LDAP_RES_MODDN or LDAP_RES_RENAME indicates that the LDAPMessage structure contains the result of an LDAP modify DN operation. LDAP_RES_COMPARE indicates that the LDAPMessage structure contains the result of an LDAP compare operation. LDAP_RES_EXTENDED indicates that the LDAPMessage structure contains the result of an LDAP v3 extended operation. LDAP structure. To get the error code, call the ldap_get_lderrno() function. (See "Result Codes" on page 691 for a complete listing of error codes.) ldap_add_ext(), ldap_compare_ext(), ldap_delete_ext(), ldap_modify_ext(), ldap_rename(), ldap_simple_bind(), ldap_url_search().
Last Updated: 10/01/98 17:06:23