MAN page from Mandrake Other ldap-devel-3.3-3.i386.rpm
LDAP_UFN
Section: C Library Functions (3)
Updated: 23 November 1994
Index NAME
ldap_ufn_search_s, ldap_ufn_search_c, ldap_ufn_search_ct, ldap_ufn_setfilter, ldap_ufn_setfilter, ldap_ufn_setprefix, ldap_ufn_timeout - Perform an LDAP user friendly search operation
SYNOPSIS
#include <lber.h>#include <ldap.h>int ldap_ufn_search_c(ld, ufn, attrs, attrsonly, res, cancelproc, cancelparm)LDAP *ld;char *ufn;char **attrs;int attrsonly;LDAPMessage **res;int (*cancelproc)();void *cancelparm;int ldap_ufn_search_ct(ld, ufn, attrs, attrsonly, res, cancelproc, cancelparm, tag1, tag2, tag3)LDAP *ld;char *ufn;char **attrs;int attrsonly;LDAPMessage **res;int (*cancelproc)();void *cancelparm;char *tag1, *tag2, *tag3;int ldap_ufn_search_s(ld, ufn, attrs, attrsonly, res)LDAP *ld;char *ufn;char **attrs;int attrsonly;LDAPMessage **res;LDAPFiltDesc *ldap_ufn_setfilter(ld, fname)LDAP *ld;char *fname;void ldap_ufn_setprefix(ld, prefix)LDAP *ld;char *prefix;int ldap_ufn_timeout(tvparam)void *tvparam;
DESCRIPTION
These routines are used to perform LDAP user friendly search operations.
ldap_ufn_search_s()is the simplest form. It does the searchsynchronously. It takes
ld to identify the the LDAP connection.The
ufn parameter is the user friendly name for which to search.The
attrs,
attrsonly and
res parameters are thesame as for
ldap_search(3).
Theldap_ufn_search_c()routine functions the same asldap_ufn_search_s(),except that it takes cancelproc, a function to call periodiclyduring the search. It should be a function taking a single void *argument, given by calcelparm. If cancelproc returns anon-zero result, the search will be abandoned and no results returned.The purpose of this routine is to provide a way for the search to becancelled, for example, by a user or because some other conditionoccurs.
Theldap_ufn_search_ct()routine is likeldap_ufn_search_c(),except that it takes three extra parameters. tag1 is passed to theldap_init_getfilter(3)routine when resolving the first component ofthe UFN. tag2 is used when resolving intermediate components.tag3 is used when resolving the last component. By default,the tags used by the other UFN search routines during these threephases of the search are "ufn first", "ufn intermediate", and "ufn last".
Theldap_ufn_setfilter()routine is used to set theldapfilter.conf(5)file for use with theldap_init_getfilter(3)routine to fname.
Theldap_ufn_setprefix()routine is used to set the default prefix(actually, it's a suffix) appended to UFNs before searhing. UFNswith fewer than three components have the prefix appended first,before searching. If that fails, the UFN is tried with progressivelyshorter versions of the prefix, stripping off components. If the UFNhas three or more components, it is tried by itself first. If thatfails, a similar process is applied with the prefix appended.
Theldap_ufn_timeout()routine is used to set the timeout associatedwithldap_ufn_search_s()searches. The timeout parametershould actually be a pointer to a struct timeval (this is soldap_ufn_timeout()can be used as a cancelproc in the above routines).
NOTES
These routines may malloc memory. Return values are containedin <
ldap.h>.
SEE ALSO
gettimeofday(2),
ldap(3),
ldap_search(3),
ldap_getfilter(3),
ldapfilter.conf(5),
ldap_error(3)
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- NOTES
- SEE ALSO
This document was created byman2html,using the manual pages.