The EXP_Init function initializes the SDK configuration information needed when calling other functions:
int EXP_Init(
char *pszLdapHost,
char *pszLdapMatchAttrib,
char *pszLdapDN,
unsigned int iLdapPort,
char *pszLdapBindUser,
char *pszLdapBindPass,
char *pszAdminUser,
char *pszAdminPassword);
|
SDK Configuration Initialization lists the SDK code variables and their description.
Table 5–2 SDK Code Variable Description|
SDK Code Variables |
Description |
|---|---|
|
pszLdapHost |
A null-terminated string containing the host name or IP address of the LDAP server in which the user search is performed. |
|
pszLdapMatchAttrib |
A null-terminated string specifying which LDAP attribute the pszAdminUser parameter should be matched against when searching the LDAP. The default is User ID (uid). |
|
pszLdapDN |
A null-terminated string specifying the Domain Name (DN) to use when searching for users. |
|
iLdapPort |
An integer specifying the port number in which the LDAP server is listening. |
|
pszLdapBindUser |
The string specifies the bind DN (Distinguish Name) and password for the directory server. If this is NULL, the SDK attempts to bind as anonymous user. |
|
pszLdapBindUser |
The string specifies the bind DN and password for the directory server. If this is NULL, the SDK attempts to bind as anonymous user. |
|
pszAdminUser |
The pointer to the string containing the “proxy” username and password is used when connecting to the messaging server. This is not NULL. |
|
pszAdminPass |
The pointer to the string containing the “proxy” username and password is used when connecting to the messaging server. This is not NULL. |
A successful initialization, returns 0. If initialization fails, a non-zero number is returned. If initialization fails, errno is set to the most appropriate value possible based on what failed (in most cases a system call). These codes then map to standard errno values.