[Date Prev][Date Next] [Chronological] [Thread] [Top]

customizing referral chasing

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().



SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497