ldap_enetwork_domain_get()-- Retrieve the User's Default eNetwork Domain Name


  Syntax
 #include <ldap.h>
 
 int ldap_enetwork_domain_get(
       char           **edomain,
       char           *filename)

  Default Public Authority: *USE

  Library Name/Service Program: QSYS/QGLDCLNT

  Threadsafe: Yes

The ldap_enetwork_domain_get() API is used to retrieve the user's default eNetwork domain name. To free the returned string, use ldap_memfree().

The eNetwork domain name (along with the user's default Domain Name Service (DNS) domain name) is used to identify the user's LDAP authentication domain. For example, if a user's eNetwork domain name is "chicago", and the user's DNS domain is midwest.illinois.com, then information can be published in DNS that associates ldap.chicago.midwest.illinois.com with a collection of LDAP servers (master(s) and replicas). This permits applications to easily find an appropriate LDAP authentication server, by using the ldap_server_locate() API.

An application stores the eNetwork domain name on disk by calling ldap_enetwork_domain_set(). For IBM® i, the default file where the eNetwork domain name stored is called ldap_user_info and will be found in the user's home directory. A user's home directory is specified in the user's profile.


Authorities and Locks

The caller must have Execute (*X) authority to each directory in the path name preceding the name of the user information file. The caller must have Read (*R) authority to the user information file.


Parameters

edomain
(Output) Specifies the name of the eNetwork domain to which the user belongs.
filename
(Input) Specifies an alternative location for the user's default eNetwork domain name. If only a filename is given for the filename parameter then the file will be found in the current directory, otherwise, if a path is given as well as a filename as part of the filename parameter, the file will be found by following the given path.

Return Value

LDAP_SUCCESS
if the request was successful.

another LDAP error code
if the request was not successful.

Error Conditions

The ldap_enetwork_domain_get() will return an LDAP error code if not successful. 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_enetwork_domain_get API.


Related Information



API introduced: V4R5

[ Back to top | LDAP APIs | APIs by category ]