Converts from an LDAPURLDesc structure to a URL string.
#include <ldap.h>
char* ldap_url_parse (
LDAPURLDesc *ludp);
(IN) Points to an LDAPURLDesc structure that contains the components of the URL.
This function returns an LDAP URL in string format. NULL is returned if an allocation error occurs.
Since this function does not return a standard LDAP error code, you should not call ldap_err2string to parse the return code.
An LDAP URL has the following format:
ldap[s]://<hostname>:<port>/<base_dn>?<attributes>?<scope>? <filter>?<extensions>
If you plan to convert an LDAPURLDesc structure to an LDAP URL string then back again, use ldap_url_parse_ext, as it is better retains the original format of the structure.
The string returned by this function should be freed with ldap_memfree.