1 .TH LDAP_PARSE_REFERENCE 3 "26 September 2001" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldap_parse_reference \- Extract referrals and controls from a reference message
13 int ldap_parse_reference( LDAP *ld, LDAPMessage *reference,
14 char ***referralsp, LDAPControl ***serverctrlsp, int freeit )
18 .B ldap_parse_reference()
19 routine is used to extract referrals and controls from a reference message.
20 The \fIreference\fP parameter is a reference message as returned by a
22 .BR ldap_first_reference (3) ,
23 .BR ldap_next_reference (3) ,
24 .BR ldap_first_message (3) ,
25 .BR ldap_next_message (3) ,
29 The \fIreferralsp\fP parameter will be filled in with an allocated array of
30 character strings. The strings are copies of the referrals contained in
31 the parsed message. The array should be freed by calling
32 .BR ldap_value_free (3) .
33 If \fIreferralsp\fP is NULL, no referrals are returned.
34 If no referrals were returned, \fI*referralsp\fP is set to NULL.
36 The \fIserverctrlsp\fP parameter will be filled in with an allocated array of
37 controls copied from the parsed message. The array should be freed by calling
38 .BR ldap_controls_free (3) .
39 If \fIserverctrlsp\fP is NULL, no controls are returned.
40 If no controls were returned, \fI*serverctrlsp\fP is set to NULL.
42 The \fIfreeit\fP parameter determines whether the parsed message is
43 freed or not after the extraction. Any non-zero value will make it
46 routine can also be used to free the message later.
48 Upon success LDAP_SUCCESS is returned. Otherwise the values of the
49 \fIreferralsp\fP and \fIserverctrlsp\fP parameters are undefined.
52 .BR ldap_first_reference (3),
53 .BR ldap_first_message (3),
55 .BR ldap_get_values (3),
56 .BR ldap_controls_free (3)
59 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
61 is derived from University of Michigan LDAP 3.3 Release.