sntl_licensing_get_session_info Supported in On-premises modeSupported in Lease modeSupported in Connected (Cloud LM) mode

Library Information

>This API belongs to the Sentinel RMS licensing library.

>The corresponding header is licensing.h.

Description

This API provides session-related information in XML format.

NOTE   From RMS v9.5 onwards, query version 1.1 has been introduced to support license hard limit up to 4,294,967,294. This is applicable to license version 20 and above. The SNTL_SESSIONINFO_LATEST macro is introduced to extract the latest query version.

Version Compatibility

Prior to Sentinel RMS v9.5, you had to manually enter the query version at the time of compiling the application. For example, SNTL_SESSIONINFO_VERSION(v); where 'v' represents the query version for the installed SDK.

From Sentinel RMS v9.5 onwards, we have introduced macros for automating this task. When the application is compiled, it automatically takes the latest query version from the header file that is used. For example, for the license info query, when you compile your application using the SNTL_SESSIONINFO_LATEST macro, the latest query version is automatically entered by the application.

Argument Description
login_session [in] Pointer to the login session object returned by the corresponding login call.
query [in]

Type of query. The supported versions are 1.0 and 1.1.

info [out] Query response in XML format.

See the XML Template below for more details about the query and info templates.

Query

<?xml version="1.0" encoding="UTF-8"?>
<sentinelQuery query="sessionInfo" version="1.1"/>

Info

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<sessionInfo>
	    <featureName>F1</featureName>
	    <featureVersion>V1</featureVersion>
	    <serverName>localhost</serverName>
	    <lastErrorStatus>0</lastErrorStatus>
	    <keyTimeLeftInSecs>300</keyTimeLeftInSecs>
	    <tokensInUse>1</tokensInUse>
	    <driftTime>0</driftTime>
	    <chalRespAuthentication>
		           <response>
			       ...  
		</response>
		    
	</chalRespAuthentication>
	    <refreshStatus>string</refreshStatus> 
</sessionInfo>
Element Description
featureName The name of the feature.
featureVersion The version of the feature.
serverName The name of the License Manager.
lastErrorStatus The last return status for the specified session.
keyTimeLeftInSecs Indicates the time interval for which the license token (at the server) will remain valid. After the expiry of this interval, the server reclaims the license token. The value of this attribute can be a negative number.
tokensInUse

Details about the license in use.

From RMS 9.5 onwards, query v1.1 supports license hard limit up to 4,294,967,294. This is applicable to license version 20 (or above). For license version less than 20, maximum supported value will be 2,097,150.

driftTime If the time properties of the client and License Manager are not in sync, it returns the difference (in seconds) between the estimated current time on the Network License Server and the estimated time on the client. The estimation error is usually the network latency time.
chalRespAuthentication

In challenge-response, the License Manager associates a secret with a feature, provided by the license code. The application also contains this secret. In the License Manager validation process, an application will “challenge” the License Manager with a data string. The License Manager computes a response according to the arranged algorithm, the values, data, and secret, which it returns. The client application locally computes the expected response using data and secret, and verifies that the expected response matches the response returned by the License Manager.

This field is introduced in Sentinel RMS SDK v9.1.0.

refreshStatus Returns any of the following information regarding the status of the last operation to refresh a license:

>Local - The license was refreshed locally. A License Manager was not contacted for refreshing the license.

>Remote - The License Manager was contacted to refresh the license.

>SNTL_NO_REFRESH_SO_FAR (Default) - The license has not been refreshed till now.

Returns

The status code SNTL_SUCCESS is returned, if successful. Otherwise, an error code is returned indicating the reason for failure.

Error Code Description
SNTL_INVALID_LOGIN_SESSION Invalid session object.

For the complete list of error codes, refer to Licensing Library Error and Result Codes.