SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from OpenSuSE 12.X perl-Mozilla-LDAP-1.5.3-6.1.i586.rpm

API

Section: User Contributed Perl Documentation (3)
Updated: 2007-06-14
Index 

NAME

  Mozilla::LDAP::API - Perl methods for LDAP C API calls
 

SYNOPSIS

  use Mozilla::LDAP::API;       or  use Mozilla::LDAP::API qw(:api :ssl :constant);       or  use Mozilla::LDAP::API qw(:api :ssl :apiv3 :constant);       or  use Mozilla::LDAP::API qw(:api :ssl :apiv3 :nspr :constant);
 

DESCRIPTION

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 highlysuggested that you use the object oriented interface inMozilla::LDAP::Conn and Mozilla::LDAP::Entry unless you need to useasynchronous calls or other functionality not available in the OO interface. 

THIS DOCUMENT

This document has a number of known errors that will be corrected in thenext revision. Since it is not expected that users will need to use thisinterface frequently, priority was placed on other documents. You can findexamples of how to actually use the API calls under the test_api directory. 

CREATING AN ADD/MODIFY HASH

For the add and modify routines you will need to generatea list of attributes and values.

You will do this by creating a HASH table. Each attribute in thehash contains associated values. These values can be one of threethings.

  - 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 amodify 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 theattributes you are adding are BINARY (ex. ``rb'' to replace binary).

Currently, it is only possible to do one operation per add/modifyoperation, 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 tothis HASH. 

API Methods

The following are the available API methods for Mozilla::LDAP::API. Manyof these items have bad examples and OUTPUT information. Other informationshould be correct.
ldap_abandon(ld,msgid)
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);
ldap_abandon_ext(ld,msgid,serverctrls,clientctrls)
DESCRIPTION:

Abandon an asynchronous LDAP operation w/ Controls

INPUT:
  ld - LDAP Session Handle
  msgid - Integer
  serverctrls - LDAP Control List Pointer
  clientctrls - LDAP Control List Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_abandon_ext($ld,$msgid,$serverctrls,$clientctrls);
ldap_add(ld,dn,attrs)
DESCRIPTION:

Asynchronously add a LDAP entry

INPUT:
  ld - LDAP Session Handle
  dn - String
  attrs - LDAP Add/Modify Hash

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_add($ld,$dn,$attrs);
ldap_add_ext(ld,dn,attrs,serverctrls,clientctrls,msgidp)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_add_ext($ld,$dn,$attrs,$serverctrls,$clientctrls,$msgidp);
ldap_add_ext_s(ld,dn,attrs,serverctrls,clientctrls)
DESCRIPTION:

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

OUTPUT:
  status - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_add_ext_s($ld,$dn,$attrs,$serverctrls,$clientctrls);
ldap_add_s(ld,dn,attrs)
DESCRIPTION:

Synchronously add a LDAP entry

INPUT:
  ld - LDAP Session Handle
  dn - String
  attrs - LDAP Add/Modify Hash

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_add_s($ld,$dn,$attrs);
ldap_ber_free(ber,freebuf)
DESCRIPTION:

Free a BER element pointer

INPUT:
  ber - BER Element Pointer
  freebuf - Integer

OUTPUT:
  status - NONE

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_ber_free($ber,$freebuf);
ldap_bind(ld,dn,passwd,authmethod)
DESCRIPTION:

Asynchronously bind to the LDAP server

INPUT:
  ld - LDAP Session Handle
  dn - String
  passwd - String
  authmethod - Integer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_bind($ld,$dn,$passwd,$authmethod);
ldap_bind_s(ld,dn,passwd,authmethod)
DESCRIPTION:

Synchronously bind to a LDAP server

INPUT:
  ld - LDAP Session Handle
  dn - String
  passwd - String
  authmethod - Integer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_bind_s($ld,$dn,$passwd,$authmethod);
ldap_compare(ld,dn,attr,value)
DESCRIPTION:

Asynchronously compare an attribute/value pair and an entry

INPUT:
  ld - LDAP Session Handle
  dn - String
  attr - String
  value - String

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_compare($ld,$dn,$attr,$value);
ldap_compare_ext(ld,dn,attr,bvalue,serverctrls,clientctrls,msgidp)
DESCRIPTION:

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

OUTPUT:
  status - Integer
  msgidp - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_compare_ext($ld,$dn,$attr,$bvalue,$serverctrls,$clientctrls,$msgidp);
ldap_compare_ext_s(ld,dn,attr,bvalue,serverctrls,clientctrls)
DESCRIPTION:

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

OUTPUT:
  status - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_compare_ext_s($ld,$dn,$attr,$bvalue,$serverctrls,$clientctrls);
ldap_compare_s(ld,dn,attr,value)
DESCRIPTION:

Synchronously compare an attribute/value pair to an entry

INPUT:
  ld - LDAP Session Handle
  dn - String
  attr - String
  value - String

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_compare_s($ld,$dn,$attr,$value);
ldap_control_free(ctrl)
DESCRIPTION:

Free a LDAP control pointer

INPUT:
  ctrl - LDAP Control Pointer

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_control_free($ctrl);
ldap_controls_count(ctrls)
DESCRIPTION:

Count the number of LDAP controls in a LDAP Control List

INPUT:
  ctrls - LDAP Control List Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_controls_count($ctrls);
ldap_controls_free(ctrls)
DESCRIPTION:

Free a list of LDAP controls

INPUT:
  ctrls - LDAP Control List Pointer

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_controls_free($ctrls);
ldap_count_entries(ld,result)
DESCRIPTION:

Count the number of LDAP entries returned

INPUT:
  ld - LDAP Session Handle
  result - LDAP Message Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $count = ldap_count_entries($ld,$result);
ldap_count_messages(ld,result)
DESCRIPTION:

Count the number of LDAP messages returned

INPUT:
  ld - LDAP Session Handle
  result - LDAP Message Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_count_messages($ld,$result);
ldap_count_references(ld,result)
DESCRIPTION:

Count the number of LDAP references returned

INPUT:
  ld - LDAP Session Handle
  result - LDAP Message Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_count_references($ld,$result);
ldap_create_filter(buf,buflen,pattern,prefix,suffix,attr,value,valwords)
DESCRIPTION:

Create a LDAP search filter

INPUT:
  buf - String
  buflen - Integer
  pattern - String
  prefix - String
  suffix - String
  attr - String
  value - String
  valwords - List Reference

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_create_filter($buf,$buflen,$pattern,$prefix,$suffix,$attr,$value,$valwords);
ldap_create_persistentsearch_control(ld,changetypes,changesonly,return_echg_ctrls,ctrl_iscritical,ctrlp)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_create_persistentsearch_control($ld,$changetypes,$changesonly,$return_echg_ctrls,$ctrl_iscritical,$ctrlp);
ldap_create_sort_control(ld,sortKeyList,ctrl_iscritical,ctrlp)
DESCRIPTION:

Create a LDAP sort control

INPUT:
  ld - LDAP Session Handle
  sortKeyList - Sort Key Pointer
  ctrl_iscritical - Integer
  ctrlp - LDAP Control List Pointer

OUTPUT:
  status - Integer
  ctrlp - LDAP Control List Pointer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_create_sort_control($ld,$sortKeyList,$ctrl_iscritical,$ctrlp);
ldap_create_sort_keylist(sortKeyList,string_rep)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_create_sort_keylist($sortKeyList,$string_rep);
ldap_create_virtuallist_control(ld,ldvlistp,ctrlp)
DESCRIPTION:

Create a LDAP virtual list control

INPUT:
  ld - LDAP Session Handle
  ctrlp - LDAP Control List Pointer

OUTPUT:
  status - Integer
  ctrlp - LDAP Control List Pointer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_create_virtuallist_control($ld,$ldvlistp,$ctrlp);
ldap_delete(ld,dn)
DESCRIPTION:

Asynchronously delete a LDAP entry

INPUT:
  ld - LDAP Session Handle
  dn - String

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_delete($ld,$dn);
ldap_delete_ext(ld,dn,serverctrls,clientctrls,msgidp)
DESCRIPTION:

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

OUTPUT:
  status - Integer
  msgidp - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_delete_ext($ld,$dn,$serverctrls,$clientctrls,$msgidp);
ldap_delete_ext_s(ld,dn,serverctrls,clientctrls)
DESCRIPTION:

Synchronously delete a LDAP entry w/ Controls

INPUT:
  ld - LDAP Session Handle
  dn - String
  serverctrls - LDAP Control List Pointer
  clientctrls - LDAP Control List Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_delete_ext_s($ld,$dn,$serverctrls,$clientctrls);
ldap_delete_s(ld,dn)
DESCRIPTION:

Synchronously delete a LDAP entry

INPUT:
  ld - LDAP Session Handle
  dn - String

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_delete_s($ld,$dn);
ldap_dn2ufn(dn)
DESCRIPTION:

Change a DN to a ``Friendly'' name

INPUT:
  dn - String

OUTPUT:
  status - String

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_dn2ufn($dn);
ldap_err2string(err)
DESCRIPTION:

Return the string value of a LDAP error code

INPUT:
  err - Integer

OUTPUT:
  status - String

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_err2string($err);
ldap_explode_dn(dn,notypes)
DESCRIPTION:

Split a given DN into its components. Setting 'notypes' to 1 returns thecomponents without their type names.

INPUT:
  dn - String
  notypes - Integer

OUTPUT:
  status - NONE

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_explode_dn($dn,$notypes);
ldap_explode_rdn(dn,notypes)
DESCRIPTION:

Split a Relative DN into its components

INPUT:
  dn - String
  notypes - Integer

OUTPUT:
  status - NONE

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_explode_rdn($dn,$notypes);
ldap_extended_operation(ld,requestoid,requestdata,serverctrls,clientctrls,msgidp)
DESCRIPTION:

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

OUTPUT:
  status - Integer
  msgidp - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_extended_operation($ld,$requestoid,$requestdata,$serverctrls,$clientctrls,$msgidp);
ldap_extended_operation_s(ld,requestoid,requestdata,serverctrls,clientctrls,retoidp,retdatap)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_extended_operation_s($ld,$requestoid,$requestdata,$serverctrls,$clientctrls,$retoidp,$retdatap);
ldap_first_attribute(ld,entry,ber)
DESCRIPTION:

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

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_first_attribute($ld,$entry,$ber);
ldap_first_entry(ld,chain)
DESCRIPTION:

Return the first entry in a LDAP result chain

INPUT:
  ld - LDAP Session Handle
  chain - LDAP Message Pointer

OUTPUT:
  status - LDAP Message Pointer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_first_entry($ld,$chain);
ldap_first_message(ld,res)
DESCRIPTION:

Return the first message in a LDAP result

INPUT:
  ld - LDAP Session Handle
  res - LDAP Message Pointer

OUTPUT:
  status - LDAP Message Pointer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_first_message($ld,$res);
ldap_first_reference(ld,res)
DESCRIPTION:

Return the first reference in a LDAP result

INPUT:
  ld - LDAP Session Handle
  res - LDAP Message Pointer

OUTPUT:
  status - LDAP Message Pointer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_first_reference($ld,$res);
ldap_free_friendlymap(map)
DESCRIPTION:

Free a LDAP friendly map pointer

INPUT:
  map - Friendly Map Pointer

OUTPUT:
  status - NONE

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_free_friendlymap($map);
ldap_free_sort_keylist(sortKeyList)
DESCRIPTION:

Free a LDAP sort key pointer

INPUT:
  sortKeyList - Sort Key Pointer

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_free_sort_keylist($sortKeyList);
ldap_free_urldesc(ludp)
DESCRIPTION:

Free a LDAP URL description hash reference

INPUT:
  ludp - URL Description Hash Reference

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_free_urldesc($ludp);
ldap_friendly_name(filename,name,map)
DESCRIPTION:

Create a LDAP friendly name map

INPUT:
  filename - String
  name - String
  map - Friendly Map Pointer

OUTPUT:
  status - String

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_friendly_name($filename,$name,$map);
ldap_get_dn(ld,entry)
DESCRIPTION:

Return the distinguished name for an entry

INPUT:
  ld - LDAP Session Handle
  entry - LDAP Message Pointer

OUTPUT:
  status - String

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_get_dn($ld,$entry);
ldap_get_entry_controls(ld,entry,serverctrlsp)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_get_entry_controls($ld,$entry,$serverctrlsp);
ldap_getfilter_free(lfdp)
DESCRIPTION:

Free a LDAP filter

INPUT:
  lfdp - LDAP Filter Description Pointer

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_getfilter_free($lfdp);
ldap_getfirstfilter(lfdp,tagpat,value)
DESCRIPTION:

Get the first generated filter

INPUT:
  lfdp - LDAP Filter Description Pointer
  tagpat - String

OUTPUT:
  status - LDAP Filter Information Pointer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_getfirstfilter($lfdp,$tagpat,$value);
ldap_get_lang_values(ld,entry,target,type)
DESCRIPTION:

Get values for an entry

INPUT:
  ld - LDAP Session Handle
  entry - LDAP Message Pointer
  target - String
  type - String

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_get_lang_values($ld,$entry,$target,$type);
ldap_get_lang_values_len(ld,entry,target,type)
DESCRIPTION:

Get binary values for an entry

INPUT:
  ld - LDAP Session Handle
  entry - LDAP Message Pointer
  target - String
  type - String

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_get_lang_values_len($ld,$entry,$target,$type);
ldap_get_lderrno(ld,m,s)
DESCRIPTION:

INPUT:
  ld - LDAP Session Handle
  m  - String Reference (or undef)
  s  - String Reference (or undef)

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_get_lderrno($ld,\$m,\$s);
ldap_getnextfilter(lfdp)
DESCRIPTION:

Get the next generated LDAP filter

INPUT:
  lfdp - LDAP Filter Information Pointer

OUTPUT:
  status - LDAP Filter Information Pointer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_getnextfilter($lfdp);
ldap_get_option(ld,option,optdata)
DESCRIPTION:

Get an option for a LDAP session

INPUT:
  ld - LDAP Session Handle
  option - Integer
  optdata - Integer

OUTPUT:
  status - Integer
  optdata - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_get_option($ld,$option,$optdata);
ldap_get_values(ld,entry,target)
DESCRIPTION:

Get the values for a LDAP entry and attribute

INPUT:
  ld - LDAP Session Handle
  entry - LDAP Message Pointer
  target - String

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_get_values($ld,$entry,$target);
ldap_get_values_len(ld,entry,target)
DESCRIPTION:

Get the binary values for a LDAP entry and attribute

INPUT:
  ld - LDAP Session Handle
  entry - LDAP Message Pointer
  target - String

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_get_values_len($ld,$entry,$target);
ldap_init(host,port)
DESCRIPTION:

Initialize a LDAP session

INPUT:
  host - String
  port - Integer

OUTPUT:
  status - LDAP Session Handle

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_init($host,$port);
ldap_init_getfilter(fname)
DESCRIPTION:

Initialize the LDAP filter generation routines to a filename

INPUT:
  fname - Filename String

OUTPUT:
  status - LDAP Filter Description Pointer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_init_getfilter($fname);
ldap_init_getfilter_buf(buf,buflen)
DESCRIPTION:

Initialize the LDAP filter generation routines to a buffer

INPUT:
  buf - String
  buflen - Integer

OUTPUT:
  status - LDAP Filter Description Pointer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_init_getfilter_buf($buf,$buflen);
ldap_is_ldap_url(url)
DESCRIPTION:

Return 1 if an the argument is a valid LDAP URL

INPUT:
  url - String

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_is_ldap_url($url);
ldap_memcache_destroy(cache)
DESCRIPTION:

Destroy a memory cache

INPUT:
  cache - LDAP Memory Cache Pointer

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_memcache_destroy($cache);
ldap_memcache_flush(cache,dn,scope)
DESCRIPTION:

Flush a specific DN from the memory cache

INPUT:
  cache - LDAP Memory Cache Pointer
  dn - String
  scope - Integer

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_memcache_flush($cache,$dn,$scope);
ldap_memcache_get(ld,cachep)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_memcache_get($ld,$cachep);
ldap_memcache_init(ttl,size,baseDNs,cachep)
DESCRIPTION:

Initialize a LDAP memory cache

INPUT:
  ttl - Integer
  size - Integer
  baseDNs - List Reference
  cachep - LDAP Memory Cache Pointer

OUTPUT:
  status - Integer
  cachep - LDAP Memory Cache Pointer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_memcache_init($ttl,$size,$baseDNs,$cachep);
ldap_memcache_set(ld,cache)
DESCRIPTION:

Set the LDAP memory cache for the session

INPUT:
  ld - LDAP Session Handle
  cache - LDAP Memory Cache Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_memcache_set($ld,$cache);
ldap_memcache_update(cache)
DESCRIPTION:

Update the specified memory cache

INPUT:
  cache - LDAP Memory Cache Pointer

OUTPUT:
  status - NONE

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_memcache_update($cache);
ldap_memfree(p)
DESCRIPTION:

Free memory allocated by the LDAP C API

INPUT:
  p - Pointer

OUTPUT:
  status - NONE

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_memfree($p);
ldap_modify(ld,dn,mods)
DESCRIPTION:

Asynchronously modify a LDAP entry

INPUT:
  ld - LDAP Session Handle
  dn - String
  mods - LDAP Add/Modify Hash

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_modify($ld,$dn,$mods);
ldap_modify_ext(ld,dn,mods,serverctrls,clientctrls,msgidp)
DESCRIPTION:

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

OUTPUT:
  status - Integer
  msgidp - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_modify_ext($ld,$dn,$mods,$serverctrls,$clientctrls,$msgidp);
ldap_modify_ext_s(ld,dn,mods,serverctrls,clientctrls)
DESCRIPTION:

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

OUTPUT:
  status - Integer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_modify_ext_s($ld,$dn,$mods,$serverctrls,$clientctrls);
ldap_modify_s(ld,dn,mods)
DESCRIPTION:

Synchronously modify a LDAP entry

INPUT:
  ld - LDAP Session Handle
  dn - String
  mods - LDAP Add/Modify Hash

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_modify_s($ld,$dn,$mods);
ldap_modrdn(ld,dn,newrdn)
DESCRIPTION:

Asynchronously modify the relative distinguished name of an entry

INPUT:
  ld - LDAP Session Handle
  dn - String
  newrdn - String

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_modrdn($ld,$dn,$newrdn);
ldap_modrdn_s(ld,dn,newrdn)
DESCRIPTION:

Synchronously modify the relative distinguished name of an entry

INPUT:
  ld - LDAP Session Handle
  dn - String
  newrdn - String

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_modrdn_s($ld,$dn,$newrdn);
ldap_modrdn2(ld,dn,newrdn,deleteoldrdn)
DESCRIPTION:

Asynchronously modify the relative distinguished name of an entry.

INPUT:
  ld - LDAP Session Handle
  dn - String
  newrdn - String
  deleteoldrdn - Integer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_modrdn2($ld,$dn,$newrdn,$deleteoldrdn);
ldap_modrdn2_s(ld,dn,newrdn,deleteoldrdn)
DESCRIPTION:

Synchronously modify the relative distinguished name of an entry.

INPUT:
  ld - LDAP Session Handle
  dn - String
  newrdn - String
  deleteoldrdn - Integer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_modrdn2_s($ld,$dn,$newrdn,$deleteoldrdn);
ldap_msgfree(lm)
DESCRIPTION:

Free memory allocated by a LDAP Message

INPUT:
  lm - LDAP Message Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_msgfree($lm);
ldap_msgid(lm)
DESCRIPTION:

Get the message id number from a LDAP message

INPUT:
  lm - LDAP Message Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_msgid($lm);
ldap_msgtype(lm)
DESCRIPTION:

Get the message type of a LDAP message

INPUT:
  lm - LDAP Message Pointer

OUTPUT:
  status - Integer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_msgtype($lm);
ldap_multisort_entries(ld,chain,attr)
DESCRIPTION:

Sort entries by multiple keys

INPUT:
  ld - LDAP Session Handle
  chain - LDAP Message Pointer
  attr - List Reference

OUTPUT:
  status - Integer
  chain - LDAP Message Pointer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_multisort_entries($ld,$chain,$attr);
ldap_next_attribute(ld,entry,ber)
DESCRIPTION:

Get the next attribute for a LDAP entry

INPUT:
  ld - LDAP Session Handle
  entry - LDAP Message Pointer
  ber - Ber Element Pointer

OUTPUT:
  status - String
  ber - BER Element Pointer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_next_attribute($ld,$entry,$ber);
ldap_next_entry(ld,entry)
DESCRIPTION:

Get the next entry in the result chain

INPUT:
  ld - LDAP Session Handle
  entry - LDAP Message Pointer

OUTPUT:
  status - LDAP Message Pointer

AVAILABILITY: V2/V3

EXAMPLE:

  $status = ldap_next_entry($ld,$entry);
ldap_next_message(ld,msg)
DESCRIPTION:

Get the next message in the result chain

INPUT:
  ld - LDAP Session Handle
  msg - LDAP Message Pointer

OUTPUT:
  status - LDAP Message Pointer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_next_message($ld,$msg);
ldap_next_reference(ld,ref)
DESCRIPTION:

Get the next reference in the result chain

INPUT:
  ld - LDAP Session Handle
  ref - LDAP Message Pointer

OUTPUT:
  status - LDAP Message Pointer

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_next_reference($ld,$ref);
ldap_parse_entrychange_control(ld,ctrls,chgtypep,prevdnp,chgnumpresentp,chgnump)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_parse_entrychange_control($ld,$ctrls,$chgtypep,$prevdnp,$chgnumpresentp,$chgnump);
ldap_parse_extended_result(ld,res,retoidp,retdatap,freeit)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_parse_extended_result($ld,$res,$retoidp,$retdatap,$freeit);
ldap_parse_reference(ld,ref,referalsp,serverctrlsp,freeit)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_parse_reference($ld,$ref,$referalsp,$serverctrlsp,$freeit);
ldap_parse_result(ld,res,errcodep,matcheddnp,errmsgp,referralsp,serverctrlsp,freeit)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_parse_result($ld,$res,$errcodep,$matcheddnp,$errmsgp,$referralsp,$serverctrlsp,$freeit);
ldap_parse_sasl_bind_result(ld,res,servercredp,freeit)
DESCRIPTION:

Parse the results of an SASL bind operation

INPUT:
  ld - LDAP Session Handle
  res - LDAP Message Pointer
  freeit - Integer

OUTPUT:
  status - Integer
  servercredp -

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_parse_sasl_bind_result($ld,$res,$servercredp,$freeit);
ldap_parse_sort_control(ld,ctrls,result,attribute)
DESCRIPTION:

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

AVAILABILITY: V3

EXAMPLE:

  $status = ldap_parse_sort_control($ld,$ctrls,$result,$attribute);
ldap_parse_virtuallist_control(ld,ctrls,target_posp,list_sizep,errcodep)
DESCRIPTION:

Parse a LDAP virtual list control

INPUT:
  ld - LDAP Session Handle
&n