1LDAP_PARSE_REFERENCE(3)    Library Functions Manual    LDAP_PARSE_REFERENCE(3)
2
3
4

NAME

6       ldap_parse_reference  - Extract referrals and controls from a reference
7       message
8

LIBRARY

10       OpenLDAP LDAP (libldap, -lldap)
11

SYNOPSIS

13       #include <ldap.h>
14
15       int ldap_parse_reference( LDAP *ld, LDAPMessage *reference,
16            char ***referralsp, LDAPControl ***serverctrlsp,
17            int freeit )
18

DESCRIPTION

20       The ldap_parse_reference() routine is used  to  extract  referrals  and
21       controls from a reference message.  The reference parameter is a refer‐
22       ence  message  as  returned  by  a  call  to   ldap_first_reference(3),
23       ldap_next_reference(3), ldap_first_message(3), ldap_next_message(3), or
24       ldap_result(3).
25
26       The referralsp parameter will be filled in with an allocated  array  of
27       character strings. The strings are copies of the referrals contained in
28       the  parsed  message.  The   array   should   be   freed   by   calling
29       ldap_value_free(3).   If referralsp is NULL, no referrals are returned.
30       If no referrals were returned, *referralsp is set to NULL.
31
32       The serverctrlsp parameter will be filled in with an allocated array of
33       controls  copied  from the parsed message. The array should be freed by
34       calling ldap_controls_free(3).  If serverctrlsp is  NULL,  no  controls
35       are  returned.   If  no controls were returned, *serverctrlsp is set to
36       NULL.
37
38       The freeit parameter determines whether the parsed message is freed  or
39       not after the extraction. Any non-zero value will make it free the mes‐
40       sage. The ldap_msgfree(3) routine can also be used to free the  message
41       later.
42

ERRORS

44       Upon  success  LDAP_SUCCESS  is  returned.  Otherwise the values of the
45       referralsp and serverctrlsp parameters are undefined.
46

SEE ALSO

48       ldap(3),        ldap_first_reference(3),         ldap_first_message(3),
49       ldap_result(3), ldap_get_values(3), ldap_controls_free(3)
50

ACKNOWLEDGEMENTS

52       OpenLDAP   is   developed   and  maintained  by  The  OpenLDAP  Project
53       (http://www.openldap.org/).  OpenLDAP is  derived  from  University  of
54       Michigan LDAP 3.3 Release.
55
56
57
58OpenLDAP 2.3.34                    2007/2/16           LDAP_PARSE_REFERENCE(3)
Impressum