1 .TH CLDAP_SEARCH_S 3 "22 September 1998" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-1999 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 cldap_search_s \- Connectionless LDAP Search
13 int cldap_search_s( ld, base, scope, filter, attrs, attrsonly,
28 routine performs an LDAP search using the
29 Connectionless LDAP (CLDAP) protocol.
32 has parameters and behavior identical to that of
33 .BR ldap_search_s (3),
34 except for the addition of the \fIlogdn\fP
35 parameter. logdn should contain a distinguished name to be used only
36 for logging purposed by the LDAP server. It should be in the text
37 format described by RFC 1779 "A String Representation of Distinguished Names".
38 .SH RETRANSMISSION ALGORITHM
40 operates using the CLDAP protocol over
42 Since UDP is a non-reliable protocol, a retry mechanism is used to increase
44 .BR cldap_setretryinfo (3)
45 routine can be used to set two
46 retry parameters: \fItries\fP, a count of the number of times to send
47 a search request and \fItimeout\fP, an initial timeout that determines
48 how long to wait for a response before re-trying. \fItimeout\fP is
49 specified seconds. These values are stored in the \fBld_cldaptries\fP and
50 \fBld_cldaptimeout\fP members of the \fIld\fP LDAP structure, and the
53 are 4 and 3 respectively. The retransmission algorithm used is:
55 Step 1. Set the current timeout to \fBld_cldaptimeout\fP seconds, and
56 the current LDAP server address to the first LDAP server found during
61 Step 2: Send the search request to the current LDAP server address.
63 Step 3: Set the wait timeout to the current timeout divided by the
64 number of server addresses found during
67 second, whichever is larger. Wait at most that long for a response; if
68 a response is received, STOP. Note that the wait timeout is always rounded
69 down to the next lowest second.
71 Step 5: Repeat steps 2 and 3 for each LDAP server address.
73 Step 6: Set the current timeout to twice its previous value and repeat
74 Steps 2 through 6 a maximum of \fItries\fP times.
75 .SH RETRANSMISSION EXAMPLE
76 Assume that the default values for \fItries\fP and \fItimeout\fP of
77 4 tries and 3 seconds are used. Further, assume that a space-separated
78 list of two hosts, each with one address, was passed to
80 The pattern of requests sent will be (stopping as soon as a response is
83 Time Search Request Sent To:
85 +1 (0+3/2) Host B try 1
86 +2 (1+3/2) Host A try 2
87 +5 (2+6/2) Host B try 2
88 +8 (5+6/2) Host A try 3
89 +14 (8+12/2) Host B try 3
90 +20 (14+12/2) Host A try 4
91 +32 (20+24/2) Host B try 4
92 +44 (20+24/2) (give up - no response)
96 returns LDAP_SUCCESS if a search was successful and the
97 appropriate LDAP error code otherwise. See
103 .BR ldap_search_s (3),
105 .BR cldap_setretryinfo (3),
110 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
112 is derived from University of Michigan LDAP 3.3 Release.