VLSinitMachineID

Syntax

LS_STATUS_CODE  VLSinitMachineID (VLSmachineID	 *machineID ); 	 	 
Argument Description
machineID

User allocated structure where the machine ID will be maintained.

Description

Initializes the fields of the machineID data structure to the default fingerprint values of the current host.

The License Manager uses the following data structure to define the characteristics of a machine.

typedef struct {	 	 
                  unsigned long        id_prom;
                  char                 ip_addr[VLS_MAXLEN];
                  unsigned long        disk_id;
                  char                 host_name[VLS_MAXLEN];
                  char                 ethernet[VLS_MAXLEN];
                  char                 portserv_addr[VLS_MAXLEN];
                  unsigned long        custom;
                  unsigned long        reserved;
                  char                 cpu_id;
                  VLScustomEx          customEx;
                  char                 hard_disk_serial[VLS_MAXLEN];
                  char                 cpu_info[VLS_MAX_CPU_INFO_LEN + 1];
                  char                 uuid[VLS_MAX_UUID_LEN + 1];
                  unsigned long        unused2;
} VLSmachineID;	 	 

 

The structure is called the machineID, and the contents of the first 11 fields are called the fingerprint for the machine to which the contents apply. In practice, a vendor may choose to use some subset of these fields for a given machine. To specify which fields are to be used, a flag word called a lock_selector is defined. A lock selector is a number which sets aside one bit for each fingerprinting element type. Each bit designates a locking criterion, and the lock selector represents the fingerprint elements for a given machine.

The machine ID and lock selector are inputs to the license generator and encrypted to create a locking code which then becomes part of the license that authorizes use of an application. When a license is requested by the application, a fingerprint for the machine is calculated and used to create a locking code. This must compare favorably with its counterpart in the license before execution of the application can be authorized.

NOTE   A lock selector does not describe the fingerprint, it only designates which fields in the machine ID are to be used to specify the fingerprint.

The masks which define each locking criterion are given below.

#define VLS_LOCK_ID_PROM  	       0x1
#define VLS_LOCK_IP_ADDR 		0x2
#define VLS_LOCK_DISK_ID 		0x4
#define VLS_LOCK_HOSTNAME 		0x8
#define VLS_LOCK_ETHERNET 		0x10
#define VLS_LOCK_NW_SERIAL 		0x40
#define VLS_LOCK_PORTABLE_SERV 	0x80
#define VLS_LOCK_CUSTOM 		0x100
#define VLS_LOCK_CUSTOM_EX 		0x400
#define VLS_LOCK_HARD_DISK_SERIAL 	0x800
#define VLS_LOCK_CPU_INFO       	0x1000
#define VLS_LOCK_UUID           	0x2000

 

The mask that defines all locking criteria is:

#define VLS_LOCK_ALL0xFFF 

The customEx lock selector uses the following data structure to define the value of the extended custom locking criteria.

typedef struct _vlscustomEx {  
		unsigned char customEx[VLS_CUSTOMEX_SIZE];
		int len;} 
VLScustomEx;

 

NOTE   The maximum size of the extended custom locking code can be 64-bytes.

Returns

The status code, LS_SUCCESS, is returned if successful. Otherwise, it will return the following error codes:

Error Code Description

VLS_CALLING_ERROR

machineID is NULL.

VLS_RESOURCE_LOCK_FAILURE

Failed to fetch the API resource lock. On receiving this error, retry calling this API.

For a complete list of the error codes, see Licensing Library Error and Result Codes.