ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/ldap_extended_operation.htm

251 lines
7.9 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>ldap_extended_operation()--Perform extended operations.</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- Direct1 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- File Edited March 2001 -->
<!-- This file has undergone html cleanup on 2/19/02 by JET -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<a name="Top_Of_Page"></a>
<h2>ldap_extended_operation()--Perform extended operations.</h2>
<div class="box" style="width: 80%;">
<br>
&nbsp;&nbsp;Syntax<br>
<pre>
#include &lt;ldap.h&gt;
int ldap_extended_operation(
LDAP *<em>ld</em>,
const char *<em>reqoid</em>,
const struct berval *<em>reqdata</em>,
LDAPControl **<em>serverctrls</em>,
LDAPControl **<em>clientctrls</em>,
int *<em>msgidp</em>)
</pre>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Library Name/Service Program: QSYS/QGLDCLNT<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The <strong>ldap_extended_operation()</strong> function is used to initiate
an asynchronous extended operation, which returns LDAP_SUCCESS if the extended
operation was successfully sent, or an LDAP error code if not. If successful,
the <strong>ldap_extended_operation()</strong> API places the message id of the
request in *<em>msgid</em>. A subsequent call to <a href="ldap_result.htm">
ldap_result()</a> can be used to obtain the result of the extended operation,
which can then be passed to <a href="ldap_parse_extended_result.htm">
ldap_parse_extended_result()</a> to obtain the Object IDentifier (OID) and data
contained in the response.</p>
<p>If the LDAP server does not support the extended operation, the server will
reject the request. To determine if the requisite extended operation is
supported by the server, get the rootDSE of the LDAP server, and check for the
supportedExtension attribute. If the values for this attribute include the OID
of your extended operation, then the server supports the extended operation. If
the supportedExtension attribute is not present in the rootDSE, then the server
is not configured to support any extended operations.</p>
<dl>
<dd><br>
</dd>
</dl>
<h3>Authorities and Locks</h3>
<p>No i5/OS authority is required. All authority checking is done by the LDAP
server.</p>
<br>
<h3>Parameters</h3>
<dl>
<dt><em>ld</em></dt>
<dd>(Input) Specifies the LDAP pointer returned by a previous call to <a href=
"ldap_init.htm">ldap_init()</a>, <a href="ldap_ssl_init.htm">
ldap_ssl_init()</a>, or <a href="ldap_open.htm">ldap_open()</a>.</dd>
<dt><em>reqoid</em></dt>
<dd>(Input) Specifies the dotted-OID text string that identifies the extended
operation to be performed by the server.</dd>
<dt><em>reqdata</em></dt>
<dd>(Input) Specifies the arbitrary data required by the extended operation (if
NULL, no data is sent to the server).</dd>
<dt><em>serverctrls</em></dt>
<dd>(Input) Specifies a list of LDAP server controls. This parameter may be set
to null. See <a href="ldap_controls.htm">LDAP Controls</a> for more information
about server controls.</dd>
<dt><em>clientctrls</em></dt>
<dd>(Input) Specifies a list of LDAP client controls. This parameter may be set
to null. See <a href="ldap_controls.htm">LDAP Controls</a> for more information
about client controls.</dd>
<dt><em>msgidp</em></dt>
<dd>(Output) This result parameter is set to the message id of the request if
the <strong>ldap_extended_operation()</strong> call succeeds.</dd>
</dl>
<br>
<h3>Return Value</h3>
<dl>
<dt><strong>LDAP_SUCCESS</strong></dt>
<dd>if the request was successful. <strong>ldap_extended_operation()</strong>
places the message id of the request in *<em>msgidp</em>. To check the result
of this operation, call <a href="ldap_result.htm">ldap_result()</a> and <a
href="ldap_parse_extended_result.htm">ldap_parse_extended_result()</a> APIs.
The server may also return an OID and result data.
<br><br>
</dd>
<dt><strong>another LDAP error code</strong></dt>
<dd>if the request was not successful.</dd>
</dl>
<br>
<br>
<h3>Error Conditions</h3>
<p>If <strong>ldap_extended_operation()</strong> is not successful, will return
a -1 instead of a valid msgid, setting the session error in the LD structure,
which can be obtained by using <a href="ldap_get_errno.htm">
ldap_get_errno()</a>.</p>
<br>
<br>
<h3>Error Messages</h3>
<p>The following message may be sent from this function.</p>
<table width="100%" cellpadding="3">
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td width="15%" valign="top">CPF3CF2 E</td>
<td width="85%" valign="top">Error(s) occurred during running of
ldap_extended_operation API.</td>
</tr>
</table>
<br>
<br>
<h3>Related Information</h3>
<ul>
<li><a href="ldap_add_ext.htm">ldap_add_ext()</a> -- Asynchronously add an
entry with controls.</li>
<li><a href="ldap_add_ext_s.htm">ldap_add_ext_s()</a> -- Synchronously add an
entry with controls.</li>
<li><a href="ldap_cmp_ext.htm">ldap_compare_ext()</a> -- Asynchronous compare
to a directory entry with controls.</li>
<li><a href="ldap_cmp_ext_s.htm">ldap_compare_ext_s()</a> -- Synchronous
compare to a directory entry with controls.</li>
<li><a href="ldap_delete_ext.htm">ldap_delete_ext()</a> -- Asynchronous delete
an entry with controls.</li>
<li><a href="ldap_delete_ext_s.htm">ldap_delete_ext_s()</a> -- Synchronous
delete an entry with controls.</li>
<li><a href="ldap_modify_ext.htm">ldap_modify_ext()</a> -- Asynchronously
modify an entry with controls.</li>
<li><a href="ldap_modify_ext_s.htm">ldap_modify_ext_s()</a> -- Synchronously
modify an entry with controls.</li>
<li><a href="ldap_parse_extended_result.htm">ldap_parse_extended_result()</a>
-- Parse extended result.</li>
<li><a href="ldap_sasl_bind.htm">ldap_sasl_bind()</a> -- Asynchronously bind to
the directory using the Simple Authentication Security Layer (SASL).</li>
<li><a href="ldap_sasl_bind_s.htm">ldap_sasl_bind_s()</a> -- Synchronously bind
to the directory using the Simple Authentication Security Layer (SASL).</li>
<li><a href="ldap_search_ext.htm">ldap_search_ext()</a> -- Asynchronously
search the directory with controls.</li>
<li><a href="ldap_search_ext_s.htm">ldap_search_ext_s()</a> -- Synchronously
search the directory with controls.</li>
<li><a href="ldap_rename.htm">ldap_rename()</a> -- Asynchronously rename an
entry with controls.</li>
<li><a href="ldap_rename_s.htm">ldap_rename_s()</a> -- Synchronously rename an
entry with controls.</li>
<li><a href="ldap_unbind_ext.htm">ldap_unbind_ext()</a> -- Unbind with
controls.</li>
</ul>
<p>The <strong>ldap_extended_operation()</strong> API supports LDAP V3 server
controls and client controls.</p>
<hr>
API introduced: V5R1
<hr>
<table align="center" cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"dirserv1.htm">LDAP APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</body>
</html>