1 .TH LDAP_URL 3 "22 September 1998" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
11 ldap_url_search_st \- LDAP Uniform Resource Locator routines
19 int ldap_is_ldap_url( url )
24 int ldap_url_parse( url, ludpp )
29 typedef struct ldap_url_desc {
30 char *lud_host; /* LDAP host to contact */
31 int lud_port; /* port on host */
32 char *lud_dn; /* base for search */
33 char **lud_attrs; /* NULL-terminate list of attributes */
34 int lud_scope; /* a valid LDAP_SCOPE_... value */
35 char *lud_filter; /* LDAP search filter */
36 char *lud_string; /* for internal use only */
40 ldap_free_urldesc( ludp )
45 int ldap_url_search( ld, url, attrsonly )
52 int ldap_url_search_s( ld, url, attrsonly, res )
60 int ldap_url_search_st( ld, url, attrsonly, timeout, res )
65 struct timeval *timeout;
68 These routines support the use of LDAP URLs (Uniform Resource Locators).
69 LDAP URLs look like this:
72 \fBldap://\fP\fIhostport\fP\fB/\fP\fIdn\fP[\fB?\fP\fIattributes\fP[\fB?\fP\fIscope\fP[\fB?\fP\fIfilter\fP]]]
75 \fIhostport\fP is a host name with an optional ":portnumber"
76 \fIdn\fP is the base DN to be used for an LDAP search operation
77 \fIattributes\fP is a comma separated list of attributes to be retrieved
78 \fIscope\fP is one of these three strings: base one sub (default=base)
79 \fIfilter\fP is LDAP search filter as used in a call to ldap_search(3)
81 e.g., ldap://ldap.itd.umich.edu/c=US?o,description?one?o=umich
84 URLs that are wrapped in angle-brackets and/or preceded by "URL:" are also
88 returns a non-zero value if \fIurl\fP looks like an LDAP URL (as
89 opposed to some other kind of URL). It can be used as a quick check
92 routine should be used if a more thorough check is needed.
95 breaks down an LDAP URL passed in \fIurl\fP into its component pieces.
96 If successful, zero is returned, an LDAP URL description is
97 allocated, filled in, and \fIludpp\fP is set to point to it. If an
98 error occurs, one of these values is returned:
101 LDAP_URL_ERR_NOTLDAP - URL doesn't begin with "ldap://"
102 LDAP_URL_ERR_NODN - URL has no DN (required)
103 LDAP_URL_ERR_BADSCOPE - URL scope string is invalid
104 LDAP_URL_ERR_MEM - can't allocate memory space
107 .B ldap_free_urldesc()
108 should be called to free an LDAP URL description that was obtained from
113 initiates an asynchronous LDAP search based on the contents of the
114 \fIurl\fP string. This routine acts just like
116 except that many search parameters are pulled out of the URL.
118 .B ldap_url_search_s()
119 performs a synchronous LDAP search based on the contents of the
120 \fIurl\fP string. This routine acts just like
121 .BR ldap_search_s (3)
122 except that many search parameters are pulled out of the URL.
124 .B ldap_url_search_st()
125 performs a synchronous LDAP URL search with a specified \fItimeout\fP.
126 This routine acts just like
127 .BR ldap_search_st (3)
128 except that many search parameters are pulled out of the URL.
133 .B An LDAP URL Format,
134 Tim Howes and Mark Smith, December 1995. Internet Draft (work in progress).
135 Currently available at this URL:
137 ftp://ds.internic.net/internet-drafts/draft-ietf-asid-ldap-format-03.txt
141 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
143 is derived from University of Michigan LDAP 3.3 Release.