VLSgeneratePermissionTicketExt2

Syntax

 LS_STATUS_CODE VLSgeneratePermissionTicketExt2 (void *vpRequest 
					         unsigned int uiStructSize, 
  						unsigned char *pucPermissionTicket, 
    					        unsigned int *pui16PermissionTicketLength); 
 					        
Argument Description
vpRequest

A void pointer to the structure containing request data. It can be any of the following:

>VPT_REQUEST_EXT2 - This structure allows specifying the locking information of one machine.

>VPT_REQUEST_EXT3 - This structure, introduced since v8.5.5, allows specifying locking information of more than one machine. The ulLockCodeSelector and pucLockInfo fields are defined as array. The maximum array size can be 11. This is useful in scenarios when license revocation is desired on License Managers in the redundant pool.

uiStructSize The size of the structure containing request data. It will vary depending on the structure chosen—VPT_REQUEST_EXT2 or VPT_REQUEST_EXT3.
pucPermissionTicket A pointer to the permission ticket generated. The memory needs to be allocated by the caller.
pui16PermissionTicketLength The length of the permission ticket to be generated.

Description

This function is used to generate a permission ticket in binary format for revoking network licenses, including redundant licenses.

The permission ticket generated is then encoded into Base64 and used for carrying out various operations like performing license string-based revocations and setting the deferred revocation period.

If the pucPermissionTicket argument is passed as NULL or its size is less than required, the function will return the required length in pui16permissionTicketLength. The caller needs to allocate the required memory and call the API function again.

See Also:

VLSverifyRevocationTicketExt

VLSverifyRevocationTicketExt2

VLScgDecodeLicenseRevocationTicketExt

Returns

The status code LS_SUCCESS is returned, if permission ticket is generated successfully. Otherwise, it will return the following error codes:

Error Code Description
VLScg_OLD_PT_GENERATION_UNSUPPORTED

Older PT generation is unsupported in the new API.

The older structures (VPT_REQUEST and VPT_REQUEST_EXT) cannot be passed in this API.

VLScg_RT_UNSUPPORTED_OPERATION_TYPE

>The operation type is not 'R'.

>Partial revocation is not supported.

>The permission ticket generation is being done for standalone licenses.

VLScg_RT_BUFFER_TOO_SMALL

The allocated memory is not enough.

VLScg_RT_PARAMETERS_ERROR

Invalid parameters, like below, are specified:

>vpRequest is NULL

>uiStructSize is invalid or 0

>pui16PermissionTicketLength is NULL

>Inner nested structure (pvRequestArrayExt) is NULL

VLScg_RT_MIXED_OPERATION_TYPE_UNSUPPORTED You cannot revoke standalone and network licenses using a single permission ticket.
VLScg_RT_RDNT_LIC_UNSUPPORED The permission ticket cannot be generated for revoking redundant licenses prior to v8.5.5. It is not supported with the VPT_REQUEST_EXT2 structure.
VLScg_TOO_MANY_OPERATIONS_FOR_SINGLE_PT

>The number of operations \ license lines specified in VPT_REQUEST_EXT2 structure exceed the maximum limit. You cannot specify more than 15 operations in a permission ticket for a network license revocation using VPT_REQUEST_EXT2 structure. For standalone licenses, the length of a permission ticket should not exceed 65535 bytes.

>When the recommendation regarding the maximum number of operation / license lines in VPT_REQUEST_EXT3 structure is not followed.

VLScg_VENDOR_ID_MISMATCH Vendor ID mismatch. The permission ticket cannot be generated for licenses of other vendors.
VLScg_CODGEN_VERSION_UNSUPPORTED The permission ticket generation not supported for licenses earlier than version 11.
VLScg_INVALID_LICENSE The license string is invalid. Hence, it could not be used for permission ticket generation.*

* Applicable v8.5.5 onward.