📄 ldap_ufn.3
字号:
.TH LDAP_UFN 3 "22 September 1998" "OpenLDAP LDVERSION".\" $OpenLDAP: pkg/ldap/doc/man/man3/ldap_ufn.3,v 1.3.8.1 2000/06/13 17:57:12 kurt Exp $.\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved..\" Copying restrictions apply. See COPYRIGHT/LICENSE..SH NAMEldap_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.SH SYNOPSIS.nf.ft B#include <ldap.h>.LP.ft Bint ldap_ufn_search_c(ld, ufn, attrs, attrsonly, res, cancelproc, cancelparm).ftLDAP *ld;char *ufn;char **attrs;int attrsonly;LDAPMessage **res;int (*cancelproc)();void *cancelparm;.LP.ft Bint ldap_ufn_search_ct(ld, ufn, attrs, attrsonly, res, cancelproc, cancelparm, tag1, tag2, tag3).ftLDAP *ld;char *ufn;char **attrs;int attrsonly;LDAPMessage **res;int (*cancelproc)();void *cancelparm;char *tag1, *tag2, *tag3;.LP.ft Bint ldap_ufn_search_s(ld, ufn, attrs, attrsonly, res).ftLDAP *ld;char *ufn;char **attrs;int attrsonly;LDAPMessage **res;.LP.ft BLDAPFiltDesc *ldap_ufn_setfilter(ld, fname).ftLDAP *ld;char *fname;.LP.ft Bvoid ldap_ufn_setprefix(ld, prefix).ftLDAP *ld;char *prefix;.LP.ft Bint ldap_ufn_timeout(tvparam).ftvoid *tvparam;.SH DESCRIPTIONThese routines are used to perform LDAP user friendly search operations..B ldap_ufn_search_s()is the simplest form. It does the searchsynchronously. It takes \fIld\fP to identify the the LDAP connection.The \fIufn\fP parameter is the user friendly name for which to search.The \fIattrs\fP, \fIattrsonly\fP and \fIres\fP parameters are thesame as for.BR ldap_search (3)..LPThe.B ldap_ufn_search_c()routine functions the same as.BR ldap_ufn_search_s() ,except that it takes \fIcancelproc\fP, a function to call periodiclyduring the search. It should be a function taking a single void *argument, given by \fIcalcelparm\fP. If \fIcancelproc\fP 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..LPThe.B ldap_ufn_search_ct()routine is like.BR ldap_ufn_search_c() ,except that it takes three extra parameters. \fItag1\fP is passed to the.BR ldap_init_getfilter (3)routine when resolving the first component ofthe UFN. \fItag2\fP is used when resolving intermediate components.\fItag3\fP 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"..LPThe.B ldap_ufn_setfilter()routine is used to set the.BR ldapfilter.conf (5)file for use with the.BR ldap_init_getfilter (3)routine to \fIfname\fP..LPThe.B ldap_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..LPThe.B ldap_ufn_timeout()routine is used to set the timeout associatedwith.B ldap_ufn_search_s()searches. The \fItimeout\fP parametershould actually be a pointer to a struct timeval (this is so.B ldap_ufn_timeout()can be used as a cancelproc in the above routines)..SH NOTESThese routines may dynamically allocate memory. The caller isrequired to free such memory using the supplied deallocation routines.Return values are containedin <ldap.h>..SH SEE ALSO.BR gettimeofday (2),.BR ldap (3),.BR ldap_search (3),.BR ldap_getfilter (3),.BR ldapfilter.conf (5),.BR ldap_error (3).SH ACKNOWLEDGEMENTS.B OpenLDAPis developed and maintained by The OpenLDAP Project (http://www.openldap.org/)..B OpenLDAPis derived from University of Michigan LDAP 3.3 Release.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -