Manual Pages for UNIX Darwin command on man ldap_msgid
MyWebUniversity

Manual Pages for UNIX Darwin command on man ldap_msgid

LDAPRESULT(3) LDAPRESULT(3)

NAME

ldapresult - Wait for the result of an LDAP operation

LLIIBBRRAARRYY

OpenLDAP LDAP (libldap, -lldap)

SYNOPSIS

##iinncclluuddee <>

iinntt llddaapprreessuulltt(( LLDDAAPP **lldd,, iinntt mmssggiidd,, iinntt aallll,, ssttrruucctt ttiimmeevvaall **ttiimmeeoouutt,, LLDDAAPPMMeessssaaggee ****rreessuulltt ));; iinntt llddaappmmssggffrreeee(( LLDDAAPPMMeessssaaggee **mmssgg ));; iinntt llddaappmmssggttyyppee(( LLDDAAPPMMeessssaaggee **mmssgg ));; iinntt llddaappmmssggiidd(( LLDDAAPPMMeessssaaggee **mmssgg ));;

DESCRIPTION

The llddaapprreessuulltt(()) routine is used to wait for and return the result of

an operation previously initiated by one of the LDAP asynchronous oper-

ation routines (e.g., llddaappsseeaarrcchh(3), llddaappmmooddiiffyy(3), etc.). Those

routines all return -1 in case of error, and an invocation identifier

upon successful initiation of the operation. The invocation identifier is picked by the library and is guaranteed to be unique across the LDAP session. It can be used to request the result of a specific operation from llddaapprreessuulltt(()) through the msgid parameter. The llddaapprreessuulltt(()) routine will block or not, depending upon the setting

of the timeout parameter. If timeout is not a NULL pointer, it spec-

ifies a maximum interval to wait for the selection to complete. If timeout is a NULL pointer, the select blocks indefinitely. To

effect a poll, the timeout argument should be a non-NULL pointer,

pointing to a zero-valued timeval structure. See sseelleecctt(2) for further

details. If the result of a specific operation is required, msgid should be set to the invocation identifier returned when the operation was initiated, otherwise LDAPRESANY or LDAPRESUNSOLICITED should be supplied to wait for any or unsolicited response.

The all parameter, if non-zero, causes llddaapprreessuulltt(()) to return all

responses with msgid, otherwise only the next response is returned.

This is commonly used to obtain all the responses of a search opera-

tion. A search response is made up of zero or more search entries, zero or more search references, and zero or more extended parital responses followed by a search result. If all is set to 0, search entries will be returned one at a time as they come in, via separate calls to llddaapprreessuulltt(()). If it's set to 1, the search response will only be returned in its entirety, i.e., after all entries, all references, all extended parital responses, and the final search result have been received. Upon success, the type of the result received is returned and the result parameter will contain the result of the operation. This result should be passed to the LDAP parsing routines, llddaappffiirrssttmmeessssaaggee(3) and friends, for interpretation. The possible result types returned are: LDAPRESBIND (0x61) LDAPRESSEARCHENTRY (0x64) LDAPRESSEARCHREFERENCE (0x73) LDAPRESSEARCHRESULT (0x65) LDAPRESMODIFY (0x67) LDAPRESADD (0x69) LDAPRESDELETE (0x6b) LDAPRESMODDN (0x6d) LDAPRESCOMPARE (0x6f) LDAPRESEXTENDED (0x78) LDAPRESEXTENDEDPARTIAL (0x79) The llddaappmmssggffrreeee(()) routine is used to free the memory allocated for result(s) by llddaapprreessuulltt(()) or llddaappsseeaarrcchhss(3) and friends. It takes a pointer to the result or result chain to be freed and returns the type

of the last message in the chain. If the parameter is NULL, the func-

tion does nothing and returns zero. The llddaappmmssggttyyppee(()) routine returns the type of a message. The llddaappmmssggiidd(()) routine returns the message id of a message. EERRRROORRSS

llddaapprreessuulltt(()) returns -1 if something bad happens, and zero if the

timeout specified was exceeded. llddaappmmssggttyyppee(()) and llddaappmmssggiidd(()) return

-1 on error.

SEE ALSO

llddaapp(3), llddaappsseeaarrcchh(3), llddaappffiirrssttmmeessssaaggee(3), sseelleecctt(2) AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS OOppeennLLDDAAPP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OOppeennLLDDAAPP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.2.19 2004/11/26 LDAPRESULT(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™