[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
customizing referral chasing
- To: OpenLDAP Devel <openldap-devel@OpenLDAP.org>
- Subject: customizing referral chasing
- From: Pierangelo Masarati <ando@sys-net.it>
- Date: Tue, 24 May 2005 12:31:48 +0200
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050511 White Box/1.7.7-1.1.3.4.WB1
I need to play with referral chasing in libldap; in detail, I need the
capability to chase multiple values in an arbitrary order. According to
the LDAP data model (draft-ietf-ldapbis-protocol), "any supported URI
may be used to progress the operation". I take this sentence as the
client should expect that whatever URI it contacts, it should be able to
perform the same operation; e.g. in case of search, it should get the
same results, or another referral.
My plan is to allow hooking a function, defaulting to ldap_int_refnext(
LDAP *ld, char **refs, int *i, void *params), that takes the ld pointer,
optional parameters, the pointer to the beginning of the referral array,
and a pointer to the current index. When first called, i == -1, while
on subsequent calls it contains the value returned by previous calls; on
return, it contains the index of the selected referral, or -1 to
terminate scanning the array.
The default function will simply run thru the array, thus preserving the
original behavior. To store the new function, I'd design an interface
analogous to that of ldap_set_rebind_proc().
Comments?
p.
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497