Home | History | Annotate | Line # | Download | only in man
      1 .lf 1 stdin
      2 .TH LDAP_PARSE_REFERENCE 3 "2025/05/22" "OpenLDAP 2.6.10"
      3 .\" $OpenLDAP$
      4 .\" Copyright 1998-2024 The OpenLDAP Foundation All Rights Reserved.
      5 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
      6 .SH NAME
      7 ldap_parse_reference \- Extract referrals and controls from a reference message
      8 .SH LIBRARY
      9 OpenLDAP LDAP (libldap, \-lldap)
     10 .SH SYNOPSIS
     11 .nf
     12 .ft B
     13 #include <ldap.h>
     14 .LP
     15 .ft B
     16 int ldap_parse_reference( LDAP *ld, LDAPMessage *reference,
     17 	char ***referralsp, LDAPControl ***serverctrlsp,
     18 	int freeit )
     19 .SH DESCRIPTION
     20 .LP
     21 The
     22 .B ldap_parse_reference()
     23 routine is used to extract referrals and controls from a reference message.
     24 The \fIreference\fP parameter is a reference message as returned by a
     25 call to
     26 .BR ldap_first_reference (3) ,
     27 .BR ldap_next_reference (3) ,
     28 .BR ldap_first_message (3) ,
     29 .BR ldap_next_message (3) ,
     30 or
     31 .BR ldap_result (3) .
     32 .LP
     33 The \fIreferralsp\fP parameter will be filled in with an allocated array of
     34 character strings. The strings are copies of the referrals contained in
     35 the parsed message. The array should be freed by calling
     36 .BR ldap_value_free (3) .
     37 If \fIreferralsp\fP is NULL, no referrals are returned.
     38 If no referrals were returned, \fI*referralsp\fP is set to NULL.
     39 .LP
     40 The \fIserverctrlsp\fP parameter will be filled in with an allocated array of
     41 controls copied from the parsed message. The array should be freed by calling
     42 .BR ldap_controls_free (3).
     43 If \fIserverctrlsp\fP is NULL, no controls are returned.
     44 If no controls were returned, \fI*serverctrlsp\fP is set to NULL.
     45 .LP
     46 The \fIfreeit\fP parameter determines whether the parsed message is
     47 freed or not after the extraction. Any non-zero value will make it
     48 free the message. The
     49 .BR ldap_msgfree (3)
     50 routine can also be used to free the message later.
     51 .SH ERRORS
     52 Upon success LDAP_SUCCESS is returned. Otherwise the values of the
     53 \fIreferralsp\fP and \fIserverctrlsp\fP parameters are undefined.
     54 .SH SEE ALSO
     55 .BR ldap (3),
     56 .BR ldap_first_reference (3),
     57 .BR ldap_first_message (3),
     58 .BR ldap_result (3),
     59 .BR ldap_get_values (3),
     60 .BR ldap_controls_free (3)
     61 .SH ACKNOWLEDGEMENTS
     62 .lf 1 ./../Project
     63 .\" Shared Project Acknowledgement Text
     64 .B "OpenLDAP Software"
     65 is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
     66 .B "OpenLDAP Software"
     67 is derived from the University of Michigan LDAP 3.3 Release.  
     68 .lf 62 stdin
     69