1API(3)                User Contributed Perl Documentation               API(3)
2
3
4

NAME

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

SYNOPSIS

9         use Mozilla::LDAP::API;
10              or
11         use Mozilla::LDAP::API qw(:api :ssl :constant);
12              or
13         use Mozilla::LDAP::API qw(:api :ssl :apiv3 :constant);
14              or
15         use Mozilla::LDAP::API qw(:api :ssl :apiv3 :nspr :constant);
16

DESCRIPTION

18       This package offers a direct interface to the LDAP C API calls from
19       Perl.  It is used internally by the other Mozilla::LDAP modules.  It is
20       highly suggested that you use the object oriented interface in
21       Mozilla::LDAP::Conn and Mozilla::LDAP::Entry unless you need to use
22       asynchronous calls or other functionality not available in the OO
23       interface.
24

THIS DOCUMENT

26       This document has a number of known errors that will be corrected in
27       the next revision.  Since it is not expected that users will need to
28       use this interface frequently, priority was placed on other documents.
29       You can find examples of how to actually use the API calls under the
30       test_api directory.
31

CREATING AN ADD/MODIFY HASH

33       For the add and modify routines you will need to generate a list of
34       attributes and values.
35
36       You will do this by creating a HASH table.  Each attribute in the hash
37       contains associated values.  These values can be one of three things.
38
39         - SCALAR VALUE    (ex. "Clayton Donley")
40         - ARRAY REFERENCE (ex. ["Clayton Donley","Clay Donley"])
41         - HASH REFERENCE  (ex. {"r",["Clayton Donley"]}
42              note:  the value inside the HASH REFERENCE must currently
43                      be an ARRAY REFERENCE.
44
45       The key inside the HASH REFERENCE must be one of the following for a
46       modify operation:
47         - "a" for LDAP_MOD_ADD (Add these values to the attribute)
48         - "r" for LDAP_MOD_REPLACE (Replace these values in the attribute)
49         - "d" for LDAP_MOD_DELETE (Delete these values from the attribute)
50
51       Additionally, in add and modify operations, you may specify "b" if the
52       attributes you are adding are BINARY (ex. "rb" to replace binary).
53
54       Currently, it is only possible to do one operation per add/modify oper‐
55       ation, meaning you can't do something like:
56
57          {"d",["Clayton"],"a",["Clay"]}   <-- WRONG!
58
59       Using any combination of the above value types, you can do things like:
60
61       %ldap_modifications = (
62          "cn", "Clayton Donley",                    # Replace 'cn' values
63          "givenname", ["Clayton","Clay"],           # Replace 'givenname'
64       values
65          "mail", {"a",["donley\@cig.mcel.mot.com"],  #Add 'mail' values
66          "jpegphoto", {"rb",[$jpegphotodata]},      # Replace Binary jpeg‐
67       Photo );
68
69       Then remember to call the add or modify operations with a REFERENCE to
70       this HASH.
71

API Methods

73       The following are the available API methods for Mozilla::LDAP::API.
74       Many of these items have bad examples and OUTPUT information.  Other
75       information should be correct.
76

ldap_abandon(ld,msgid)

78DESCRIPTION:
79
80Abandon an asynchronous LDAP operation
81
82INPUT:
83  ld - LDAP Session Handle
84  msgid - Integer
85
86OUTPUT:
87  status - Integer
88
89AVAILABILITY: V2/V3
90
91EXAMPLE:
92
93  $status = ldap_abandon($ld,$msgid);
94

ldap_abandon_ext(ld,msgid,serverctrls,clientctrls)

96DESCRIPTION:
97
98Abandon an asynchronous LDAP operation w/ Controls
99
100INPUT:
101  ld - LDAP Session Handle
102  msgid - Integer
103  serverctrls - LDAP Control List Pointer
104  clientctrls - LDAP Control List Pointer
105
106OUTPUT:
107  status - Integer
108
109AVAILABILITY: V3
110
111EXAMPLE:
112
113  $status = ldap_abandon_ext($ld,$msgid,$serverctrls,$clientctrls);
114

ldap_add(ld,dn,attrs)

116DESCRIPTION:
117
118Asynchronously add a LDAP entry
119
120INPUT:
121  ld - LDAP Session Handle
122  dn - String
123  attrs - LDAP Add/Modify Hash
124
125OUTPUT:
126  status - Integer
127
128AVAILABILITY: V2/V3
129
130EXAMPLE:
131
132  $status = ldap_add($ld,$dn,$attrs);
133

ldap_add_ext(ld,dn,attrs,serverctrls,clientctrls,msgidp)

135DESCRIPTION:
136
137Asynchronously add a LDAP entry w/ Controls
138
139INPUT:
140  ld - LDAP Session Handle
141  dn - String
142  attrs - LDAP Add/Modify Hash
143  serverctrls - LDAP Control List Pointer
144  clientctrls - LDAP Control List Pointer
145  msgidp - Integer
146
147OUTPUT:
148  status - Integer
149  msgidp - Integer
150
151AVAILABILITY: V3
152
153EXAMPLE:
154
155  $status = ldap_add_ext($ld,$dn,$attrs,$serverctrls,$clientctrls,$msgidp);
156

ldap_add_ext_s(ld,dn,attrs,serverctrls,clientctrls)

158DESCRIPTION:
159
160Synchronously add a LDAP entry w/ Controls
161
162INPUT:
163  ld - LDAP Session Handle
164  dn - String
165  attrs - LDAP Add/Modify Hash
166  serverctrls - LDAP Control List Pointer
167  clientctrls - LDAP Control List Pointer
168
169OUTPUT:
170  status - Integer
171
172AVAILABILITY: V3
173
174EXAMPLE:
175
176  $status = ldap_add_ext_s($ld,$dn,$attrs,$serverctrls,$clientctrls);
177

ldap_add_s(ld,dn,attrs)

179DESCRIPTION:
180
181Synchronously add a LDAP entry
182
183INPUT:
184  ld - LDAP Session Handle
185  dn - String
186  attrs - LDAP Add/Modify Hash
187
188OUTPUT:
189  status - Integer
190
191AVAILABILITY: V2/V3
192
193EXAMPLE:
194
195  $status = ldap_add_s($ld,$dn,$attrs);
196

ldap_ber_free(ber,freebuf)

198DESCRIPTION:
199
200Free a BER element pointer
201
202INPUT:
203  ber - BER Element Pointer
204  freebuf - Integer
205
206OUTPUT:
207  status - NONE
208
209AVAILABILITY: V2/V3
210
211EXAMPLE:
212
213  $status = ldap_ber_free($ber,$freebuf);
214

ldap_bind(ld,dn,passwd,authmethod)

216DESCRIPTION:
217
218Asynchronously bind to the LDAP server
219
220INPUT:
221  ld - LDAP Session Handle
222  dn - String
223  passwd - String
224  authmethod - Integer
225
226OUTPUT:
227  status - Integer
228
229AVAILABILITY: V2/V3
230
231EXAMPLE:
232
233  $status = ldap_bind($ld,$dn,$passwd,$authmethod);
234

ldap_bind_s(ld,dn,passwd,authmethod)

236DESCRIPTION:
237
238Synchronously bind to a LDAP server
239
240INPUT:
241  ld - LDAP Session Handle
242  dn - String
243  passwd - String
244  authmethod - Integer
245
246OUTPUT:
247  status - Integer
248
249AVAILABILITY: V2/V3
250
251EXAMPLE:
252
253  $status = ldap_bind_s($ld,$dn,$passwd,$authmethod);
254

ldap_compare(ld,dn,attr,value)

256DESCRIPTION:
257
258Asynchronously compare an attribute/value pair and an entry
259
260INPUT:
261  ld - LDAP Session Handle
262  dn - String
263  attr - String
264  value - String
265
266OUTPUT:
267  status - Integer
268
269AVAILABILITY: V2/V3
270
271EXAMPLE:
272
273  $status = ldap_compare($ld,$dn,$attr,$value);
274

ldap_compare_ext(ld,dn,attr,bvalue,serverctrls,clientctrls,msgidp)

276DESCRIPTION:
277
278Asynchronously compare an attribute/value pair and an entry w/ Controls
279
280INPUT:
281  ld - LDAP Session Handle
282  dn - String
283  attr - String
284  bvalue - Binary String
285  serverctrls - LDAP Control List Pointer
286  clientctrls - LDAP Control List Pointer
287  msgidp - Integer
288
289OUTPUT:
290  status - Integer
291  msgidp - Integer
292
293AVAILABILITY: V3
294
295EXAMPLE:
296
297  $status = ldap_compare_ext($ld,$dn,$attr,$bvalue,$serverctrls,$clientctrls,$msgidp);
298

ldap_compare_ext_s(ld,dn,attr,bvalue,serverctrls,clientctrls)

300DESCRIPTION:
301
302Synchronously compare an attribute/value pair to an entry w/ Controls
303
304INPUT:
305  ld - LDAP Session Handle
306  dn - String
307  attr - String
308  bvalue - Binary String
309  serverctrls - LDAP Control List Pointer
310  clientctrls - LDAP Control List Pointer
311
312OUTPUT:
313  status - Integer
314
315AVAILABILITY: V3
316
317EXAMPLE:
318
319  $status = ldap_compare_ext_s($ld,$dn,$attr,$bvalue,$serverctrls,$clientctrls);
320

ldap_compare_s(ld,dn,attr,value)

322DESCRIPTION:
323
324Synchronously compare an attribute/value pair to an entry
325
326INPUT:
327  ld - LDAP Session Handle
328  dn - String
329  attr - String
330  value - String
331
332OUTPUT:
333  status - Integer
334
335AVAILABILITY: V2/V3
336
337EXAMPLE:
338
339  $status = ldap_compare_s($ld,$dn,$attr,$value);
340

ldap_control_free(ctrl)

342DESCRIPTION:
343
344Free a LDAP control pointer
345
346INPUT:
347  ctrl - LDAP Control Pointer
348
349OUTPUT:
350  status - NONE
351
352AVAILABILITY: V3
353
354EXAMPLE:
355
356  $status = ldap_control_free($ctrl);
357

ldap_controls_count(ctrls)

359DESCRIPTION:
360
361Count the number of LDAP controls in a LDAP Control List
362
363INPUT:
364  ctrls - LDAP Control List Pointer
365
366OUTPUT:
367  status - Integer
368
369AVAILABILITY: V3
370
371EXAMPLE:
372
373  $status = ldap_controls_count($ctrls);
374

ldap_controls_free(ctrls)

376DESCRIPTION:
377
378Free a list of LDAP controls
379
380INPUT:
381  ctrls - LDAP Control List Pointer
382
383OUTPUT:
384  status - NONE
385
386AVAILABILITY: V3
387
388EXAMPLE:
389
390  $status = ldap_controls_free($ctrls);
391

ldap_count_entries(ld,result)

393DESCRIPTION:
394
395Count the number of LDAP entries returned
396
397INPUT:
398  ld - LDAP Session Handle
399  result - LDAP Message Pointer
400
401OUTPUT:
402  status - Integer
403
404AVAILABILITY: V2/V3
405
406EXAMPLE:
407
408  $count = ldap_count_entries($ld,$result);
409

ldap_count_messages(ld,result)

411DESCRIPTION:
412
413Count the number of LDAP messages returned
414
415INPUT:
416  ld - LDAP Session Handle
417  result - LDAP Message Pointer
418
419OUTPUT:
420  status - Integer
421
422AVAILABILITY: V3
423
424EXAMPLE:
425
426  $status = ldap_count_messages($ld,$result);
427

ldap_count_references(ld,result)

429DESCRIPTION:
430
431Count the number of LDAP references returned
432
433INPUT:
434  ld - LDAP Session Handle
435  result - LDAP Message Pointer
436
437OUTPUT:
438  status - Integer
439
440AVAILABILITY: V3
441
442EXAMPLE:
443
444  $status = ldap_count_references($ld,$result);
445

ldap_create_filter(buf,buflen,pattern,prefix,suffix,attr,value,valwords)

447DESCRIPTION:
448
449Create a LDAP search filter
450
451INPUT:
452  buf - String
453  buflen - Integer
454  pattern - String
455  prefix - String
456  suffix - String
457  attr - String
458  value - String
459  valwords - List Reference
460
461OUTPUT:
462  status - Integer
463
464AVAILABILITY: V2/V3
465
466EXAMPLE:
467
468  $status = ldap_create_filter($buf,$buflen,$pattern,$prefix,$suffix,$attr,$value,$valwords);
469

ldap_create_persistentsearch_con‐

trol(ld,changetypes,changesonly,return_echg_ctrls,ctrl_iscritical,ctrlp)

472DESCRIPTION:
473
474Create a persistent search control
475
476INPUT:
477  ld - LDAP Session Handle
478  changetypes - Integer
479  changesonly - Integer
480  return_echg_ctrls - Integer
481  ctrl_iscritical - Integer
482  ctrlp - LDAP Control List Pointer
483
484OUTPUT:
485  status - Integer
486  ctrlp - LDAP Control List Pointer
487
488AVAILABILITY: V3
489
490EXAMPLE:
491
492  $status = ldap_create_persistentsearch_control($ld,$changetypes,$changesonly,$return_echg_ctrls,$ctrl_iscritical,$ctrlp);
493

ldap_create_sort_control(ld,sortKeyList,ctrl_iscritical,ctrlp)

495DESCRIPTION:
496
497Create a LDAP sort control
498
499INPUT:
500  ld - LDAP Session Handle
501  sortKeyList - Sort Key Pointer
502  ctrl_iscritical - Integer
503  ctrlp - LDAP Control List Pointer
504
505OUTPUT:
506  status - Integer
507  ctrlp - LDAP Control List Pointer
508
509AVAILABILITY: V3
510
511EXAMPLE:
512
513  $status = ldap_create_sort_control($ld,$sortKeyList,$ctrl_iscritical,$ctrlp);
514

ldap_create_sort_keylist(sortKeyList,string_rep)

516DESCRIPTION:
517
518Create a list of keys to be used by a sort control
519
520INPUT:
521  sortKeyList - Sort Key Pointer
522  string_rep - String
523
524OUTPUT:
525  status - Integer
526  sortKeyList - Sort Key Pointer
527
528AVAILABILITY: V3
529
530EXAMPLE:
531
532  $status = ldap_create_sort_keylist($sortKeyList,$string_rep);
533

ldap_create_virtuallist_control(ld,ldvlistp,ctrlp)

535DESCRIPTION:
536
537Create a LDAP virtual list control
538
539INPUT:
540  ld - LDAP Session Handle
541  ctrlp - LDAP Control List Pointer
542
543OUTPUT:
544  status - Integer
545  ctrlp - LDAP Control List Pointer
546
547AVAILABILITY: V3
548
549EXAMPLE:
550
551  $status = ldap_create_virtuallist_control($ld,$ldvlistp,$ctrlp);
552

ldap_delete(ld,dn)

554DESCRIPTION:
555
556Asynchronously delete a LDAP entry
557
558INPUT:
559  ld - LDAP Session Handle
560  dn - String
561
562OUTPUT:
563  status - Integer
564
565AVAILABILITY: V2/V3
566
567EXAMPLE:
568
569  $status = ldap_delete($ld,$dn);
570

ldap_delete_ext(ld,dn,serverctrls,clientctrls,msgidp)

572DESCRIPTION:
573
574Asynchronously delete a LDAP entry w/ Controls
575
576INPUT:
577  ld - LDAP Session Handle
578  dn - String
579  serverctrls - LDAP Control List Pointer
580  clientctrls - LDAP Control List Pointer
581  msgidp - Integer
582
583OUTPUT:
584  status - Integer
585  msgidp - Integer
586
587AVAILABILITY: V3
588
589EXAMPLE:
590
591  $status = ldap_delete_ext($ld,$dn,$serverctrls,$clientctrls,$msgidp);
592

ldap_delete_ext_s(ld,dn,serverctrls,clientctrls)

594DESCRIPTION:
595
596Synchronously delete a LDAP entry w/ Controls
597
598INPUT:
599  ld - LDAP Session Handle
600  dn - String
601  serverctrls - LDAP Control List Pointer
602  clientctrls - LDAP Control List Pointer
603
604OUTPUT:
605  status - Integer
606
607AVAILABILITY: V3
608
609EXAMPLE:
610
611  $status = ldap_delete_ext_s($ld,$dn,$serverctrls,$clientctrls);
612

ldap_delete_s(ld,dn)

614DESCRIPTION:
615
616Synchronously delete a LDAP entry
617
618INPUT:
619  ld - LDAP Session Handle
620  dn - String
621
622OUTPUT:
623  status - Integer
624
625AVAILABILITY: V2/V3
626
627EXAMPLE:
628
629  $status = ldap_delete_s($ld,$dn);
630

ldap_dn2ufn(dn)

632DESCRIPTION:
633
634Change a DN to a "Friendly" name
635
636INPUT:
637  dn - String
638
639OUTPUT:
640  status - String
641
642AVAILABILITY: V2/V3
643
644EXAMPLE:
645
646  $status = ldap_dn2ufn($dn);
647

ldap_err2string(err)

649DESCRIPTION:
650
651Return the string value of a LDAP error code
652
653INPUT:
654  err - Integer
655
656OUTPUT:
657  status - String
658
659AVAILABILITY: V2/V3
660
661EXAMPLE:
662
663  $status = ldap_err2string($err);
664

ldap_explode_dn(dn,notypes)

666DESCRIPTION:
667
668Split a given DN into its components.  Setting 'notypes' to 1 returns the com‐
669ponents without their type names.
670
671INPUT:
672  dn - String
673  notypes - Integer
674
675OUTPUT:
676  status - NONE
677
678AVAILABILITY: V2/V3
679
680EXAMPLE:
681
682  $status = ldap_explode_dn($dn,$notypes);
683

ldap_explode_rdn(dn,notypes)

685DESCRIPTION:
686
687Split a Relative DN into its components
688
689INPUT:
690  dn - String
691  notypes - Integer
692
693OUTPUT:
694  status - NONE
695
696AVAILABILITY: V2/V3
697
698EXAMPLE:
699
700  $status = ldap_explode_rdn($dn,$notypes);
701

ldap_extended_operation(ld,requestoid,requestdata,serverctrls,clientc‐

703trls,msgidp)
704DESCRIPTION:
705
706Perform an asynchronous extended operation
707
708INPUT:
709  ld - LDAP Session Handle
710  requestoid - String
711  requestdata - Binary String
712  serverctrls - LDAP Control List Pointer
713  clientctrls - LDAP Control List Pointer
714  msgidp - Integer
715
716OUTPUT:
717  status - Integer
718  msgidp - Integer
719
720AVAILABILITY: V3
721
722EXAMPLE:
723
724  $status = ldap_extended_operation($ld,$requestoid,$requestdata,$serverctrls,$clientctrls,$msgidp);
725

ldap_extended_operation_s(ld,requestoid,requestdata,serverctrls,clientc‐

727trls,retoidp,retdatap)
728DESCRIPTION:
729
730Perform a synchronous extended operation
731
732INPUT:
733  ld - LDAP Session Handle
734  requestoid - String
735  requestdata - Binary String
736  serverctrls - LDAP Control List Pointer
737  clientctrls - LDAP Control List Pointer
738  retoidp - String
739
740OUTPUT:
741  status - Integer
742  retoidp - Return OID
743  retdatap - Return Data
744
745AVAILABILITY: V3
746
747EXAMPLE:
748
749  $status = ldap_extended_operation_s($ld,$requestoid,$requestdata,$serverctrls,$clientctrls,$retoidp,$retdatap);
750

ldap_first_attribute(ld,entry,ber)

752DESCRIPTION:
753
754Return the first attribute returned for a LDAP entry
755
756INPUT:
757  ld - LDAP Session Handle
758  entry - LDAP Message Pointer
759  ber - Ber Element Pointer
760
761OUTPUT:
762  status - String
763  ber - Ber Element Pointer
764
765AVAILABILITY: V2/V3
766
767EXAMPLE:
768
769  $status = ldap_first_attribute($ld,$entry,$ber);
770

ldap_first_entry(ld,chain)

772DESCRIPTION:
773
774Return the first entry in a LDAP result chain
775
776INPUT:
777  ld - LDAP Session Handle
778  chain - LDAP Message Pointer
779
780OUTPUT:
781  status - LDAP Message Pointer
782
783AVAILABILITY: V2/V3
784
785EXAMPLE:
786
787  $status = ldap_first_entry($ld,$chain);
788

ldap_first_message(ld,res)

790DESCRIPTION:
791
792Return the first message in a LDAP result
793
794INPUT:
795  ld - LDAP Session Handle
796  res - LDAP Message Pointer
797
798OUTPUT:
799  status - LDAP Message Pointer
800
801AVAILABILITY: V3
802
803EXAMPLE:
804
805  $status = ldap_first_message($ld,$res);
806

ldap_first_reference(ld,res)

808DESCRIPTION:
809
810Return the first reference in a LDAP result
811
812INPUT:
813  ld - LDAP Session Handle
814  res - LDAP Message Pointer
815
816OUTPUT:
817  status - LDAP Message Pointer
818
819AVAILABILITY: V3
820
821EXAMPLE:
822
823  $status = ldap_first_reference($ld,$res);
824

ldap_free_friendlymap(map)

826DESCRIPTION:
827
828Free a LDAP friendly map pointer
829
830INPUT:
831  map - Friendly Map Pointer
832
833OUTPUT:
834  status - NONE
835
836AVAILABILITY: V2/V3
837
838EXAMPLE:
839
840  $status = ldap_free_friendlymap($map);
841

ldap_free_sort_keylist(sortKeyList)

843DESCRIPTION:
844
845Free a LDAP sort key pointer
846
847INPUT:
848  sortKeyList - Sort Key Pointer
849
850OUTPUT:
851  status - NONE
852
853AVAILABILITY: V3
854
855EXAMPLE:
856
857  $status = ldap_free_sort_keylist($sortKeyList);
858

ldap_free_urldesc(ludp)

860DESCRIPTION:
861
862Free a LDAP URL description hash reference
863
864INPUT:
865  ludp - URL Description Hash Reference
866
867OUTPUT:
868  status - NONE
869
870AVAILABILITY: V3
871
872EXAMPLE:
873
874  $status = ldap_free_urldesc($ludp);
875

ldap_friendly_name(filename,name,map)

877DESCRIPTION:
878
879Create a LDAP friendly name map
880
881INPUT:
882  filename - String
883  name - String
884  map - Friendly Map Pointer
885
886OUTPUT:
887  status - String
888
889AVAILABILITY: V3
890
891EXAMPLE:
892
893  $status = ldap_friendly_name($filename,$name,$map);
894

ldap_get_dn(ld,entry)

896DESCRIPTION:
897
898Return the distinguished name for an entry
899
900INPUT:
901  ld - LDAP Session Handle
902  entry - LDAP Message Pointer
903
904OUTPUT:
905  status - String
906
907AVAILABILITY: V2/V3
908
909EXAMPLE:
910
911  $status = ldap_get_dn($ld,$entry);
912

ldap_get_entry_controls(ld,entry,serverctrlsp)

914DESCRIPTION:
915
916Return the controls for a LDAP entry
917
918INPUT:
919  ld - LDAP Session Handle
920  entry - LDAP Message Pointer
921  serverctrlsp - LDAP Control List Pointer
922
923OUTPUT:
924  status - Integer
925  serverctrlsp - LDAP Control List Pointer
926
927AVAILABILITY: V3
928
929EXAMPLE:
930
931  $status = ldap_get_entry_controls($ld,$entry,$serverctrlsp);
932

ldap_getfilter_free(lfdp)

934DESCRIPTION:
935
936Free a LDAP filter
937
938INPUT:
939  lfdp - LDAP Filter Description Pointer
940
941OUTPUT:
942  status - NONE
943
944AVAILABILITY: V3
945
946EXAMPLE:
947
948  $status = ldap_getfilter_free($lfdp);
949

ldap_getfirstfilter(lfdp,tagpat,value)

951DESCRIPTION:
952
953Get the first generated filter
954
955INPUT:
956  lfdp - LDAP Filter Description Pointer
957  tagpat - String
958
959OUTPUT:
960  status - LDAP Filter Information Pointer
961
962AVAILABILITY: V2/V3
963
964EXAMPLE:
965
966  $status = ldap_getfirstfilter($lfdp,$tagpat,$value);
967

ldap_get_lang_values(ld,entry,target,type)

969DESCRIPTION:
970
971Get values for an entry
972
973INPUT:
974  ld - LDAP Session Handle
975  entry - LDAP Message Pointer
976  target - String
977  type - String
978
979OUTPUT:
980  status - NONE
981
982AVAILABILITY: V3
983
984EXAMPLE:
985
986  $status = ldap_get_lang_values($ld,$entry,$target,$type);
987

ldap_get_lang_values_len(ld,entry,target,type)

989DESCRIPTION:
990
991Get binary values for an entry
992
993INPUT:
994  ld - LDAP Session Handle
995  entry - LDAP Message Pointer
996  target - String
997  type - String
998
999OUTPUT:
1000  status - NONE
1001
1002AVAILABILITY: V3
1003
1004EXAMPLE:
1005
1006  $status = ldap_get_lang_values_len($ld,$entry,$target,$type);
1007

ldap_get_lderrno(ld,m,s)

1009DESCRIPTION:
1010
1011INPUT:
1012  ld - LDAP Session Handle
1013  m  - String Reference (or undef)
1014  s  - String Reference (or undef)
1015
1016OUTPUT:
1017  status - Integer
1018
1019AVAILABILITY: V2/V3
1020
1021EXAMPLE:
1022
1023  $status = ldap_get_lderrno($ld,\$m,\$s);
1024

ldap_getnextfilter(lfdp)

1026DESCRIPTION:
1027
1028Get the next generated LDAP filter
1029
1030INPUT:
1031  lfdp - LDAP Filter Information Pointer
1032
1033OUTPUT:
1034  status - LDAP Filter Information Pointer
1035
1036AVAILABILITY: V2/V3
1037
1038EXAMPLE:
1039
1040  $status = ldap_getnextfilter($lfdp);
1041

ldap_get_option(ld,option,optdata)

1043DESCRIPTION:
1044
1045Get an option for a LDAP session
1046
1047INPUT:
1048  ld - LDAP Session Handle
1049  option - Integer
1050  optdata - Integer
1051
1052OUTPUT:
1053  status - Integer
1054  optdata - Integer
1055
1056AVAILABILITY: V2/V3
1057
1058EXAMPLE:
1059
1060  $status = ldap_get_option($ld,$option,$optdata);
1061

ldap_get_values(ld,entry,target)

1063DESCRIPTION:
1064
1065Get the values for a LDAP entry and attribute
1066
1067INPUT:
1068  ld - LDAP Session Handle
1069  entry - LDAP Message Pointer
1070  target - String
1071
1072OUTPUT:
1073  status - NONE
1074
1075AVAILABILITY: V3
1076
1077EXAMPLE:
1078
1079  $status = ldap_get_values($ld,$entry,$target);
1080

ldap_get_values_len(ld,entry,target)

1082DESCRIPTION:
1083
1084Get the binary values for a LDAP entry and attribute
1085
1086INPUT:
1087  ld - LDAP Session Handle
1088  entry - LDAP Message Pointer
1089  target - String
1090
1091OUTPUT:
1092  status - NONE
1093
1094AVAILABILITY: V3
1095
1096EXAMPLE:
1097
1098  $status = ldap_get_values_len($ld,$entry,$target);
1099

ldap_init(host,port)

1101DESCRIPTION:
1102
1103Initialize a LDAP session
1104
1105INPUT:
1106  host - String
1107  port - Integer
1108
1109OUTPUT:
1110  status - LDAP Session Handle
1111
1112AVAILABILITY: V2/V3
1113
1114EXAMPLE:
1115
1116  $status = ldap_init($host,$port);
1117

ldap_init_getfilter(fname)

1119DESCRIPTION:
1120
1121Initialize the LDAP filter generation routines to a filename
1122
1123INPUT:
1124  fname - Filename String
1125
1126OUTPUT:
1127  status - LDAP Filter Description Pointer
1128
1129AVAILABILITY: V2/V3
1130
1131EXAMPLE:
1132
1133  $status = ldap_init_getfilter($fname);
1134

ldap_init_getfilter_buf(buf,buflen)

1136DESCRIPTION:
1137
1138Initialize the LDAP filter generation routines to a buffer
1139
1140INPUT:
1141  buf - String
1142  buflen - Integer
1143
1144OUTPUT:
1145  status - LDAP Filter Description Pointer
1146
1147AVAILABILITY: V2/V3
1148
1149EXAMPLE:
1150
1151  $status = ldap_init_getfilter_buf($buf,$buflen);
1152

ldap_is_ldap_url(url)

1154DESCRIPTION:
1155
1156Return 1 if an the argument is a valid LDAP URL
1157
1158INPUT:
1159  url - String
1160
1161OUTPUT:
1162  status - Integer
1163
1164AVAILABILITY: V2/V3
1165
1166EXAMPLE:
1167
1168  $status = ldap_is_ldap_url($url);
1169

ldap_memcache_destroy(cache)

1171DESCRIPTION:
1172
1173Destroy a memory cache
1174
1175INPUT:
1176  cache - LDAP Memory Cache Pointer
1177
1178OUTPUT:
1179  status - NONE
1180
1181AVAILABILITY: V3
1182
1183EXAMPLE:
1184
1185  $status = ldap_memcache_destroy($cache);
1186

ldap_memcache_flush(cache,dn,scope)

1188DESCRIPTION:
1189
1190Flush a specific DN from the memory cache
1191
1192INPUT:
1193  cache - LDAP Memory Cache Pointer
1194  dn - String
1195  scope - Integer
1196
1197OUTPUT:
1198  status - NONE
1199
1200AVAILABILITY: V3
1201
1202EXAMPLE:
1203
1204  $status = ldap_memcache_flush($cache,$dn,$scope);
1205

ldap_memcache_get(ld,cachep)

1207DESCRIPTION:
1208
1209Get the memory cache for a LDAP session
1210
1211INPUT:
1212  ld - LDAP Session Handle
1213  cachep - LDAP Memory Cache Pointer
1214
1215OUTPUT:
1216  status - Integer
1217  cachep - LDAP Memory Cache Pointer
1218
1219AVAILABILITY: V3
1220
1221EXAMPLE:
1222
1223  $status = ldap_memcache_get($ld,$cachep);
1224

ldap_memcache_init(ttl,size,baseDNs,cachep)

1226DESCRIPTION:
1227
1228Initialize a LDAP memory cache
1229
1230INPUT:
1231  ttl - Integer
1232  size - Integer
1233  baseDNs - List Reference
1234  cachep - LDAP Memory Cache Pointer
1235
1236OUTPUT:
1237  status - Integer
1238  cachep - LDAP Memory Cache Pointer
1239
1240AVAILABILITY: V3
1241
1242EXAMPLE:
1243
1244  $status = ldap_memcache_init($ttl,$size,$baseDNs,$cachep);
1245

ldap_memcache_set(ld,cache)

1247DESCRIPTION:
1248
1249Set the LDAP memory cache for the session
1250
1251INPUT:
1252  ld - LDAP Session Handle
1253  cache - LDAP Memory Cache Pointer
1254
1255OUTPUT:
1256  status - Integer
1257
1258AVAILABILITY: V2/V3
1259
1260EXAMPLE:
1261
1262  $status = ldap_memcache_set($ld,$cache);
1263

ldap_memcache_update(cache)

1265DESCRIPTION:
1266
1267Update the specified memory cache
1268
1269INPUT:
1270  cache - LDAP Memory Cache Pointer
1271
1272OUTPUT:
1273  status - NONE
1274
1275AVAILABILITY: V3
1276
1277EXAMPLE:
1278
1279  $status = ldap_memcache_update($cache);
1280

ldap_memfree(p)

1282DESCRIPTION:
1283
1284Free memory allocated by the LDAP C API
1285
1286INPUT:
1287  p - Pointer
1288
1289OUTPUT:
1290  status - NONE
1291
1292AVAILABILITY: V2/V3
1293
1294EXAMPLE:
1295
1296  $status = ldap_memfree($p);
1297

ldap_modify(ld,dn,mods)

1299DESCRIPTION:
1300
1301Asynchronously modify a LDAP entry
1302
1303INPUT:
1304  ld - LDAP Session Handle
1305  dn - String
1306  mods - LDAP Add/Modify Hash
1307
1308OUTPUT:
1309  status - Integer
1310
1311AVAILABILITY: V2/V3
1312
1313EXAMPLE:
1314
1315  $status = ldap_modify($ld,$dn,$mods);
1316

ldap_modify_ext(ld,dn,mods,serverctrls,clientctrls,msgidp)

1318DESCRIPTION:
1319
1320Asynchronously modify a LDAP entry w/ Controls
1321
1322INPUT:
1323  ld - LDAP Session Handle
1324  dn - String
1325  mods - LDAP Add/Modify Hash
1326  serverctrls - LDAP Control List Pointer
1327  clientctrls - LDAP Control List Pointer
1328  msgidp - Integer
1329
1330OUTPUT:
1331  status - Integer
1332  msgidp - Integer
1333
1334AVAILABILITY: V3
1335
1336EXAMPLE:
1337
1338  $status = ldap_modify_ext($ld,$dn,$mods,$serverctrls,$clientctrls,$msgidp);
1339

ldap_modify_ext_s(ld,dn,mods,serverctrls,clientctrls)

1341DESCRIPTION:
1342
1343Synchronously modify a LDAP entry w/ Controls
1344
1345INPUT:
1346  ld - LDAP Session Handle
1347  dn - String
1348  mods - LDAP Add/Modify Hash
1349  serverctrls - LDAP Control List Pointer
1350  clientctrls - LDAP Control List Pointer
1351
1352OUTPUT:
1353  status - Integer
1354
1355AVAILABILITY: V3
1356
1357EXAMPLE:
1358
1359  $status = ldap_modify_ext_s($ld,$dn,$mods,$serverctrls,$clientctrls);
1360

ldap_modify_s(ld,dn,mods)

1362DESCRIPTION:
1363
1364Synchronously modify a LDAP entry
1365
1366INPUT:
1367  ld - LDAP Session Handle
1368  dn - String
1369  mods - LDAP Add/Modify Hash
1370
1371OUTPUT:
1372  status - Integer
1373
1374AVAILABILITY: V2/V3
1375
1376EXAMPLE:
1377
1378  $status = ldap_modify_s($ld,$dn,$mods);
1379

ldap_modrdn(ld,dn,newrdn)

1381DESCRIPTION:
1382
1383Asynchronously modify the relative distinguished name of an entry
1384
1385INPUT:
1386  ld - LDAP Session Handle
1387  dn - String
1388  newrdn - String
1389
1390OUTPUT:
1391  status - Integer
1392
1393AVAILABILITY: V2/V3
1394
1395EXAMPLE:
1396
1397  $status = ldap_modrdn($ld,$dn,$newrdn);
1398

ldap_modrdn_s(ld,dn,newrdn)

1400DESCRIPTION:
1401
1402Synchronously modify the relative distinguished name of an entry
1403
1404INPUT:
1405  ld - LDAP Session Handle
1406  dn - String
1407  newrdn - String
1408
1409OUTPUT:
1410  status - Integer
1411
1412AVAILABILITY: V2/V3
1413
1414EXAMPLE:
1415
1416  $status = ldap_modrdn_s($ld,$dn,$newrdn);
1417

ldap_modrdn2(ld,dn,newrdn,deleteoldrdn)

1419DESCRIPTION:
1420
1421Asynchronously modify the relative distinguished name of an entry.
1422
1423INPUT:
1424  ld - LDAP Session Handle
1425  dn - String
1426  newrdn - String
1427  deleteoldrdn - Integer
1428
1429OUTPUT:
1430  status - Integer
1431
1432AVAILABILITY: V2/V3
1433
1434EXAMPLE:
1435
1436  $status = ldap_modrdn2($ld,$dn,$newrdn,$deleteoldrdn);
1437

ldap_modrdn2_s(ld,dn,newrdn,deleteoldrdn)

1439DESCRIPTION:
1440
1441Synchronously modify the relative distinguished name of an entry.
1442
1443INPUT:
1444  ld - LDAP Session Handle
1445  dn - String
1446  newrdn - String
1447  deleteoldrdn - Integer
1448
1449OUTPUT:
1450  status - Integer
1451
1452AVAILABILITY: V2/V3
1453
1454EXAMPLE:
1455
1456  $status = ldap_modrdn2_s($ld,$dn,$newrdn,$deleteoldrdn);
1457

ldap_msgfree(lm)

1459DESCRIPTION:
1460
1461Free memory allocated by a LDAP Message
1462
1463INPUT:
1464  lm - LDAP Message Pointer
1465
1466OUTPUT:
1467  status - Integer
1468
1469AVAILABILITY: V2/V3
1470
1471EXAMPLE:
1472
1473  $status = ldap_msgfree($lm);
1474

ldap_msgid(lm)

1476DESCRIPTION:
1477
1478Get the message id number from a LDAP message
1479
1480INPUT:
1481  lm - LDAP Message Pointer
1482
1483OUTPUT:
1484  status - Integer
1485
1486AVAILABILITY: V2/V3
1487
1488EXAMPLE:
1489
1490  $status = ldap_msgid($lm);
1491

ldap_msgtype(lm)

1493DESCRIPTION:
1494
1495Get the message type of a LDAP message
1496
1497INPUT:
1498  lm - LDAP Message Pointer
1499
1500OUTPUT:
1501  status - Integer
1502
1503AVAILABILITY: V2/V3
1504
1505EXAMPLE:
1506
1507  $status = ldap_msgtype($lm);
1508

ldap_multisort_entries(ld,chain,attr)

1510DESCRIPTION:
1511
1512Sort entries by multiple keys
1513
1514INPUT:
1515  ld - LDAP Session Handle
1516  chain - LDAP Message Pointer
1517  attr - List Reference
1518
1519OUTPUT:
1520  status - Integer
1521  chain - LDAP Message Pointer
1522
1523AVAILABILITY: V2/V3
1524
1525EXAMPLE:
1526
1527  $status = ldap_multisort_entries($ld,$chain,$attr);
1528

ldap_next_attribute(ld,entry,ber)

1530DESCRIPTION:
1531
1532Get the next attribute for a LDAP entry
1533
1534INPUT:
1535  ld - LDAP Session Handle
1536  entry - LDAP Message Pointer
1537  ber - Ber Element Pointer
1538
1539OUTPUT:
1540  status - String
1541  ber - BER Element Pointer
1542
1543AVAILABILITY: V2/V3
1544
1545EXAMPLE:
1546
1547  $status = ldap_next_attribute($ld,$entry,$ber);
1548

ldap_next_entry(ld,entry)

1550DESCRIPTION:
1551
1552Get the next entry in the result chain
1553
1554INPUT:
1555  ld - LDAP Session Handle
1556  entry - LDAP Message Pointer
1557
1558OUTPUT:
1559  status - LDAP Message Pointer
1560
1561AVAILABILITY: V2/V3
1562
1563EXAMPLE:
1564
1565  $status = ldap_next_entry($ld,$entry);
1566

ldap_next_message(ld,msg)

1568DESCRIPTION:
1569
1570Get the next message in the result chain
1571
1572INPUT:
1573  ld - LDAP Session Handle
1574  msg - LDAP Message Pointer
1575
1576OUTPUT:
1577  status - LDAP Message Pointer
1578
1579AVAILABILITY: V3
1580
1581EXAMPLE:
1582
1583  $status = ldap_next_message($ld,$msg);
1584

ldap_next_reference(ld,ref)

1586DESCRIPTION:
1587
1588Get the next reference in the result chain
1589
1590INPUT:
1591  ld - LDAP Session Handle
1592  ref - LDAP Message Pointer
1593
1594OUTPUT:
1595  status - LDAP Message Pointer
1596
1597AVAILABILITY: V3
1598
1599EXAMPLE:
1600
1601  $status = ldap_next_reference($ld,$ref);
1602

ldap_parse_entrychange_control(ld,ctrls,chgtypep,prevdnp,chgnumpre‐

1604sentp,chgnump)
1605DESCRIPTION:
1606
1607Parse a LDAP entry change control
1608
1609INPUT:
1610  ld - LDAP Session Handle
1611  ctrls - LDAP Control List Pointer
1612  chgtypep - Integer
1613  prevdnp - String
1614  chgnumpresentp - Integer
1615  chgnump - Integer
1616
1617OUTPUT:
1618  status - Integer
1619  chgtypep - Integer
1620  prevdnp - String
1621  chgnumpresentp - Integer
1622  chgnump - Integer
1623
1624AVAILABILITY: V3
1625
1626EXAMPLE:
1627
1628  $status = ldap_parse_entrychange_control($ld,$ctrls,$chgtypep,$prevdnp,$chgnumpresentp,$chgnump);
1629

ldap_parse_extended_result(ld,res,retoidp,retdatap,freeit)

1631DESCRIPTION:
1632
1633Parse a LDAP extended result
1634
1635INPUT:
1636  ld - LDAP Session Handle
1637  res - LDAP Message Pointer
1638  retoidp - String
1639  freeit - Integer
1640
1641OUTPUT:
1642  status - Integer
1643  retoidp - String
1644  retdatap - Binary List Reference
1645
1646AVAILABILITY: V3
1647
1648EXAMPLE:
1649
1650  $status = ldap_parse_extended_result($ld,$res,$retoidp,$retdatap,$freeit);
1651

ldap_parse_reference(ld,ref,referalsp,serverctrlsp,freeit)

1653DESCRIPTION:
1654
1655Parse a LDAP Reference
1656
1657INPUT:
1658  ld - LDAP Session Handle
1659  ref - LDAP Message Pointer
1660  referalsp - List Reference
1661  serverctrlsp - LDAP Control List Pointer
1662  freeit - Integer
1663
1664OUTPUT:
1665  status - Integer
1666  referalsp - List Reference
1667  serverctrlsp - LDAP Control List Pointer
1668
1669AVAILABILITY: V3
1670
1671EXAMPLE:
1672
1673  $status = ldap_parse_reference($ld,$ref,$referalsp,$serverctrlsp,$freeit);
1674

ldap_parse_result(ld,res,errcodep,matcheddnp,errmsgp,referralsp,serverc‐

1676trlsp,freeit)
1677DESCRIPTION:
1678
1679Parse a LDAP result
1680
1681INPUT:
1682  ld - LDAP Session Handle
1683  res - LDAP Message Pointer
1684  errcodep - Integer
1685  matcheddnp - String
1686  errmsgp - String
1687  referralsp - List Reference
1688  serverctrlsp - LDAP Control List Pointer
1689  freeit - Integer
1690
1691OUTPUT:
1692  status - Integer
1693  errcodep - Integer
1694  matcheddnp - String
1695  errmsgp - String
1696  referralsp - List Reference
1697  serverctrlsp - LDAP Control List Pointer
1698
1699AVAILABILITY: V3
1700
1701EXAMPLE:
1702
1703  $status = ldap_parse_result($ld,$res,$errcodep,$matcheddnp,$errmsgp,$referralsp,$serverctrlsp,$freeit);
1704

ldap_parse_sasl_bind_result(ld,res,servercredp,freeit)

1706DESCRIPTION:
1707
1708Parse the results of an SASL bind operation
1709
1710INPUT:
1711  ld - LDAP Session Handle
1712  res - LDAP Message Pointer
1713  freeit - Integer
1714
1715OUTPUT:
1716  status - Integer
1717  servercredp -
1718
1719AVAILABILITY: V3
1720
1721EXAMPLE:
1722
1723  $status = ldap_parse_sasl_bind_result($ld,$res,$servercredp,$freeit);
1724

ldap_parse_sort_control(ld,ctrls,result,attribute)

1726DESCRIPTION:
1727
1728Parse a LDAP sort control
1729
1730INPUT:
1731  ld - LDAP Session Handle
1732  ctrls - LDAP Control List Pointer
1733  result - LDAP Message Pointer
1734  attribute - String
1735
1736OUTPUT:
1737  status - Integer
1738  result - LDAP Message Pointer
1739  attribute - String
1740
1741AVAILABILITY: V3
1742
1743EXAMPLE:
1744
1745  $status = ldap_parse_sort_control($ld,$ctrls,$result,$attribute);
1746

ldap_parse_virtuallist_control(ld,ctrls,target_posp,list_sizep,errcodep)

1748DESCRIPTION:
1749
1750Parse a LDAP virtual list control
1751
1752INPUT:
1753  ld - LDAP Session Handle
1754  ctrls - LDAP Control List Pointer
1755  target_posp - Integer
1756  list_sizep - Integer
1757  errcodep - Integer
1758
1759OUTPUT:
1760  status - Integer
1761  target_posp - Integer
1762  list_sizep - Integer
1763  errcodep - Integer
1764
1765AVAILABILITY: V3
1766
1767EXAMPLE:
1768
1769  $status = ldap_parse_virtuallist_control($ld,$ctrls,$target_posp,$list_sizep,$errcodep);
1770

ldap_perror(ld,s)

1772DESCRIPTION:
1773
1774Print a LDAP error message
1775
1776INPUT:
1777  ld - LDAP Session Handle
1778  s - String
1779
1780OUTPUT:
1781  status - NONE
1782
1783AVAILABILITY: V2/V3
1784
1785EXAMPLE:
1786
1787  $status = ldap_perror($ld,$s);
1788

ldap_rename(ld,dn,newrdn,newparent,deleteoldrdn,serverctrls,clientc‐

1790trls,msgidp)
1791DESCRIPTION:
1792
1793Asynchronously rename a LDAP entry
1794
1795INPUT:
1796  ld - LDAP Session Handle
1797  dn - String
1798  newrdn - String
1799  newparent - String
1800  deleteoldrdn - Integer
1801  serverctrls - LDAP Control List Pointer
1802  clientctrls - LDAP Control List Pointer
1803  msgidp - Integer
1804
1805OUTPUT:
1806  status - Integer
1807  msgidp - Integer
1808
1809AVAILABILITY: V3
1810
1811EXAMPLE:
1812
1813  $status = ldap_rename($ld,$dn,$newrdn,$newparent,$deleteoldrdn,$serverctrls,$clientctrls,$msgidp);
1814

ldap_rename_s(ld,dn,newrdn,newparent,deleteoldrdn,serverctrls,clientctrls)

1816DESCRIPTION:
1817
1818Synchronously rename a LDAP entry
1819
1820INPUT:
1821  ld - LDAP Session Handle
1822  dn - String
1823  newrdn - String
1824  newparent - String
1825  deleteoldrdn - Integer
1826  serverctrls - LDAP Control List Pointer
1827  clientctrls - LDAP Control List Pointer
1828
1829OUTPUT:
1830  status - Integer
1831
1832AVAILABILITY: V3
1833
1834EXAMPLE:
1835
1836  $status = ldap_rename_s($ld,$dn,$newrdn,$newparent,$deleteoldrdn,$serverctrls,$clientctrls);
1837

ldap_result(ld,msgid,all,timeout,result)

1839DESCRIPTION:
1840
1841Get the result for an asynchronous LDAP operation
1842
1843INPUT:
1844  ld - LDAP Session Handle
1845  msgid - Integer
1846  all - Integer
1847  timeout - Time in Seconds
1848  result - LDAP Message Pointer
1849
1850OUTPUT:
1851  status - Integer
1852  result - LDAP Message Pointer
1853
1854AVAILABILITY: V2/V3
1855
1856EXAMPLE:
1857
1858  $status = ldap_result($ld,$msgid,$all,$timeout,$result);
1859

ldap_result2error(ld,r,freeit)

1861DESCRIPTION:
1862
1863Get the error number for a given result
1864
1865INPUT:
1866  ld - LDAP Session Handle
1867  r - LDAP Message Pointer
1868  freeit - Integer
1869
1870OUTPUT:
1871  status - Integer
1872
1873AVAILABILITY: V2/V3
1874
1875EXAMPLE:
1876
1877  $status = ldap_result2error($ld,$r,$freeit);
1878

ldap_sasl_bind(ld,dn,mechanism,cred,serverctrls,clientctrls,msgidp)

1880DESCRIPTION:
1881
1882Asynchronously bind to the LDAP server using a SASL mechanism
1883
1884INPUT:
1885  ld - LDAP Session Handle
1886  dn - String
1887  mechanism - String
1888  cred - Binary String
1889  serverctrls - LDAP Control List Pointer
1890  clientctrls - LDAP Control List Pointer
1891  msgidp - Integer
1892
1893OUTPUT:
1894  status - Integer
1895  msgidp - Integer
1896
1897AVAILABILITY: V3
1898
1899EXAMPLE:
1900
1901  $status = ldap_sasl_bind($ld,$dn,$mechanism,$cred,$serverctrls,$clientctrls,$msgidp);
1902

ldap_sasl_bind_s(ld,dn,mechanism,cred,serverctrls,clientctrls,servercredp)

1904DESCRIPTION:
1905
1906Synchronously bind to a LDAP server using a SASL mechanism
1907
1908INPUT:
1909  ld - LDAP Session Handle
1910  dn - String
1911  mechanism - String
1912  cred - Binary String
1913  serverctrls - LDAP Control List Pointer
1914  clientctrls - LDAP Control List Pointer
1915
1916OUTPUT:
1917  status - Integer
1918  servercredp -
1919
1920AVAILABILITY: V3
1921
1922EXAMPLE:
1923
1924  $status = ldap_sasl_bind_s($ld,$dn,$mechanism,$cred,$serverctrls,$clientctrls,$servercredp);
1925

ldap_search(ld,base,scope,filter,attrs,attrsonly)

1927DESCRIPTION:
1928
1929Asynchronously search the LDAP server
1930
1931INPUT:
1932  ld - LDAP Session Handle
1933  base - String
1934  scope - Integer
1935  filter - String
1936  attrs - List Reference
1937  attrsonly - Integer
1938
1939OUTPUT:
1940  status - Integer
1941
1942AVAILABILITY: V2/V3
1943
1944EXAMPLE:
1945
1946  $status = ldap_search($ld,$base,$scope,$filter,$attrs,$attrsonly);
1947

ldap_search_ext(ld,base,scope,filter,attrs,attrsonly,serverctrls,clientc‐

1949trls,timeoutp,sizelimit,msgidp)
1950DESCRIPTION:
1951
1952Asynchronously search the LDAP server w/ Controls
1953
1954INPUT:
1955  ld - LDAP Session Handle
1956  base - String
1957  scope - Integer
1958  filter - String
1959  attrs - List Reference
1960  attrsonly - Integer
1961  serverctrls - LDAP Control List Pointer
1962  clientctrls - LDAP Control List Pointer
1963  timeoutp - Time in Seconds
1964  sizelimit - Integer
1965  msgidp - Integer
1966
1967OUTPUT:
1968  status - Integer
1969  msgidp - Integer
1970
1971AVAILABILITY: V3
1972
1973EXAMPLE:
1974
1975  $status = ldap_search_ext($ld,$base,$scope,$filter,$attrs,$attrsonly,$serverctrls,$clientctrls,$timeoutp,$sizelimit,$msgidp);
1976

ldap_search_ext_s(ld,base,scope,filter,attrs,attrsonly,serverctrls,clientc‐

1978trls,timeoutp,sizelimit,res)
1979DESCRIPTION:
1980
1981Synchronously search the LDAP server w/ Controls
1982
1983INPUT:
1984  ld - LDAP Session Handle
1985  base - String
1986  scope - Integer
1987  filter - String
1988  attrs - List Reference
1989  attrsonly - Integer
1990  serverctrls - LDAP Control List Pointer
1991  clientctrls - LDAP Control List Pointer
1992  timeoutp - Time in Seconds
1993  sizelimit - Integer
1994  res - LDAP Message Pointer
1995
1996OUTPUT:
1997  status - Integer
1998  res - LDAP Message Pointer
1999
2000AVAILABILITY: V3
2001
2002EXAMPLE:
2003
2004  $status = ldap_search_ext_s($ld,$base,$scope,$filter,$attrs,$attrsonly,$serverctrls,$clientctrls,$timeoutp,$sizelimit,$res);
2005

ldap_search_s(ld,base,scope,filter,attrs,attrsonly,res)

2007DESCRIPTION:
2008
2009Synchronously search the LDAP server
2010
2011INPUT:
2012  ld - LDAP Session Handle
2013  base - String
2014  scope - Integer
2015  filter - String
2016  attrs - List Reference
2017  attrsonly - Integer
2018  res - LDAP Message Pointer
2019
2020OUTPUT:
2021  status - Integer
2022  res - LDAP Message Pointer
2023
2024AVAILABILITY: V2/V3
2025
2026EXAMPLE:
2027
2028  $status = ldap_search_s($ld,$base,$scope,$filter,$attrs,$attrsonly,$res);
2029

ldap_search_st(ld,base,scope,filter,attrs,attrsonly,timeout,res)

2031DESCRIPTION:
2032
2033Synchronously search the LDAP server w/ Timeout
2034
2035INPUT:
2036  ld - LDAP Session Handle
2037  base - String
2038  scope - Integer
2039  filter - String
2040  attrs - List Reference
2041  attrsonly - Integer
2042  timeout - Time in Seconds
2043  res - LDAP Message Pointer
2044
2045OUTPUT:
2046  status - Integer
2047  res - LDAP Message Pointer
2048
2049AVAILABILITY: V2/V3
2050
2051EXAMPLE:
2052
2053  $status = ldap_search_st($ld,$base,$scope,$filter,$attrs,$attrsonly,$timeout,$res);
2054

ldap_set_filter_additions(lfdp,prefix,suffix)

2056DESCRIPTION:
2057
2058Add a prefix and suffix for filter generation
2059
2060INPUT:
2061  lfdp - LDAP Filter Description Pointer
2062  prefix - String
2063  suffix - String
2064
2065OUTPUT:
2066  status - Integer
2067
2068AVAILABILITY: V2/V3
2069
2070EXAMPLE:
2071
2072  $status = ldap_set_filter_additions($lfdp,$prefix,$suffix);
2073

ldap_set_lderrno(ld,e,m,s)

2075DESCRIPTION:
2076
2077Set the LDAP error structure
2078
2079INPUT:
2080  ld - LDAP Session Handle
2081  e - Integer
2082  m - String
2083  s - String
2084
2085OUTPUT:
2086  status - Integer
2087
2088AVAILABILITY: V2/V3
2089
2090EXAMPLE:
2091
2092  $status = ldap_set_lderrno($ld,$e,$m,$s);
2093

ldap_set_option(ld,option,optdata)

2095DESCRIPTION:
2096
2097Set a LDAP session option
2098
2099INPUT:
2100  ld - LDAP Session Handle
2101  option - Integer
2102  optdata - Integer
2103
2104OUTPUT:
2105  status - Integer
2106
2107AVAILABILITY: V2/V3
2108
2109EXAMPLE:
2110
2111  $status = ldap_set_option($ld,$option,$optdata);
2112

ldap_set_rebind_proc(ld,rebindproc)

2114DESCRIPTION:
2115
2116Set the LDAP rebind process
2117
2118INPUT:
2119  ld - LDAP Session Handle
2120
2121OUTPUT:
2122  status - NONE
2123
2124AVAILABILITY: V2/V3
2125
2126EXAMPLE:
2127
2128  $status = ldap_set_rebind_proc($ld,$rebindproc);
2129

ldap_simple_bind(ld,who,passwd)

2131DESCRIPTION:
2132
2133Asynchronously bind to the LDAP server using simple authentication
2134
2135INPUT:
2136  ld - LDAP Session Handle
2137  who - String
2138  passwd - String
2139
2140OUTPUT:
2141  status - Integer
2142
2143AVAILABILITY: V2/V3
2144
2145EXAMPLE:
2146
2147  $status = ldap_simple_bind($ld,$who,$passwd);
2148

ldap_simple_bind_s(ld,who,passwd)

2150DESCRIPTION:
2151
2152Synchronously bind to the LDAP server using simple authentication
2153
2154INPUT:
2155  ld - LDAP Session Handle
2156  who - String
2157  passwd - String
2158
2159OUTPUT:
2160  status - Integer
2161
2162AVAILABILITY: V2/V3
2163
2164EXAMPLE:
2165
2166  $status = ldap_simple_bind_s($ld,$who,$passwd);
2167

ldap_sort_entries(ld,chain,attr)

2169DESCRIPTION:
2170
2171Sort the results of a LDAP search
2172
2173INPUT:
2174  ld - LDAP Session Handle
2175  chain - LDAP Message Pointer
2176  attr - String
2177
2178OUTPUT:
2179  status - Integer
2180  chain - LDAP Message Pointer
2181
2182AVAILABILITY: V2/V3
2183
2184EXAMPLE:
2185
2186  $status = ldap_sort_entries($ld,$chain,$attr);
2187

ldap_unbind(ld)

2189DESCRIPTION:
2190
2191Asynchronously unbind from the LDAP server
2192
2193INPUT:
2194  ld - LDAP Session Handle
2195
2196OUTPUT:
2197  status - Integer
2198
2199AVAILABILITY: V2/V3
2200
2201EXAMPLE:
2202
2203  $status = ldap_unbind($ld);
2204

ldap_unbind_s(ld)

2206DESCRIPTION:
2207
2208Synchronously unbind from a LDAP server
2209
2210INPUT:
2211  ld - LDAP Session Handle
2212
2213OUTPUT:
2214  status - Integer
2215
2216AVAILABILITY: V2/V3
2217
2218EXAMPLE:
2219
2220  $status = ldap_unbind_s($ld);
2221

ldap_url_parse(url)

2223DESCRIPTION:
2224
2225Parse a LDAP URL, returning a HASH of its components
2226
2227INPUT:
2228  url - String
2229
2230OUTPUT:
2231  status -
2232
2233AVAILABILITY: V2/V3
2234
2235EXAMPLE:
2236
2237  $status = ldap_url_parse($url);
2238

ldap_url_search(ld,url,attrsonly)

2240DESCRIPTION:
2241
2242Asynchronously search using a LDAP URL
2243
2244INPUT:
2245  ld - LDAP Session Handle
2246  url - String
2247  attrsonly - Integer
2248
2249OUTPUT:
2250  status - Integer
2251
2252AVAILABILITY: V2/V3
2253
2254EXAMPLE:
2255
2256  $status = ldap_url_search($ld,$url,$attrsonly);
2257

ldap_url_search_s(ld,url,attrsonly,res)

2259DESCRIPTION:
2260
2261Synchronously search using a LDAP URL
2262
2263INPUT:
2264  ld - LDAP Session Handle
2265  url - String
2266  attrsonly - Integer
2267  res - LDAP Message Pointer
2268
2269OUTPUT:
2270  status - Integer
2271  res - LDAP Message Pointer
2272
2273AVAILABILITY: V2/V3
2274
2275EXAMPLE:
2276
2277  $status = ldap_url_search_s($ld,$url,$attrsonly,$res);
2278

ldap_url_search_st(ld,url,attrsonly,timeout,res)

2280DESCRIPTION:
2281
2282Synchronously search using a LDAP URL w/ timeout
2283
2284INPUT:
2285  ld - LDAP Session Handle
2286  url - String
2287  attrsonly - Integer
2288  timeout - Time in Seconds
2289  res - LDAP Message Pointer
2290
2291OUTPUT:
2292  status - Integer
2293  res - LDAP Message Pointer
2294
2295AVAILABILITY: V2/V3
2296
2297EXAMPLE:
2298
2299  $status = ldap_url_search_st($ld,$url,$attrsonly,$timeout,$res);
2300

prldap_install_routines(ld,shared)

2302DESCRIPTION:
2303
2304Install NSPR I/O, threading, and DNS functions so they can be used by the LDAP
2305connection (ld).
2306
2307If 'ld' is NULL, the functions are installed as the default functions for all
2308new LDAP * handles).
2309
2310INPUT:
2311  ld - LDAP Session Handle
2312  shared - True if the LDAP * handle is used in an MT context
2313
2314OUTPUT:
2315  status - Integer
2316
2317AVAILABILITY: V3
2318

CREDITS

2320       Most of the Perl API module was written by Clayton Donley to interface
2321       with C API routines from Netscape Communications Corp., Inc.
2322

BUGS

2324       Documentation needs much work.  LDAPv3 calls not tested or supported in
2325       this version.  NT can not use Perl Rebind processes, must use
2326       'ldap_set_default_rebindproc'.  Possible memory leak in ldap_search* is
2327       being investigated.
2328

SEE ALSO

2330       Mozilla::LDAP::Conn, Mozilla::LDAP::Entry, and Perl
2331
2332
2333
2334perl v5.8.8                       2007-06-14                            API(3)
Impressum