1 .TH LDAP_UFN 3 "23 November 1994" "U-M LDAP LDVERSION"
3 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
11 int ldap_ufn_search_c(ld, ufn, attrs, attrsonly, res, cancelproc,
23 int ldap_ufn_search_ct(ld, ufn, attrs, attrsonly, res, cancelproc,
24 cancelparm, tag1, tag2, tag3)
33 char *tag1, *tag2, *tag3;
36 int ldap_ufn_search_s(ld, ufn, attrs, attrsonly, res)
45 LDAPFiltDesc *ldap_ufn_setfilter(ld, fname)
51 void ldap_ufn_setprefix(ld, prefix)
57 int ldap_ufn_timeout(tvparam)
61 These routines are used to perform LDAP user friendly search operations.
62 .B ldap_ufn_search_s()
63 is the simplest form. It does the search
64 synchronously. It takes \fIld\fP to identify the the LDAP connection.
65 The \fIufn\fP parameter is the user friendly name for which to search.
66 The \fIattrs\fP, \fIattrsonly\fP and \fIres\fP parameters are the
71 .B ldap_ufn_search_c()
72 routine functions the same as
73 .BR ldap_ufn_search_s() ,
74 except that it takes \fIcancelproc\fP, a function to call periodicly
75 during the search. It should be a function taking a single void *
76 argument, given by \fIcalcelparm\fP. If \fIcancelproc\fP returns a
77 non-zero result, the search will be abandoned and no results returned.
78 The purpose of this routine is to provide a way for the search to be
79 cancelled, for example, by a user or because some other condition
83 .B ldap_ufn_search_ct()
85 .BR ldap_ufn_search_c() ,
86 except that it takes three extra parameters. \fItag1\fP is passed to the
87 .BR ldap_init_getfilter (3)
88 routine when resolving the first component of
89 the UFN. \fItag2\fP is used when resolving intermediate components.
90 \fItag3\fP is used when resolving the last component. By default,
91 the tags used by the other UFN search routines during these three
92 phases of the search are "ufn first", "ufn intermediate", and "ufn last".
95 .B ldap_ufn_setfilter()
96 routine is used to set the
97 .BR ldapfilter.conf (5)
99 .BR ldap_init_getfilter (3)
100 routine to \fIfname\fP.
103 .B ldap_ufn_setprefix()
104 routine is used to set the default prefix
105 (actually, it's a suffix) appended to UFNs before searhing. UFNs
106 with fewer than three components have the prefix appended first,
107 before searching. If that fails, the UFN is tried with progressively
108 shorter versions of the prefix, stripping off components. If the UFN
109 has three or more components, it is tried by itself first. If that
110 fails, a similar process is applied with the prefix appended.
113 .B ldap_ufn_timeout()
114 routine is used to set the timeout associated
116 .B ldap_ufn_search_s()
117 searches. The \fItimeout\fP parameter
118 should actually be a pointer to a struct timeval (this is so
119 .B ldap_ufn_timeout()
120 can be used as a cancelproc in the above routines).
122 These routines may malloc memory. Return values are contained
125 .BR gettimeofday (2),
128 .BR ldap_getfilter (3),
129 .BR ldapfilter.conf (5),