1.lf 1 stdin
2.TH LDAP_EXTENDED_OPERATION 3 "2020/04/28" "OpenLDAP 2.4.50"
3.\" $OpenLDAP$
4.\" Copyright 1998-2020 The OpenLDAP Foundation All Rights Reserved.
5.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
6.SH NAME
7ldap_extended_operation, ldap_extended_operation_s \- Extends the LDAP operations to the LDAP server.
8.SH LIBRARY
9OpenLDAP LDAP (libldap, \-lldap)
10.SH SYNOPSIS
11.nf
12.ft B
13#include <ldap.h>
14.LP
15.ft B
16int ldap_extended_operation(
17.RS
18.ft B
19LDAP *\fIld\fB,
20const char *\fIrequestoid\fB,
21const struct berval *\fIrequestdata\fB,
22LDAPControl **\fIsctrls\fB,
23LDAPControl **\fIcctrls\fB,
24int *\fImsgidp\fB );
25.RE
26.LP
27.ft B
28int ldap_extended_operation_s(
29.RS
30.ft B
31LDAP *\fIld\fB,
32const char *\fIrequestoid\fB,
33const struct berval *\fIrequestdata\fB,
34LDAPControl **\fIsctrls\fB,
35LDAPControl **\fIcctrls\fB,
36char **\fIretoidp\fB,
37struct berval **\fIretdatap\fB );
38.RE
39.SH DESCRIPTION
40The
41.B ldap_extended_operation_s()
42routine is used to synchronously perform an LDAP extended operation.
43It takes \fIrequestoid\fP, which points to a dotted-decimal OID string
44identifying the extended operation to perform. \fIrequestdata\fP is the
45data required for the request, \fIsctrls\fP is an array of LDAPControl
46structures to use with this extended operation, \fIcctrls\fP is an array
47of LDAPControl structures that list the client controls to use with
48this extended operation.
49.LP
50The output parameter \fIretoidp\fP points to a dotted-decimal OID
51string returned by the LDAP server.  The memory used by the string
52should be freed with the
53.BR ldap_memfree (3)
54function.
55The output parameter \fIretdatap\fP points to a pointer to a berval
56structure that contains the returned data.  If no data is returned
57by the server, the pointer is set this to NULL.  The memory used by
58this structure should be freed with the
59.BR ber_bvfree (3)
60function.
61.LP
62The
63.B ldap_extended_operation()
64works just like
65.BR ldap_extended_operation_s() ,
66but the operation is asynchronous.  It provides the message id of
67the request it initiated in the integer pointed to be \fImsgidp\fP.
68The result of this operation can be obtained by calling
69.BR ldap_result(3).
70.SH SEE ALSO
71.BR ber_bvfree (3),
72.BR ldap_memfree (3),
73.BR ldap_parse_extended_result (3),
74.BR ldap_result (3)
75.SH ACKNOWLEDGEMENTS
76.lf 1 ./../Project
77.\" Shared Project Acknowledgement Text
78.B "OpenLDAP Software"
79is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
80.B "OpenLDAP Software"
81is derived from the University of Michigan LDAP 3.3 Release.  
82.lf 76 stdin
83