1 .TH LDAP_RESULT 3 "22 September 1998" "OpenLDAP LDVERSION"
3 ldap_result \- Wait for the result of an LDAP operation
11 int ldap_result(ld, msgid, all, timeout, result)
15 struct timeval *timeout;
35 routine is used to wait for and return the result of
36 an operation previously initiated by one of the LDAP asynchronous
37 operation routines (e.g.,
40 etc.). Those routines all return -1 in case of error, and an
41 invocation identifier upon successful initiation of the operation. The
42 invocation identifier is picked by the library and is guaranteed to be
43 unique across the LDAP session. It can be used to request the result
44 of a specific operation from
46 through the \fImsgid\fP parameter.
50 routine will block or not, depending upon the setting
51 of the \fItimeout\fP parameter.
52 If timeout is not a NULL pointer, it specifies a maximum
53 interval to wait for the selection to complete. If timeout
54 is a NULL pointer, the select blocks indefinitely. To
55 effect a poll, the timeout argument should be a non-NULL
56 pointer, pointing to a zero-valued timeval structure. See
60 If the result of a specific operation is required, \fImsgid\fP should
61 be set to the invocation identifier returned when the operation was
62 initiated, otherwise LDAP_RES_ANY should be supplied. The \fIall\fP
63 parameter only has meaning for search responses and is used to select
64 whether a single entry of the search response should be returned, or
65 all results of the search should be returned.
67 A search response is made up of zero or
68 more search entries followed by a search result. If \fIall\fP is set
69 to 0, search entries will be returned one at a time as they come in,
72 If it's set to 1, the search
73 response will only be returned in its entirety, i.e., after all entries
74 and the final search result have been received.
76 Upon success, the type of the result received is returned and the
77 \fIresult\fP parameter will contain the result of the operation. This
78 result should be passed to the LDAP parsing routines,
79 .BR ldap_first_entry (3)
80 and friends, for interpretation.
82 The possible result types returned are:
85 #define LDAP_RES_BIND 0x61L
86 #define LDAP_RES_SEARCH_ENTRY 0x64L
87 #define LDAP_RES_SEARCH_RESULT 0x65L
88 #define LDAP_RES_MODIFY 0x67L
89 #define LDAP_RES_ADD 0x69L
90 #define LDAP_RES_DELETE 0x6bL
91 #define LDAP_RES_MODRDN 0x6dL
92 #define LDAP_RES_COMPARE 0x6fL
97 routine is used to free the memory allocated for
101 .BR ldap_search_s (3)
102 and friends. It takes
103 a pointer to the result to be freed and returns the type of the
108 routine returns the type of a message.
112 routine returns the message id of a message.
115 returns -1 if something bad happens, and zero if the
116 timeout specified was exceeded.
122 This routine mallocs memory for results that it receives. The memory
123 can be freed by calling
131 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
133 is derived from University of Michigan LDAP 3.3 Release.