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

135 lines
3.7 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_add_control()--Create a Control and Insert it into the List of LDAP Server Controls</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 -->
<!-- Created for V5R3 by bethvh -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!--End Header Records -->
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<a name="Top_Of_Page"></a>
<h2>ldap_add_control()--Create a Control and Insert it into the List of LDAP Server Controls</h2>
<div class="box" style="width: 70%;">
<br>
&nbsp;&nbsp;Syntax<br>
<pre>
#include &lt;ldap.h&gt;
int ldap_add_control(
char *<em>oid</em>,
ber_len_t <em>len</em>,
char *<em>value</em>,
int <em>isCritical</em>,
LDAPControl ***<em>ctrlList</em>)
</pre>
<br>
&nbsp;&nbsp;Library Name/Service Program: QSYS/QGLDCLNT<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The <strong>ldap_add_control()</strong> function is used to create a control and insert it into the list of LDAP server controls.</p>
<p><strong>Note:</strong> The function will allocate space in the list for the control.</p>
<br>
<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><strong><em>oid</em></strong></dt>
<dd>(Input) Specifies the control type, represented as a string.<br><br></dd>
<dt><strong><em>len</em></strong></dt>
<dd>(Input) Specifies the length of the value string.<br><br></dd>
<dt><strong><em>value</em></strong></dt>
<dd>(Input) Specifies the data associated with the control.<br><br></dd>
<dt><strong><em>isCritical</em></strong></dt>
<dd>(Input) Specifies whether the control is critical or not.<br><br></dd>
<dt><strong><em>ctrlList</em></strong></dt>
<dd>(Input) Specifies a list of LDAP server controls. See <a href="ldap_controls.htm">LDAP Controls</a> for more information about server controls.<br><br></dd>
</dl>
<br>
<h3>Return Value</h3>
<dl>
<dt><strong>LDAP_SUCCESS</strong></dt>
<dd>if the request was successful.</dd>
<dt><strong>LDAP_NO_MEMORY</strong></dt>
<dd>if the control could not be added.</dd>
</dl>
<br>
<h3>Related Information</h3>
<ul>
<li><a href="ldap_insert_control.htm">ldap_insert_control()</a> -- Insert a control in the list of LDAP server controls.</li>
<li><a href="ldap_remove_control.htm">ldap_remove_control()</a> -- Remove a control from the list of LDAP server controls.</li>
<li><a href="ldap_copy_controls.htm">ldap_copy_controls()</a> -- Synchronously add an
entry with controls.</li>
</ul>
<br>
<hr>
API introduced: V5R3
<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>