Mozilla::LDAP::API - Perl methods for LDAP C API calls
use Mozilla::LDAP::API; or use Mozilla::LDAP::API qw(:api :ssl :constant); or use Mozilla::LDAP::API qw(:api :ssl :apiv3 :constant);
This package offers a direct interface to the LDAP C API calls from Perl. It is used internally by the other Mozilla::LDAP modules. It is highly suggested that you use the object oriented interface in Mozilla::LDAP::Conn and Mozilla::LDAP::Entry unless you need to use asynchronous calls or other functionality not available in the OO interface.
This document has a number of known errors that will be corrected in the next revision. Since it is not expected that users will need to use this interface frequently, priority was placed on other documents. You can find examples of how to actually use the API calls under the test_api directory.
For the add and modify routines you will need to generate a list of attributes and values.
You will do this by creating a HASH table. Each attribute in the hash contains associated values. These values can be one of three things.
- SCALAR VALUE (ex. "Clayton Donley") - ARRAY REFERENCE (ex. ["Clayton Donley","Clay Donley"]) - HASH REFERENCE (ex. {"r",["Clayton Donley"]} note: the value inside the HASH REFERENCE must currently be an ARRAY REFERENCE.
The key inside the HASH REFERENCE must be one of the following for a modify operation: - "a" for LDAP_MOD_ADD (Add these values to the attribute) - "r" for LDAP_MOD_REPLACE (Replace these values in the attribute) - "d" for LDAP_MOD_DELETE (Delete these values from the attribute)
Additionally, in add and modify operations, you may specify "b" if the attributes you are adding are BINARY (ex. "rb" to replace binary).
Currently, it is only possible to do one operation per add/modify operation, meaning you can't do something like:
{"d",["Clayton"],"a",["Clay"]} <-- WRONG!
Using any combination of the above value types, you can do things like:
%ldap_modifications = ( "cn", "Clayton Donley", # Replace 'cn' values "givenname", ["Clayton","Clay"], # Replace 'givenname' values "mail", {"a",["donley\@cig.mcel.mot.com"], #Add 'mail' values "jpegphoto", {"rb",[$jpegphotodata]}, # Replace Binary jpegPhoto );
Then remember to call the add or modify operations with a REFERENCE to this HASH.
The following are the available API methods for Mozilla::LDAP::API. Many of these items have bad examples and OUTPUT information. Other information should be correct.
DESCRIPTION:
Abandon an asynchronous LDAP operation
INPUT: ld - LDAP Session Handle msgid - Integer
OUTPUT: status - Integer
AVAILABILITY: V2/V3
EXAMPLE:
$status = ldap_abandon($ld,$msgid);
Abandon an asynchronous LDAP operation w/ Controls
INPUT: ld - LDAP Session Handle msgid - Integer serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer
AVAILABILITY: V3
$status = ldap_abandon_ext($ld,$msgid,$serverctrls,$clientctrls);
Asynchronously add a LDAP entry
INPUT: ld - LDAP Session Handle dn - String attrs - LDAP Add/Modify Hash
$status = ldap_add($ld,$dn,$attrs);
Asynchronously add a LDAP entry w/ Controls
INPUT: ld - LDAP Session Handle dn - String attrs - LDAP Add/Modify Hash serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer msgidp - Integer
OUTPUT: status - Integer msgidp - Integer
$status = ldap_add_ext($ld,$dn,$attrs,$serverctrls,$clientctrls,$msgidp);
Synchronously add a LDAP entry w/ Controls
INPUT: ld - LDAP Session Handle dn - String attrs - LDAP Add/Modify Hash serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer
$status = ldap_add_ext_s($ld,$dn,$attrs,$serverctrls,$clientctrls);
Synchronously add a LDAP entry
$status = ldap_add_s($ld,$dn,$attrs);
Free a BER element pointer
INPUT: ber - BER Element Pointer freebuf - Integer
OUTPUT: status - NONE
$status = ldap_ber_free($ber,$freebuf);
Asynchronously bind to the LDAP server
INPUT: ld - LDAP Session Handle dn - String passwd - String authmethod - Integer
$status = ldap_bind($ld,$dn,$passwd,$authmethod);
Synchronously bind to a LDAP server
$status = ldap_bind_s($ld,$dn,$passwd,$authmethod);
Asynchronously compare an attribute/value pair and an entry
INPUT: ld - LDAP Session Handle dn - String attr - String value - String
$status = ldap_compare($ld,$dn,$attr,$value);
Asynchronously compare an attribute/value pair and an entry w/ Controls
INPUT: ld - LDAP Session Handle dn - String attr - String bvalue - Binary String serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer msgidp - Integer
$status = ldap_compare_ext($ld,$dn,$attr,$bvalue,$serverctrls,$clientctrls,$msgidp);
Synchronously compare an attribute/value pair to an entry w/ Controls
INPUT: ld - LDAP Session Handle dn - String attr - String bvalue - Binary String serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer
$status = ldap_compare_ext_s($ld,$dn,$attr,$bvalue,$serverctrls,$clientctrls);
Synchronously compare an attribute/value pair to an entry
$status = ldap_compare_s($ld,$dn,$attr,$value);
Free a LDAP control pointer
INPUT: ctrl - LDAP Control Pointer
$status = ldap_control_free($ctrl);
Count the number of LDAP controls in a LDAP Control List
INPUT: ctrls - LDAP Control List Pointer
$status = ldap_controls_count($ctrls);
Free a list of LDAP controls
$status = ldap_controls_free($ctrls);
Count the number of LDAP entries returned
INPUT: ld - LDAP Session Handle result - LDAP Message Pointer
$count = ldap_count_entries($ld,$result);
Count the number of LDAP messages returned
$status = ldap_count_messages($ld,$result);
Count the number of LDAP references returned
$status = ldap_count_references($ld,$result);
Create a LDAP search filter
INPUT: buf - String buflen - Integer pattern - String prefix - String suffix - String attr - String value - String valwords - List Reference
$status = ldap_create_filter($buf,$buflen,$pattern,$prefix,$suffix,$attr,$value,$valwords);
Create a persistent search control
INPUT: ld - LDAP Session Handle changetypes - Integer changesonly - Integer return_echg_ctrls - Integer ctrl_iscritical - Integer ctrlp - LDAP Control List Pointer
OUTPUT: status - Integer ctrlp - LDAP Control List Pointer
$status = ldap_create_persistentsearch_control($ld,$changetypes,$changesonly,$return_echg_ctrls,$ctrl_iscritical,$ctrlp);
Create a LDAP sort control
INPUT: ld - LDAP Session Handle sortKeyList - Sort Key Pointer ctrl_iscritical - Integer ctrlp - LDAP Control List Pointer
$status = ldap_create_sort_control($ld,$sortKeyList,$ctrl_iscritical,$ctrlp);
Create a list of keys to be used by a sort control
INPUT: sortKeyList - Sort Key Pointer string_rep - String
OUTPUT: status - Integer sortKeyList - Sort Key Pointer
$status = ldap_create_sort_keylist($sortKeyList,$string_rep);
Create a LDAP virtual list control
INPUT: ld - LDAP Session Handle ctrlp - LDAP Control List Pointer
$status = ldap_create_virtuallist_control($ld,$ldvlistp,$ctrlp);
Asynchronously delete a LDAP entry
INPUT: ld - LDAP Session Handle dn - String
$status = ldap_delete($ld,$dn);
Asynchronously delete a LDAP entry w/ Controls
INPUT: ld - LDAP Session Handle dn - String serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer msgidp - Integer
$status = ldap_delete_ext($ld,$dn,$serverctrls,$clientctrls,$msgidp);
Synchronously delete a LDAP entry w/ Controls
INPUT: ld - LDAP Session Handle dn - String serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer
$status = ldap_delete_ext_s($ld,$dn,$serverctrls,$clientctrls);
Synchronously delete a LDAP entry
$status = ldap_delete_s($ld,$dn);
Change a DN to a "Friendly" name
INPUT: dn - String
OUTPUT: status - String
$status = ldap_dn2ufn($dn);
Return the string value of a LDAP error code
INPUT: err - Integer
$status = ldap_err2string($err);
Split a given DN into its components. Setting 'notypes' to 1 returns the components without their type names.
INPUT: dn - String notypes - Integer
$status = ldap_explode_dn($dn,$notypes);
Split a Relative DN into its components
$status = ldap_explode_rdn($dn,$notypes);
Perform an asynchronous extended operation
INPUT: ld - LDAP Session Handle requestoid - String requestdata - Binary String serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer msgidp - Integer
$status = ldap_extended_operation($ld,$requestoid,$requestdata,$serverctrls,$clientctrls,$msgidp);
Perform a synchronous extended operation
INPUT: ld - LDAP Session Handle requestoid - String requestdata - Binary String serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer retoidp - String
OUTPUT: status - Integer retoidp - Return OID retdatap - Return Data
$status = ldap_extended_operation_s($ld,$requestoid,$requestdata,$serverctrls,$clientctrls,$retoidp,$retdatap);
Return the first attribute returned for a LDAP entry
INPUT: ld - LDAP Session Handle entry - LDAP Message Pointer ber - Ber Element Pointer
OUTPUT: status - String ber - Ber Element Pointer
$status = ldap_first_attribute($ld,$entry,$ber);
Return the first entry in a LDAP result chain
INPUT: ld - LDAP Session Handle chain - LDAP Message Pointer
OUTPUT: status - LDAP Message Pointer
$status = ldap_first_entry($ld,$chain);
Return the first message in a LDAP result
INPUT: ld - LDAP Session Handle res - LDAP Message Pointer
$status = ldap_first_message($ld,$res);
Return the first reference in a LDAP result
$status = ldap_first_reference($ld,$res);
Free a LDAP friendly map pointer
INPUT: map - Friendly Map Pointer
$status = ldap_free_friendlymap($map);
Free a LDAP sort key pointer
INPUT: sortKeyList - Sort Key Pointer
$status = ldap_free_sort_keylist($sortKeyList);
Free a LDAP URL description hash reference
INPUT: ludp - URL Description Hash Reference
$status = ldap_free_urldesc($ludp);
Create a LDAP friendly name map
INPUT: filename - String name - String map - Friendly Map Pointer
$status = ldap_friendly_name($filename,$name,$map);
Return the distinguished name for an entry
INPUT: ld - LDAP Session Handle entry - LDAP Message Pointer
$status = ldap_get_dn($ld,$entry);
Return the controls for a LDAP entry
INPUT: ld - LDAP Session Handle entry - LDAP Message Pointer serverctrlsp - LDAP Control List Pointer
OUTPUT: status - Integer serverctrlsp - LDAP Control List Pointer
$status = ldap_get_entry_controls($ld,$entry,$serverctrlsp);
Free a LDAP filter
INPUT: lfdp - LDAP Filter Description Pointer
$status = ldap_getfilter_free($lfdp);
Get the first generated filter
INPUT: lfdp - LDAP Filter Description Pointer tagpat - String
OUTPUT: status - LDAP Filter Information Pointer
$status = ldap_getfirstfilter($lfdp,$tagpat,$value);
Get values for an entry
INPUT: ld - LDAP Session Handle entry - LDAP Message Pointer target - String type - String
$status = ldap_get_lang_values($ld,$entry,$target,$type);
Get binary values for an entry
$status = ldap_get_lang_values_len($ld,$entry,$target,$type);
INPUT: ld - LDAP Session Handle m - String Reference (or undef) s - String Reference (or undef)
$status = ldap_get_lderrno($ld,\$m,\$s);
Get the next generated LDAP filter
INPUT: lfdp - LDAP Filter Information Pointer
$status = ldap_getnextfilter($lfdp);
Get an option for a LDAP session
INPUT: ld - LDAP Session Handle option - Integer optdata - Integer
OUTPUT: status - Integer optdata - Integer
$status = ldap_get_option($ld,$option,$optdata);
Get the values for a LDAP entry and attribute
INPUT: ld - LDAP Session Handle entry - LDAP Message Pointer target - String
$status = ldap_get_values($ld,$entry,$target);
Get the binary values for a LDAP entry and attribute
$status = ldap_get_values_len($ld,$entry,$target);
Initialize a LDAP session
INPUT: host - String port - Integer
OUTPUT: status - LDAP Session Handle
$status = ldap_init($host,$port);
Initialize the LDAP filter generation routines to a filename
INPUT: fname - Filename String
OUTPUT: status - LDAP Filter Description Pointer
$status = ldap_init_getfilter($fname);
Initialize the LDAP filter generation routines to a buffer
INPUT: buf - String buflen - Integer
$status = ldap_init_getfilter_buf($buf,$buflen);
Return 1 if an the argument is a valid LDAP URL
INPUT: url - String
$status = ldap_is_ldap_url($url);
Destroy a memory cache
INPUT: cache - LDAP Memory Cache Pointer
$status = ldap_memcache_destroy($cache);
Flush a specific DN from the memory cache
INPUT: cache - LDAP Memory Cache Pointer dn - String scope - Integer
$status = ldap_memcache_flush($cache,$dn,$scope);
Get the memory cache for a LDAP session
INPUT: ld - LDAP Session Handle cachep - LDAP Memory Cache Pointer
OUTPUT: status - Integer cachep - LDAP Memory Cache Pointer
$status = ldap_memcache_get($ld,$cachep);
Initialize a LDAP memory cache
INPUT: ttl - Integer size - Integer baseDNs - List Reference cachep - LDAP Memory Cache Pointer
$status = ldap_memcache_init($ttl,$size,$baseDNs,$cachep);
Set the LDAP memory cache for the session
INPUT: ld - LDAP Session Handle cache - LDAP Memory Cache Pointer
$status = ldap_memcache_set($ld,$cache);
Update the specified memory cache
$status = ldap_memcache_update($cache);
Free memory allocated by the LDAP C API
INPUT: p - Pointer
$status = ldap_memfree($p);
Asynchronously modify a LDAP entry
INPUT: ld - LDAP Session Handle dn - String mods - LDAP Add/Modify Hash
$status = ldap_modify($ld,$dn,$mods);
Asynchronously modify a LDAP entry w/ Controls
INPUT: ld - LDAP Session Handle dn - String mods - LDAP Add/Modify Hash serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer msgidp - Integer
$status = ldap_modify_ext($ld,$dn,$mods,$serverctrls,$clientctrls,$msgidp);
Synchronously modify a LDAP entry w/ Controls
INPUT: ld - LDAP Session Handle dn - String mods - LDAP Add/Modify Hash serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer
$status = ldap_modify_ext_s($ld,$dn,$mods,$serverctrls,$clientctrls);
Synchronously modify a LDAP entry
$status = ldap_modify_s($ld,$dn,$mods);
Asynchronously modify the relative distinguished name of an entry
INPUT: ld - LDAP Session Handle dn - String newrdn - String
$status = ldap_modrdn($ld,$dn,$newrdn);
Synchronously modify the relative distinguished name of an entry
$status = ldap_modrdn_s($ld,$dn,$newrdn);
Asynchronously modify the relative distinguished name of an entry.
INPUT: ld - LDAP Session Handle dn - String newrdn - String deleteoldrdn - Integer
$status = ldap_modrdn2($ld,$dn,$newrdn,$deleteoldrdn);
Synchronously modify the relative distinguished name of an entry.
$status = ldap_modrdn2_s($ld,$dn,$newrdn,$deleteoldrdn);
Free memory allocated by a LDAP Message
INPUT: lm - LDAP Message Pointer
$status = ldap_msgfree($lm);
Get the message id number from a LDAP message
$status = ldap_msgid($lm);
Get the message type of a LDAP message
$status = ldap_msgtype($lm);
Sort entries by multiple keys
INPUT: ld - LDAP Session Handle chain - LDAP Message Pointer attr - List Reference
OUTPUT: status - Integer chain - LDAP Message Pointer
$status = ldap_multisort_entries($ld,$chain,$attr);
Get the next attribute for a LDAP entry
OUTPUT: status - String ber - BER Element Pointer
$status = ldap_next_attribute($ld,$entry,$ber);
Get the next entry in the result chain
$status = ldap_next_entry($ld,$entry);
Get the next message in the result chain
INPUT: ld - LDAP Session Handle msg - LDAP Message Pointer
$status = ldap_next_message($ld,$msg);
Get the next reference in the result chain
INPUT: ld - LDAP Session Handle ref - LDAP Message Pointer
$status = ldap_next_reference($ld,$ref);
Parse a LDAP entry change control
INPUT: ld - LDAP Session Handle ctrls - LDAP Control List Pointer chgtypep - Integer prevdnp - String chgnumpresentp - Integer chgnump - Integer
OUTPUT: status - Integer chgtypep - Integer prevdnp - String chgnumpresentp - Integer chgnump - Integer
$status = ldap_parse_entrychange_control($ld,$ctrls,$chgtypep,$prevdnp,$chgnumpresentp,$chgnump);
Parse a LDAP extended result
INPUT: ld - LDAP Session Handle res - LDAP Message Pointer retoidp - String freeit - Integer
OUTPUT: status - Integer retoidp - String retdatap - Binary List Reference
$status = ldap_parse_extended_result($ld,$res,$retoidp,$retdatap,$freeit);
Parse a LDAP Reference
INPUT: ld - LDAP Session Handle ref - LDAP Message Pointer referalsp - List Reference serverctrlsp - LDAP Control List Pointer freeit - Integer
OUTPUT: status - Integer referalsp - List Reference serverctrlsp - LDAP Control List Pointer
$status = ldap_parse_reference($ld,$ref,$referalsp,$serverctrlsp,$freeit);
Parse a LDAP result
INPUT: ld - LDAP Session Handle res - LDAP Message Pointer errcodep - Integer matcheddnp - String errmsgp - String referralsp - List Reference serverctrlsp - LDAP Control List Pointer freeit - Integer
OUTPUT: status - Integer errcodep - Integer matcheddnp - String errmsgp - String referralsp - List Reference serverctrlsp - LDAP Control List Pointer
$status = ldap_parse_result($ld,$res,$errcodep,$matcheddnp,$errmsgp,$referralsp,$serverctrlsp,$freeit);
Parse the results of an SASL bind operation
INPUT: ld - LDAP Session Handle res - LDAP Message Pointer freeit - Integer
OUTPUT: status - Integer servercredp -
$status = ldap_parse_sasl_bind_result($ld,$res,$servercredp,$freeit);
Parse a LDAP sort control
INPUT: ld - LDAP Session Handle ctrls - LDAP Control List Pointer result - LDAP Message Pointer attribute - String
OUTPUT: status - Integer result - LDAP Message Pointer attribute - String
$status = ldap_parse_sort_control($ld,$ctrls,$result,$attribute);
Parse a LDAP virtual list control
INPUT: ld - LDAP Session Handle ctrls - LDAP Control List Pointer target_posp - Integer list_sizep - Integer errcodep - Integer
OUTPUT: status - Integer target_posp - Integer list_sizep - Integer errcodep - Integer
$status = ldap_parse_virtuallist_control($ld,$ctrls,$target_posp,$list_sizep,$errcodep);
Print a LDAP error message
INPUT: ld - LDAP Session Handle s - String
$status = ldap_perror($ld,$s);
Asynchronously rename a LDAP entry
INPUT: ld - LDAP Session Handle dn - String newrdn - String newparent - String deleteoldrdn - Integer serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer msgidp - Integer
$status = ldap_rename($ld,$dn,$newrdn,$newparent,$deleteoldrdn,$serverctrls,$clientctrls,$msgidp);
Synchronously rename a LDAP entry
INPUT: ld - LDAP Session Handle dn - String newrdn - String newparent - String deleteoldrdn - Integer serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer
$status = ldap_rename_s($ld,$dn,$newrdn,$newparent,$deleteoldrdn,$serverctrls,$clientctrls);
Get the result for an asynchronous LDAP operation
INPUT: ld - LDAP Session Handle msgid - Integer all - Integer timeout - Time in Seconds result - LDAP Message Pointer
OUTPUT: status - Integer result - LDAP Message Pointer
$status = ldap_result($ld,$msgid,$all,$timeout,$result);
Get the error number for a given result
INPUT: ld - LDAP Session Handle r - LDAP Message Pointer freeit - Integer
$status = ldap_result2error($ld,$r,$freeit);
Asynchronously bind to the LDAP server using a SASL mechanism
INPUT: ld - LDAP Session Handle dn - String mechanism - String cred - Binary String serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer msgidp - Integer
$status = ldap_sasl_bind($ld,$dn,$mechanism,$cred,$serverctrls,$clientctrls,$msgidp);
Synchronously bind to a LDAP server using a SASL mechanism
INPUT: ld - LDAP Session Handle dn - String mechanism - String cred - Binary String serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer
$status = ldap_sasl_bind_s($ld,$dn,$mechanism,$cred,$serverctrls,$clientctrls,$servercredp);
Asynchronously search the LDAP server
INPUT: ld - LDAP Session Handle base - String scope - Integer filter - String attrs - List Reference attrsonly - Integer
$status = ldap_search($ld,$base,$scope,$filter,$attrs,$attrsonly);
Asynchronously search the LDAP server w/ Controls
INPUT: ld - LDAP Session Handle base - String scope - Integer filter - String attrs - List Reference attrsonly - Integer serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer timeoutp - Time in Seconds sizelimit - Integer msgidp - Integer
$status = ldap_search_ext($ld,$base,$scope,$filter,$attrs,$attrsonly,$serverctrls,$clientctrls,$timeoutp,$sizelimit,$msgidp);
Synchronously search the LDAP server w/ Controls
INPUT: ld - LDAP Session Handle base - String scope - Integer filter - String attrs - List Reference attrsonly - Integer serverctrls - LDAP Control List Pointer clientctrls - LDAP Control List Pointer timeoutp - Time in Seconds sizelimit - Integer res - LDAP Message Pointer
OUTPUT: status - Integer res - LDAP Message Pointer
$status = ldap_search_ext_s($ld,$base,$scope,$filter,$attrs,$attrsonly,$serverctrls,$clientctrls,$timeoutp,$sizelimit,$res);
Synchronously search the LDAP server
INPUT: ld - LDAP Session Handle base - String scope - Integer filter - String attrs - List Reference attrsonly - Integer res - LDAP Message Pointer
$status = ldap_search_s($ld,$base,$scope,$filter,$attrs,$attrsonly,$res);
Synchronously search the LDAP server w/ Timeout
INPUT: ld - LDAP Session Handle base - String scope - Integer filter - String attrs - List Reference attrsonly - Integer timeout - Time in Seconds res - LDAP Message Pointer
$status = ldap_search_st($ld,$base,$scope,$filter,$attrs,$attrsonly,$timeout,$res);
Add a prefix and suffix for filter generation
INPUT: lfdp - LDAP Filter Description Pointer prefix - String suffix - String
$status = ldap_set_filter_additions($lfdp,$prefix,$suffix);
Set the LDAP error structure
INPUT: ld - LDAP Session Handle e - Integer m - String s - String
$status = ldap_set_lderrno($ld,$e,$m,$s);
Set a LDAP session option
$status = ldap_set_option($ld,$option,$optdata);
Set the LDAP rebind process
INPUT: ld - LDAP Session Handle
$status = ldap_set_rebind_proc($ld,$rebindproc);
Asynchronously bind to the LDAP server using simple authentication
INPUT: ld - LDAP Session Handle who - String passwd - String
$status = ldap_simple_bind($ld,$who,$passwd);
Synchronously bind to the LDAP server using simple authentication
$status = ldap_simple_bind_s($ld,$who,$passwd);
Sort the results of a LDAP search
INPUT: ld - LDAP Session Handle chain - LDAP Message Pointer attr - String
$status = ldap_sort_entries($ld,$chain,$attr);
Asynchronously unbind from the LDAP server
$status = ldap_unbind($ld);
Synchronously unbind from a LDAP server
$status = ldap_unbind_s($ld);
Parse a LDAP URL, returning a HASH of its components
OUTPUT: status -
$status = ldap_url_parse($url);
Asynchronously search using a LDAP URL
INPUT: ld - LDAP Session Handle url - String attrsonly - Integer
$status = ldap_url_search($ld,$url,$attrsonly);
Synchronously search using a LDAP URL
INPUT: ld - LDAP Session Handle url - String attrsonly - Integer res - LDAP Message Pointer
$status = ldap_url_search_s($ld,$url,$attrsonly,$res);
Synchronously search using a LDAP URL w/ timeout
INPUT: ld - LDAP Session Handle url - String attrsonly - Integer timeout - Time in Seconds res - LDAP Message Pointer
$status = ldap_url_search_st($ld,$url,$attrsonly,$timeout,$res);
Most of the Perl API module was written by Clayton Donley to interface with C API routines from Netscape Communications Corp., Inc.
Documentation needs much work. LDAPv3 calls not tested or supported in this version. NT can not use Perl Rebind processes, must use 'ldap_set_default_rebindproc'. Possible memory leak in ldap_search* is being investigated.
Mozilla::LDAP::Conn, Mozilla::LDAP::Entry, and Perl
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Mozilla::LDAP::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mozilla::LDAP::API
CPAN shell
perl -MCPAN -e shell install Mozilla::LDAP::API
For more information on module installation, please visit the detailed CPAN module installation guide.