#include <lber.h> #include <ldap.h>int ldap_is_ldap_url(char
url);
int ldap_url_parse(char
url, LDAPURLDesc
ludpp);
ldap_free_urldesc(LDAPURLDesc
ludpp);
int ldap_url_search(LDAP
ld, char
url, int attrsonly);
int ldap_url_search_s(LDAP
ld, char
url, int attrsonly, LDAPMessage
res);
int ldap_url_search_st(LDAP
ld, char
url, int attrsonly, struct timeval
timeout, LDAPMessage
res);
where:
The default is ``base''.
ldap://ldap.itd.umich.edu/c=US?o,description?one?o=umichURLs that are wrapped in angle-brackets and/or preceded by ``URL:'' are also tolerated.
ldap_is_ldap_url returns a non-zero value if url looks like an LDAP URL (as opposed to some other kind of URL). It can be used as a quick check for an LDAP URL; the ldap_url_parse routine should be used if a more thorough check is needed.
ldap_url_parse breaks down an LDAP URL passed in url into its component pieces. If successful, 0 is returned, an LDAP URL description is allocated, filled in, and ludpp is set to point to it. If an error occurs, one of these values is returned:
ldap_url_search initiates an asynchronous LDAP search based on the contents of the url string. This routine acts just like ldap_search(3ldap) except that many search parameters are pulled out of the URL.
ldap_url_search_s performs a synchronous LDAP search based on the contents of the url string. This routine acts just like ldap_search_s(3ldap) except that many search parameters are pulled out of the URL.
ldap_url_search_st performs a synchronous LDAP URL search with a specified timeout. This routine acts just like ldap_search_st(3ldap) except that many search parameters are pulled out of the URL.
RFC 1959: An LDAP URL Format.