![]() |
![]() |
The dsmInit function call starts an API session and connects the client to TSM storage. The application client can have only one active session open at a time. To open another session with different parameters, use the dsmTerminate call first to end the current session.
To permit cross-node query and restore or retrieve, use the -fromnode and -fromowner string options. See "Accessing Across Nodes and Across Owners" for more information.
dsInt16_t dsmInit (dsUint32_t *dsmHandle, dsmApiVersion *dsmApiVersionP, char *clientNodeNameP, char *clientOwnerNameP, char *clientPasswordP, char *applicationType, char *configfile, char *options);
Parameters
The node name is not case-sensitive.
If this parameter is set both to NULL and passwordaccess prompt, the API attempts to obtain the node name first from the options string that was passed. If it is not there, the API then attempts to obtain the node name from the configuration file or options files. If these attempts to find the node name fail, the UNIX API uses the system host name, while APIs on other operating systems return the DSM_RC_REJECT_ID_UNKNOWN code.
This parameter must be NULL if the passwordaccess option in the dsm.sys file is set to generate. The API uses the system host name.
The owner name is case-sensitive.
This parameter must be NULL if the passwordaccess option in the dsm.sys file is set to generate. The API then uses the login user ID.
The password is not case-sensitive.
Except when the password file is first started, the value of this parameter is ignored if passwordaccess is set to generate.
Each time an API application client starts a session with the server, the application type (or platform) of the client is updated on the server. We recommend that the application type value contain an operating system abbreviation because this value is entered in the platform field on the server. The maximum string length is DSM_MAX_PLATFORM_LENGTH.
To see the current value of the application type, call dsmQuerySessInfo.
For the description and use of configuration files, see Understanding Configuration Files and Options Files or the Tivoli Storage Manager Installing and Using the Backup-Archive Client for your operating system.
The application client can use the option list to override the values of these options that the configuration file sets.
If options are NULL, values for all options are taken from the user options file or the API configuration file. For a description and use of each option, see the Tivoli Storage Manager Installing and Using the Backup-Archive Client for your operating system
The return code numbers are provided in parentheses ( ).
Table 33. Return Codes for dsmInit
Return Code | Explanation |
---|---|
DSM_RC_ABORT_SYSTEM_ERROR (1) | The server has detected a system error and has notified the clients. |
DSM_RC_REJECT_VERIFIER_EXPIRED (52) | Password has expired and must be updated. |
DSM_RC_REJECT_ID_UNKNOWN (53) | Could not find the node name. |
DSM_RC_AUTH_FAILURE (137) | There was an authentication failure. |
DSM_RC_NO_STARTING_DELIMITER (148) | There is no starting delimiter in pattern. |
DSM_RC_NEEDED_DIR_DELIMITER (149) | A directory delimiter is needed immediately before and after the "match directories" meta-string ("...") and one was not located. |
DSM_RC_UNMATCHED_QUOTE (177) | An unmatched quote is in the option string. |
DSM_RC_NLS_CANT_OPEN_TXT (0610) | Unable to open the message text file. |
DSM_RC_INVALID_OPT (2013) | An entry in the option string is invalid. |
DSM_RC_INVALID_DS_HANDLE (2014) | Invalid DSM handle. |
DSM_RC_NO_OWNER_REQD (2032) | Owner parameter must be NULL when passwordaccess is set to generate. |
DSM_RC_NO_NODE_REQD (2033) | Node parameter must be NULL when passwordaccess is set to generate. |
DSM_RC_WRONG_VERSION (2064) | The API version for the application client has a higher value than the TSM version. |
DSM_RC_PASSWD_TOOLONG (2103) | The password that was specified is too long. |
DSM_RC_NO_OPT_FILE (2220) | A configuration file could not be located. |
DSM_RC_INVALID_KEYWORD (2221) | A keyword that was specified in an options string is invalid. |
DSM_RC_PATTERN_TOO_COMPLEX (2222) | The include-exclude pattern is too complex for TSM to interpret. |
DSM_RC_NO_CLOSING_BRACKET (2223) | There is no closing bracket in the pattern. |
DSM_RC_INVALID_SERVER (2225) | For a multi-user environment, the server in the system configuration file was not found. |
DSM_RC_NO_HOST_ADDR (2226) | Not enough information to connect to host. |
DSM_RC_MACHINE_SAME (2227) | The nodename that is defined in the options file cannot be the same as the system host name. |
DSM_RC_NO_API_CONFIGFILE (2228) | Cannot open the configuration file. |
DSM_RC_NO_INCLEXCL_FILE (2229) | The include-exclude file was not found. |
DSM_RC_NO_SYS_OR_INCLEXCL (2230) | Either the dsm.sys file or the include-exclude file was not found. |