219 lines
6.1 KiB
HTML
219 lines
6.1 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_url_search()--Perform an LDAP URL Search Operation</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 April 2001 -->
|
|
<!-- This file has undergone html cleanup on 2/20/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_url_search()--Perform an LDAP URL Search Operation</h2>
|
|
|
|
<br>
|
|
<div class="box" style="width: 70%;">
|
|
<br>
|
|
Syntax<br>
|
|
<pre>
|
|
#include <ldap.h>
|
|
|
|
int ldap_url_search(
|
|
LDAP <em>*ld</em>,
|
|
char <em>*url</em>,
|
|
int <em>attrsonly</em>)
|
|
</pre>
|
|
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Library Name/Service Program: QSYS/QGLDCLNT<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The <strong>ldap_url_search()</strong> function is used to perform an
|
|
asynchronous LDAP search based on the contents of the <em>url</em>
|
|
parameter.</p>
|
|
|
|
<p>This function acts like <a href="ldap_search.htm">ldap_search()</a> except
|
|
that the search parameters are specified by the URL.</p>
|
|
|
|
<p>This routine supports the use of LDAP URLs (Uniform Resource Locators).</p>
|
|
|
|
<p>LDAP URLs look like this:</p>
|
|
|
|
<pre>
|
|
ldap[s]://[<em>hostport</em>][/[<em>dn</em>[?[<em>attributes</em>][?[<em>scope</em>][?[<em>filter</em>]]]]]]
|
|
</pre>
|
|
|
|
<p>where:</p>
|
|
|
|
<ul>
|
|
<li><strong>hostport</strong> is a host name with an optional
|
|
":portnumber"</li>
|
|
|
|
<li><strong>dn</strong> is the base DN to be used for an LDAP search
|
|
operation</li>
|
|
|
|
<li><strong>attributes</strong> is a comma separated list of attributes to be
|
|
retrieved</li>
|
|
|
|
<li><strong>scope</strong> is one of these three strings: base one sub
|
|
(default=base)</li>
|
|
|
|
<li><strong>filter</strong> is LDAP search filter as used in a call to <strong>
|
|
ldap_search</strong></li>
|
|
</ul>
|
|
|
|
<p>For example:</p>
|
|
|
|
<pre>
|
|
ldap://example.ibm.com/c=US?o,description?one?o=ibm
|
|
</pre>
|
|
|
|
<p>URLs that are wrapped in angle-brackets and/or preceded by "URL:" are also
|
|
tolerated, including the form <em>url:ldapurl</em>.</p>
|
|
|
|
<p>For example:</p>
|
|
|
|
<pre>
|
|
URL:ldap://example.ibm.com/c=US?o,description?one?o=ibm
|
|
</pre>
|
|
|
|
<p>This form also is allowed: <em><url:ldapurl></em>.</p>
|
|
|
|
<p>For example:</p>
|
|
|
|
<pre>
|
|
<URL:ldap://example.ibm.com/c=US?o,description?one?o=ibm>
|
|
</pre>
|
|
|
|
<p><strong>Notes:</strong></p>
|
|
|
|
<ol>
|
|
<li>For search operations, if hostport is omitted, host and port for the
|
|
current connection are used. If hostport is specified, and is different from
|
|
the host and port combination used for the current connection, the search is
|
|
directed to that host and port, instead of using the current connection. In
|
|
this case, the underlying referral mechanism is used to bind to hostport.</li>
|
|
|
|
<li>If the LDAP URL does not contain a search filter, the filter defaults to
|
|
"(objectClass=*)".</li>
|
|
</ol>
|
|
|
|
<br>
|
|
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
|
|
<!-- Instead, use the commented out coding below to indicate NONE. -->
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<!-- Use this if there are no authorities and locks. -->
|
|
<p>None.</p>
|
|
|
|
<br>
|
|
<h3>Return Value</h3>
|
|
|
|
<dl>
|
|
<dt><strong>Message ID of the Operation Initiated</strong></dt>
|
|
|
|
<dd>if the request was successful. A subsequent call to <a href=
|
|
"ldap_result.htm">ldap_result()</a>, can be used to obtain the result.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>-1</strong></dt>
|
|
|
|
<dd>if the request was not successful.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<br>
|
|
|
|
|
|
<h3>Error Conditions</h3>
|
|
|
|
<p>If <strong>ldap_url_search()</strong> is not successful, -1 will be returned
|
|
setting the session error parameters (<em>ld_error</em>) in the LDAP structure
|
|
appropriately, which can be obtained by using <a href="ldap_get_lderrno.htm">
|
|
ldap_get_lderrno()</a>. See <a href="ldap_error_condt.htm">LDAP Client API
|
|
Error Conditions</a> for possible LDAP error code values.</p>
|
|
|
|
<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_url_search API.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<br>
|
|
|
|
|
|
<h3>Related Information</h3>
|
|
|
|
<ul>
|
|
<li><a href="ldap_free_urldesc.htm">ldap_free_urldesc()</a> -- Frees an LDAP
|
|
URL description.</li>
|
|
|
|
<li><a href="ldap_is_ldap_url.htm">ldap_is_ldap_url()</a> -- Check a URL string
|
|
to see if it is an LDAP URL.</li>
|
|
|
|
<li><a href="ldap_url_parse.htm">ldap_url_parse()</a> -- Break up an LDAP URL
|
|
string into its components.</li>
|
|
|
|
<li><a href="ldap_url_search_s.htm">ldap_url_search_s()</a> -- Synchronously
|
|
search using an LDAP URL.</li>
|
|
|
|
<li><a href="ldap_url_search_st.htm">ldap_url_search_st()</a> -- Synchronously
|
|
search using an LDAP URL and a timeout.</li>
|
|
</ul>
|
|
|
|
<br>
|
|
<hr>
|
|
API introduced: V4R3
|
|
|
|
<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>
|
|
|