ldap_url_desc2str

Converts from an LDAPURLDesc structure to a URL string.

LDAP Version:v3
Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  char* ldap_url_parse (
     LDAPURLDesc   *ludp);
  
  

Parameters

ludpp

(IN) Points to an LDAPURLDesc structure that contains the components of the URL.

Return Values

This function returns an LDAP URL in string format. NULL is returned if an allocation error occurs.

Remarks

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.

See Also

ldap_memfree, ldap_url_parse_ext