ldap_explode_rdn()--Break a Relative Distinguished Name into Its Components
Syntax
#include <ldap.h> char **ldap_explode_rdn( const char *rdn, int notypes)
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
The ldap_explode_rdn() function uses the relative distinguished name (RDN) in the local CCSID (as returned by ldap_explode_dn(), for example) and breaks it up into its component parts. If the RDN is in UTF8, use ldap_explode_rdn_utf8().
ldap_explode_rdn() returns a NULL-terminated array of character strings. The notypes parameter is used to request that only the component values be returned, not their types.
For example, the RDN "ou=Research+cn=Bob" would return as either {"ou=Research", "cn=Bob", NULL} or {"Research","Bob", NULL}, depending on whether notypes was 0 or 1, respectively. The result can be freed by calling ldap_value_free().
Authorities and Locks
No IBM® i authority is required.
Parameters
- rdn
- (Input) Specifies the RDN to be exploded (perhaps as returned by ldap_explode_dn()). Multiple RDNs can be concatenated using a plus sign ('+').
- notypes
- (Input) Specifies if type information is to be returned with each RDN. If non-zero, the type information will be stripped. If zero, the type information is retained. For example, setting notypes to 1 would result in the RDN "cn=Fido" being returned as "Fido".
Return Value
- Components of Relative Distinguished Name (RDN)
- if the request was successful.
- NULL
- if the request was not successful.
Error Conditions
If ldap_explode_rdn() is not successful, then there was no memory available for either the array or its component parts.
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_explode_rdn API. |
Related Information
- ldap_explode_dn() -- Break a Distinguished Name into its components.
- ldap_explode_rdn_utf8() -- Break a UTF8 Relative Distinguished Name into its components.
API introduced: V4R5
[ Back to top | LDAP APIs | APIs by category ]