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.
If the LDAP URL does not contain a search filter, the filter defaults to
"(objectClass=*)".
Authorities and Locks
No IBM® i authority is required. All authority checking is done by the LDAP
server.
(Input) Specifies attribute information. Set to 1 to request attribute
types only. Set to 0 to request both attribute types and attribute values.
res
(Output) Contains the result of the synchronous search operation. This
result should be passed to the LDAP parsing routines (see ldap_first_entry(),
ldap_next_entry(), and so on). The caller is responsible for freeing
res with ldap_msgfree().
Return Value
LDAP_SUCCESS
if the request was successful.
another LDAP error
if the request was not successful.
Error Conditions
If ldap_url_search_s() is not successful, it returns an
LDAP error code other than LDAP_SUCCESS. See
LDAP Client API Error Conditions for possible LDAP error code values.
Error Messages
The following message may be sent from this function.
Message ID
Error Message Text
CPF3CF2 E
Error(s) occurred during running of
ldap_url_search_s API.