VLSdiscoverExt
Syntax
int VLSdiscoverExt
(
unsigned char *feature name,
unsigned char *version,
unsigned char *unused1,
int *num_servers,
VLSdiscoverInfo *discoverInfo,
int optionFlag,
int sharing_crit,
char *vendor_list
);
Argument | Description |
feature_name |
Name of the feature. |
version |
Version of the feature. Must be unique. |
unused1 |
Should be NULL. |
num_servers |
Number of License Managers for which discoverInfo array is allocated. |
discoverInfo |
The core function that receives the broadcast message, splits, and puts the License Manager’s name in array format. VLSdiscoverInfoExt structure is introduced in Sentinel RMS v9.5 and will contain the requested information. |
option_Flag |
The option flag is allowed to be logically ORed with other flags. However, this flag will have first priority. Valid flags are: >VLS_DISC_NO_USERLIST – By default, it first checks the LSFORCEHOST environment variable. If LSFORCEHOST doesn’t exist, it reads the list specified by the user in the vendor_list. If this option is used, the LSHOST environment variable is ignored. >VLS_DISC_RET_ON_FIRST – If the combined query list is NULL, it returns the name of the first contacted License Manager in the server_list, as soon as it is contacted by any of the License Managers. Otherwise, it returns the name of the first contacted License Manager specified in the combined query list. If this option is not specified. VLSdiscover returns all the License Managers that responded. >VLS_DISC_PRIORITIZED_LIST – Treat the combined query list as a prioritized one, left most being the highest priority host. It returns in server_list, License Managers sorted in the order of priority host. If this option is not specified, the combined query list is treated as random. >VLS_DISC_REDUNDANT_ONLY – Expecting reply only from redundant License Managers. All non-redundant License Managers will ignore the message. >VLS_DISC_DEFAULT_OPTIONS – This flag is a combination of the aforementioned flags. Use it if you are not sure which flag you want to specify. If this option is used, this function performs a broadcast to find the License Manager. |
sharing_crit |
The License Manager will match client’s internal information with the keys it is already granted. Values are: >VLScg_NO_SHARING >VLScg_USER_SHARING >VLScg_HOSTNAME_SHARING >VLScg_XDISPLAY_SHARING >VLScg_VENDOR_SHARING |
vendor_list |
Consists of the License Manager names. These license serves will be contacted. The names of all the License Managers that have licenses for specified feature_name and version will be returned in vendor_list in the same order as in the original (before the call) vendor_list. |
Description
Returns information of the License Manager which has the license tokens for a specified feature and version. The client can specify a License Manager preference based on some criteria.
Each License Manager that is contacted will determine if it has a license that matches the requested feature name and version. If found, the License Manager will then notify the client with the following information:
>Protocol supported
>Total number of clients connected to the License Manager
>License Manager IP address
>Number of units/tokens available
>Whether this client has already been granted a license for the feature and version (based on sharing_crit)
Returns
The status code LS_SUCCESS is returned if standalone library is used. Otherwise, it will return the following error codes:
Error Code |
Description |
VLS_CALLING_ERROR |
num_servers is less than or equal to zero. |
VLS_NO_RESPONSE_TO_ BROADCAST |
License Managers have not responded. |
LS_NO_SUCCESS |
Generic error indicating the License Manager’s characteristic information could not be retrieved. |
LS_NORESOURCES |
An error occurred in attempting to allocate memory needed by this function. |
LS_BAD_PARAMETER |
License Manager’s name is NULL or an empty string. |
LS_SERVER_DOES_NOT_ EXIST |
Named License Manager does not exist. |
LS_LEADER_NOT_KNOWN |
Leader name is not known. |
LS_NON_REDUNDANT_ SERVER_CONTACTED |
The License Manager contacted is non-redundant, and does not support this function. |
LS_UNRESOLVED_SERVER_NAME |
License Manager’s name is not resolvable. |
VLS_LEADER_NOT_ PRESENT |
Leader name is not known. |
VLS_NON_REDUNDANT_ SERVER |
The License Manager contacted is non-redundant, and therefore does not support this function. |
For a complete list of the error codes, see Licensing Library Error and Result Codes.