1 .TH LDAP_URL 3 "28 March 1996" "U-M LDAP LDVERSION"
8 ldap_url_search_st \- LDAP Uniform Resource Locator routines
17 int ldap_is_ldap_url( url )
22 int ldap_url_parse( url, ludpp )
27 typedef struct ldap_url_desc {
28 char *lud_host; /* LDAP host to contact */
29 int lud_port; /* port on host */
30 char *lud_dn; /* base for search */
31 char **lud_attrs; /* NULL-terminate list of attributes */
32 int lud_scope; /* a valid LDAP_SCOPE_... value */
33 char *lud_filter; /* LDAP search filter */
34 char *lud_string; /* for internal use only */
38 ldap_free_urldesc( ludp )
43 int ldap_url_search( ld, url, attrsonly )
50 int ldap_url_search_s( ld, url, attrsonly, res )
58 int ldap_url_search_st( ld, url, attrsonly, timeout, res )
63 struct timeval *timeout;
66 These routines support the use of LDAP URLs (Uniform Resource Locators).
67 LDAP URLs look like this:
70 \fBldap://\fP\fIhostport\fP\fB/\fP\fIdn\fP[\fB?\fP\fIattributes\fP[\fB?\fP\fIscope\fP[\fB?\fP\fIfilter\fP]]]
73 \fIhostport\fP is a host name with an optional ":portnumber"
74 \fIdn\f is the base DN to be used for an LDAP search operation
75 \fIattributes\fP is a comma separated list of attributes to be retrieved
76 \fIscope\fP is one of these three strings: base one sub (default=base)
77 \fIfilter\f is LDAP search filter as used in a call to ldap_search(3)
79 e.g., ldap://ldap.itd.umich.edu/c=US?o,description?one?o=umich
82 URLs that are wrapped in angle-brackets and/or preceded by "URL:" are also
86 returns a non-zero value if \fIurl\fP looks like an LDAP URL (as
87 opposed to some other kind of URL). It can be used as a quick check
90 routine should be used if a more thorough check is needed.
93 breaks down an LDAP URL passed in \fIurl\fP into its component pieces.
94 If successful, zero is returned, an LDAP URL description is
95 allocated, filled in, and \fIludpp\fP is set to point to it. If an
96 error occurs, one of these values is returned:
99 LDAP_URL_ERR_NOTLDAP - URL doesn't begin with "ldap://"
100 LDAP_URL_ERR_NODN - URL has no DN (required)
101 LDAP_URL_ERR_BADSCOPE - URL scope string is invalid
102 LDAP_URL_ERR_MEM - can't allocate memory space
105 .B ldap_free_urldesc()
106 should be called to free an LDAP URL description that was obtained from
111 initiates an asynchronous LDAP search based on the contents of the
112 \fIurl\fP string. This routine acts just like
114 except that many search parameters are pulled out of the URL.
116 .B ldap_url_search_s()
117 performs a synchronous LDAP search based on the contents of the
118 \fIurl\fP string. This routine acts just like
119 .BR ldap_search_s (3)
120 except that many search parameters are pulled out of the URL.
122 .B ldap_url_search_st()
123 performs a synchronous LDAP URL search with a specified \fItimeout\fP.
124 This routine acts just like
125 .BR ldap_search_st (3)
126 except that many search parameters are pulled out of the URL.
131 .B An LDAP URL Format,
132 Tim Howes and Mark Smith, December 1995. Internet Draft (work in progress).
133 Currently available at this URL:
135 ftp://ds.internic.net/internet-drafts/draft-ietf-asid-ldap-format-03.txt