Oct 05, 2020
03:14 PM
Is there a category of functions that can be safely called from within the callback, or is the issue due to the possibility of the callback returning non-zero, thus interrupting the normal checkout flow? In other words, does the possibility of a deadlock depend on what the callback does (in addition to possibly returning non-zero)?
... View more
Sep 25, 2020
02:33 AM
You can use the API lc_userlist .It Provides a list of who is using a feature, including information about the users of the license. This output is used by lmstat. You can refer to the fnp_FuncRef.pdf for further information on it.
... View more
Sep 24, 2020
04:11 AM
Below is an example of the code that can be added to get the below details
Checked out date and time
User who made the checkout
Number of licenses checked out
Name of the feature
Count of available license
Count of used license
Type of the feature
(void)lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE)LICPATH);
for (feats = lc_feat_list(lm_job, LM_FLIST_ALL_FILES | LM_FILTERLIST_ALL_FILES, NULL); feats && *feats; feats++)
{
confi = lc_get_config(lm_job, *feats);
if(confi->idptr && confi->idptr->id.data)
printf(" This feature is node-locked \n\n");
else
printf(" The feature is floating \n\n");
if (confi->users)
{
c = (CONFIG *)0;
for (conf = lc_next_conf(lm_job, *feats, &c); conf; conf=lc_next_conf(lm_job, *feats, &c))
{
fi.feat = conf;
if (lc_get_attr(lm_job, LM_A_VD_FEATURE_INFO, (short *)&fi))
{
lc_perror(lm_job, "LM_A_VD_FEATURE_INFO");
}
else
{
total_lic = fi.num_lic;
used_lic = fi.tot_lic_in_use;
aval_lic = total_lic - used_lic;
printf("Total number of licenses are %s = %d \n",feature, total_lic);
printf("Available Count of licenses are %s = %d \n",feature, aval_lic);
}
}
}
else
printf(" This feature is uncounted \n");
printf("##############################\n");
printf ("List of Users for Feature: %s\n",*feats);
printf("##############################\n");
LM_USERS * pUserList = lc_userlist(lm_job, *feats);
while (pUserList)
{
time_t currTime, difftime;
char *sTime = malloc(50 * sizeof(char));
struct tm *localtime(), *currt, *t;
if (strlen(pUserList->name) > 0)
{
int day = 0, hour = 0, minute = 0, second = 0;
currTime = time(0);
printf("User: %s Node: %s Licenses: %d \r\n", pUserList->name, pUserList->node, pUserList->nlic);
t = localtime(&pUserList->time);
printf("Checkout Done At - %02d/%02d %2d:%02d:%02d\n",
t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min,
t->tm_sec);
difftime = (currTime - (pUserList->time));
printf("Checked out from last - %02d days", ((difftime / 86400)));
difftime %= 86400;
printf("% 02d hours", (difftime / 3600));
difftime %= 3600;
printf("% 02d minutes", (difftime / 60));
difftime %= 60;
printf("% 02d seconds\n\n", difftime);
}
pUserList = pUserList->next;
if (pUserList && (!pUserList->name || strlen(pUserList->name) == 0))
pUserList = NULL;
}
}
printf("##############################\n");
printf("press return to exit...");
... View more
Sep 07, 2020
11:49 PM
This article is being written to bring a few points to everyone's attention related to the FlexNet Libraries complied with PIC( position-independent code)
In computing, position-independent code (PIC) or position-independent executable (PIE) is a body of machine code that, being placed somewhere in the primary memory, executes properly regardless of its absolute address.
PIC is commonly used for shared libraries, so that the same library code can be loaded in a location in each program address space where it will not overlap any other uses of memory (for example, other shared libraries).
Linux Platform
Makefile in Linux provided kits already have support for compiling with PIC.
There is dedicated section written in the Makefile under element shared_object.
The Makefile will build shared object with the command make shared_object.
By default, shared object is linked with FNP provided PIC libraries inside the kit.
Windows Platform
In the windows platform the dynamic library can be built with command as nmake DLL=1.
... View more
Sep 01, 2020
05:24 AM
GetFulfillmentsQueryRequest/GetFulfillmentPropertiesRequest takes in EntitlementID and returns any FNP licenses on the fulfillment The fulfillmentType parameter in the response can be used to differentiate between CERTIFICATE and TRUSTED STORAGE license. There is no straight forward way to differentiate between a Floating vs Nodelocked, except that the floating licenses will return a license text (if enabled in ResponseConfig) whereas a Nodelocked license does not have a license text. The licenseHost parameter in the response will have the host id details.
... View more
Aug 27, 2020
01:29 AM
Sample Code to get the expiration date of borrowed license
/**************************************************************************************************
* Copyright (c) 1997-2018 Flexera. All Rights Reserved.
**************************************************************************************************/
/*
*
* Description: This is a sample application program, to illustrate
* the use of the Flexible License Manager.
*
*/
#include "lmclient.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "lm_attr.h"
#include "lm_redir_std.h"
#ifdef PC
#define LICPATH "@localhost"
#else
#define LICPATH "@localhost:license.dat:."
#endif /* PC */
#define FEATURE "f1"
VENDORCODE code;
LM_HANDLE *lm_job;
LM_BORROW_STAT *s;
static void init(struct flexinit_property_handle **);
static void cleanup(struct flexinit_property_handle *);
int
main(int argc, char * argv[])
{
char feature[MAX_FEATURE_LEN * 2] = {'\0'};
struct flexinit_property_handle *initHandle = NULL;
int nlic = 1;
char expiration_date[100];
struct tm *tm;
init(&initHandle);
if (argc > 1)
{
nlic = atoi(argv[1]);
}
if (lc_new_job(0, lc_new_job_arg2, &code, &lm_job))
{
lc_perror(lm_job, "lc_new_job failed");
cleanup(initHandle);
exit(lc_get_errno(lm_job));
}
printf("Enter \"f1\" to demo floating functionality\n");
printf("Enter \"f2\" to demo node-locked functionality\n");
printf("Enter feature to checkout [default: \"%s\"]: ", FEATURE);
fgets(feature, MAX_FEATURE_LEN + 2, lm_flex_stdin()); /* add 2 for \n and \0 */
feature[strlen(feature) - 1] = '\0';
if(!*feature)
strcpy(feature, FEATURE);
(void)lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE)LICPATH);
lc_get_attr(lm_job, LM_A_BORROW_STAT, &s);
for(; s; s = s->next)
{
printf("Borrowed Feature is %s\n", s->feature);
tm = localtime(&s->end);
sprintf(expiration_date, "%d-%s-%02d %02d:%02d",
tm->tm_mday,
tm->tm_mon == 0 ? "Jan" :
tm->tm_mon == 1 ? "Feb" :
tm->tm_mon == 2 ? "Mar" :
tm->tm_mon == 3 ? "Apr" :
tm->tm_mon == 4 ? "May" :
tm->tm_mon == 5 ? "Jun" :
tm->tm_mon == 6 ? "Jul" :
tm->tm_mon == 7 ? "Aug" :
tm->tm_mon == 8 ? "Sep" :
tm->tm_mon == 9 ? "Oct" :
tm->tm_mon == 10 ? "Nov" : "Dec",
(tm->tm_year + 1900) % 2000,
tm->tm_hour, tm->tm_min);
printf("Expiration Date is %s\n",expiration_date);
getchar();
break;
}
if(lc_checkout(lm_job, feature, "1.0", nlic, LM_CO_NOWAIT, &code, LM_DUP_NONE))
{
lc_perror(lm_job, "checkout failed");
cleanup(initHandle);
exit (lc_get_errno(lm_job));
}
printf("%s checked out...", feature);
printf("press return to exit...");
/*
* Wait till user hits return
*/
getchar();
lc_checkin(lm_job, feature, 0);
lc_free_job(lm_job);
cleanup(initHandle);
return 0;
}
static void init(struct flexinit_property_handle **handle)
{
#ifndef NO_ACTIVATION_SUPPORT
struct flexinit_property_handle *ourHandle = NULL;
int stat;
if ((stat = lc_flexinit_property_handle_create(&ourHandle)))
{
fprintf(lm_flex_stderr(), "lc_flexinit_property_handle_create() failed: %d\n", stat);
exit(1);
}
if ((stat = lc_flexinit_property_handle_set(ourHandle,
(FLEXINIT_PROPERTY_TYPE)FLEXINIT_PROPERTY_USE_TRUSTED_STORAGE,
(FLEXINIT_VALUE_TYPE)1)))
{
fprintf(lm_flex_stderr(), "lc_flexinit_property_handle_set failed: %d\n", stat);
exit(1);
}
if ((stat = lc_flexinit(ourHandle)))
{
fprintf(lm_flex_stderr(), "lc_flexinit failed: %d\n", stat);
exit(1);
}
*handle = ourHandle;
#endif /* NO_ACTIVATION_SUPPORT */
}
static void cleanup(struct flexinit_property_handle *initHandle)
{
#ifndef NO_ACTIVATION_SUPPORT
int stat;
if ((stat = lc_flexinit_cleanup(initHandle)))
{
fprintf(lm_flex_stderr(), "lc_flexinit_cleanup failed: %d\n", stat);
}
if ((stat = lc_flexinit_property_handle_free(initHandle)))
{
fprintf(lm_flex_stderr(), "lc_flexinit_property_handle_free failed: %d\n", stat);
}
#endif /* NO_ACTIVATION_SUPPORT */
}
... View more
Labels:
Aug 20, 2020
12:22 AM
1 Kudo
Error
Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory)
Description
1.The certificate codebase is littered with explicit references to temporary file locations ( under "/tmp", "/usr/tmp" & "/var/tmp" ). 2.There is a particular reliance on the existence of "/usr/tmp" which is a bug.
3.The error will be seen only when /usr/tmp directory is not available in the system.
4.This error can be encountered while starting the lmgrd.
Example
16:02:58 (che) TCP_NODELAY NOT enabled 16:02:58 (che) Listener Thread: running 16:03:56 (che) Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory) 16:04:56 (che) Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory) 16:05:56 (che) Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory) 16:06:56 (che) Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory) 16:07:56 (che) Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory) 16:08:56 (che) Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory)
Workaround
1.Create /usr/tmp either as a directory in its own right or as a symbolic link to / var / tmp. 2.Most of the time systems have /usr/tmp folder and everything works fine.
3. This directory is used to write some temporary data
4. It is known that FlexLM has references to temp directories like this and the issue will be fixed in future releases.
... View more
Aug 12, 2020
04:20 AM
Background
11.17 onwards a new functionality of Message Diagnostic was introduced .These messages are intended used to diagnose technical problems that occur During the debugging process, the diagnostic text is usually communicated among several organizations. Therefore, for consistency and accuracy of support,the text in these messages is in English, as is customary in other software applications.
Issue
“DPLT: waiting for logger to connect” message overloads the sever log, by logging multiple times and consumes machine space as part of these messages.
Workaround
To Disable these diagnostic messages if required ,set the below parameters
ls_diagnostics_enabled=0 at server side and LM_A_DIAGS_ENABLED=0 at client side
Fix
The issue has been fixed in 11.17.1(2020 R3),hence if 11.17 is being used then go ahead and upgrade to 11.17.1
... View more
Aug 06, 2020
01:21 AM
The attached sample code suffice the requirement to activate multiple vendor defined hostid.
In example code, two VDH (VDH and VDH1) are defined.We can use any of these to node lock the license server.
/**************************************************************************************************
* Copyright (c) 1997-2016, 2018 Flexera. All Rights Reserved.
**************************************************************************************************/
/*
* Description: Example Vendor-defined hostid implementation for
* FlexNet Licensing
*
* Parameters: (misc)
*
* Return: (misc)
*
* M. Christiano
* 11/14/2000 wh/tw
*
* x_flexlm_newid -- call this function just after lc_init()
* from your application, and also in your
* license generator (e.g., lmcrypt.c), and
* your vendor daemon. To do this in the vendor
* daemon, add the following to lsvendor.c:
*
* void x_flexlm_newid();
* void (*ls_user_init1)() = x_flexlm_newid;
*
*
* All programs that call this function MUST
* have a variable (LM_HANDLE *) lm_job that points
* to the current job. If your job handle is not
* called lm_job, make one that points to it.
*/
#include "lmclient.h"
#include "lm_attr.h"
#include "string.h"
extern LM_HANDLE *lm_job; /* This must be the current job! */
/* This example returns only 1 hostid */
#define VENDEF_ID_TYPE HOSTID_VENDOR+1
#define VENDEF_ID_LABEL "VDH"
#define VENDEF_ID "12345678"
#define VENDEF_ID_TYPE1 HOSTID_VENDOR+2
#define VENDEF_ID_LABEL1 "VDH1"
#define VENDEF_ID1 "87654321"
/*
* x_flexlm_gethostid() - Callback to get the vendor-defined hostid.
* (Sorry about all the windows types for this function...)
*/
HOSTID *
#ifdef PC
LM_CALLBACK_TYPE
#endif /* PC */
/*
* IMPORTANT NOTE: This function MUST call l_new_hostid() for
* a hostid struct on each call.
* If more than one hostid of a type is
* found, then call l_new_hostid for each
* and make into a list using the `next' field.
*/
x_flexlm_gethostid(idtype)
short idtype;
{
HOSTID *h = l_new_hostid();
memset(h, 0, sizeof(HOSTID));
if (idtype == VENDEF_ID_TYPE)
{
h->type = VENDEF_ID_TYPE;
strncpy(h->id.vendor, VENDEF_ID, MAX_HOSTID_LEN); /* LONGNAMES */
h->id.vendor[MAX_HOSTID_LEN] = 0;
return(h);
}
else if (idtype == VENDEF_ID_TYPE1)
{
h->type = VENDEF_ID_TYPE1;
strncpy(h->id.vendor, VENDEF_ID1, MAX_HOSTID_LEN); /* LONGNAMES */
h->id.vendor[MAX_HOSTID_LEN] = 0;
return(h);
}
return((HOSTID *) NULL);
}
void
x_flexlm_newid(id)
HOSTID *id;
{
LM_VENDOR_HOSTID h;
LM_VENDOR_HOSTID h1;
memset(&h, 0, sizeof (h));
h.label = VENDEF_ID_LABEL;
h.hostid_num = VENDEF_ID_TYPE;
h.case_sensitive = 0;
h.get_vendor_id = x_flexlm_gethostid;
if (lc_set_attr(lm_job, LM_A_VENDOR_ID_DECLARE, (LM_A_VAL_TYPE)&h))
lc_perror(lm_job, "LM_A_VENDOR_ID_DECLARE FAILED");
memset(&h1, 0, sizeof (h1));
h1.label = VENDEF_ID_LABEL1;
h1.hostid_num = VENDEF_ID_TYPE1;
h1.case_sensitive = 0;
h1.get_vendor_id = x_flexlm_gethostid;
if (lc_set_attr(lm_job, LM_A_VENDOR_ID_DECLARE, (LM_A_VAL_TYPE) &h1))
lc_perror(lm_job, "LM_A_VENDOR_ID_DECLARE FAILED");
}
... View more
Jul 28, 2020
04:20 AM
With MAX_CONNECTIONS value set(A), license administrator can set the limit on number of connections(of any type) which can be established with vendor daemon.
In case, MAX_CONNECTIONS value set(B), is greater than soft limit(A) on the machine then soft limit value supersedes the MAX_CONNECTIONS value(B). Following code snippet provides the value to vendor daemon on the soft limit : -
getrlimit(RLIMIT_NOFILE, &openFdLimit);
fdLimit = ( int ) openFdLimit.rlim_cur;
Vendor daemon reserves(RU) 30 connections for important FNP utilities(lmreread, lmstat etc.) so to avoid outage while using them. It means if value of A is 100 then number of client connections which can be established with vendor daemon is B(70) = A(100) - 30(RU).
In case point 2) is valid then another 30 connections vendor daemon reserves(RV) for itself. In that case, B(40) = A(100) -30(RU) - 30(RV)
Value of A cannot be less than 31.
Utilities can also use buffer (B) until it is not exhausted. Buffer(RU) will only be used once (B) is exhausted.
Vendor daemon functionality keeps increment the counter on every socket connection.
Once number of connections exceeding 80% of the threshold limit(B), vendor daemon starts displaying warning messages on every successive socket connection.
Once number of connection established with vendor daemon reached to threshold limit(B), further all connection request will be dropped(exception utilities), until some the established connections are dropped.
... View more
Labels:
Jul 17, 2020
05:25 AM
Error
Unable to find FNP security runtime shared object ,Unable to initialize FNP runtime, error 1
Scenario
The error was encountered while building the 3 Server -Trusted Storage setup and creating a triad license file on the primary license Server with the command
3serverconfig.exe -r Primary licfile=<shared>\triad.lic from the 3serverconfig directory.
Resolution
1.Set the LD_LIBRARY_PATH to the platform Directory.
2.Make sure the Dll (3serverconfig_libFNP.dll) has got correctly generated in the location Platform Dir>3-server>3serverconfig while building the toolkit.
3.If the Dll is not generated in the directory Platform Dir>3-server>3serverconfig, then go ahead and change the installpath in 3-server config.xml, to ./3-server/3serverconfig or copy the 3serverconfig_libFNP.dll from any location where it is created in the toolkit to the directory Platform Dir>3-server>3serverconfig.
... View more
Jul 13, 2020
04:50 AM
The below fields can be used for changing the validation criteria of a user’s password for security purpose as per requirement.
1.Go to System->Configure->Validators.
2.Configuration for Validators Provided by FlexNet Application.
1) User Password Length: Minimum number of characters allowed for user password if default password validator is used.
2) User Password Requires Uppercase Character: Select to require uppercase character in user password if default password validator is used.
3) User Password Requires Numeric Character: Select to require numeric character in user password if default password validator is used.
4) Temporary password timeout: Number of minutes a temporary password is valid for since the time it was generated. 0 implies no expiration.
... View more
Jul 03, 2020
03:56 AM
Below is the sample code(lmflex.c) which gives the details of the license file being used by the license server
/******************************************************************************
Copyright (c) 1988-2008 Acresso Software Inc. All Rights Reserved This software has been provided pursuant to a License Agreement containing restrictions on its use. This software contains valuable trade secrets and proprietary information of Acresso Software Inc. and is protected by law. It may not be copied or distributed in any form or medium, disclosed to third parties, reverse engineered or used in any manner not provided for in said License Agreement except with the prior written authorization from Acresso Software Inc.
*****************************************************************************/ /* * * Description: This is a sample application program, to illustrate * the use of the Flexible License Manager. * */
#include <stdio.h> #include "lmclient.h" #include "lm_attr.h"
int main(int argc, char * argv[]) { VENDORCODE code; LM_HANDLE *lm_job; char **feats; int i=0, ret=0; CONFIG *pos = 0, *conf;
if (lc_new_job(0, lc_new_job_arg2, &code, &lm_job)) { lc_perror(lm_job, "lc_new_job failed"); exit(lc_get_errno(lm_job)); }
lc_set_attr(lm_job, LM_A_PORT_HOST_PLUS, (LM_A_VAL_TYPE)0); (void) lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE)"27000@localhost");
for (feats = lc_feat_list(lm_job, LM_FILTERLIST_ALL_FILES, NULL); feats && *feats; feats++) {
pos = 0; conf = 0; while (conf = lc_next_conf(lm_job, *feats, &pos)) { printf("\n\n Got some config information:\n"); printf("Feature: %s\n", conf->feature); printf("\n\t\t Exp date is %s", conf->date); printf("\n\t\t Version is %s", conf->version); printf("\n\t\t code is %s", conf->code); } } lc_free_job(lm_job); return 0; }
... View more
Labels:
Jun 26, 2020
06:11 AM
1.Go to System->Configure->FlexNet Platform Server
2.Enter the Number of attempts to log in "Consecutive Failed Authentication" after which the user will be deactivated.
3. Attempts are counted over time period for failed authorizations. For a Shared Login, the number of attempts considered is twice this configuration.
... View more
Jun 16, 2020
02:28 AM
Use Case
A node-locked license activated on a machine is only able to be used by one user.
When the second user tries to log in and activate the license using the same web register keys used by the 1 st user they receive an error “license is invalid”.
Error
License is invalid
Type of Licensing
FlexNet Embedded
Possible Causes
1.The license could be associated to ethernet ID as shown below, which might have been changed when the 2 nd user logged in.
2.The quantity assigned to the entitlement associated with the device might be 1 ,which has to be increased further if multiple users want to activate the license on the same device.
... View more
Latest posts by jyadav
Subject | Views | Posted |
---|---|---|
32 | Feb 02, 2023 12:24 AM | |
33 | Jan 31, 2023 03:22 AM | |
65 | Jan 26, 2023 05:21 AM | |
77 | Jan 24, 2023 04:12 AM | |
82 | Jan 24, 2023 02:54 AM | |
116 | Jan 24, 2023 01:48 AM | |
123 | Jan 23, 2023 07:01 AM | |
134 | Jan 23, 2023 02:29 AM | |
93 | Jan 15, 2023 03:47 AM | |
139 | Jan 09, 2023 04:46 AM |
Activity Feed
- Posted Error LNK2001: unresolved external symbol "struct _iobuf * __cdecl lm_flex_stdin(void)" (?lm_flex_stdin@@YAPEAU_iobuf@@XZ) on FlexNet Publisher Knowledge Base. Feb 02, 2023 12:24 AM
- Posted Re: Crash with 11.19.2 on FlexNet Publisher Forum. Jan 31, 2023 03:22 AM
- Posted Re: Support for License key validation on Flex application on FlexNet Publisher Forum. Jan 26, 2023 05:21 AM
- Got a Kudo for Re: Multiple versions for same Feature name in single license file. Jan 24, 2023 12:03 PM
- Got a Kudo for Re: Need help choosing and buying a product. Jan 24, 2023 05:33 AM
- Posted Re: Need help choosing and buying a product on FlexNet Publisher Forum. Jan 24, 2023 04:12 AM
- Posted Re: Need help choosing and buying a product on FlexNet Publisher Forum. Jan 24, 2023 02:54 AM
- Posted Re: Multiple versions for same Feature name in single license file on FlexNet Publisher Forum. Jan 24, 2023 01:48 AM
- Posted Re: Multiple versions for same Feature name in single license file on FlexNet Publisher Forum. Jan 23, 2023 07:01 AM
- Posted Re: Multiple versions for same Feature name in single license file on FlexNet Publisher Forum. Jan 23, 2023 02:29 AM
- Posted Re: Receiving "Error LNK2001: unresolved external symbol "struct _iobuf * __cdecl lm_flex_stdin(void)" (?lm_flex_stdin@@YAPEAU_iobuf@@XZ) on FlexNet Publisher Forum. Jan 15, 2023 03:47 AM
- Posted Re: Need help choosing and buying a product on FlexNet Publisher Forum. Jan 09, 2023 04:46 AM
- Posted Re: How to purchace a licence for FlexNet Publisher ? on FlexNet Publisher Forum. Jan 09, 2023 04:45 AM
- Posted VM_UUID Detection Mechanism in Azure on FlexNet Publisher Knowledge Base. Dec 22, 2022 04:56 AM
- Posted lmhostid Output Change / Mac Address Extraction on FlexNet Publisher Knowledge Base. Dec 16, 2022 05:16 AM
- Posted 32-bit FNP kit and lmadmin Support on FlexNet Publisher Knowledge Base. Dec 15, 2022 01:15 AM
- Posted Re: Multiple licenses hosting on same License server on FlexNet Publisher Forum. Dec 09, 2022 01:42 AM
- Posted Re: Multiple licenses hosting on same License server on FlexNet Publisher Forum. Dec 08, 2022 11:58 PM
- Posted Re: Switching from 32 to 64 Bit on FlexNet Publisher Forum. Dec 02, 2022 08:13 AM
- Posted DUP_DISPLAY explained for Windows and Linux on FlexNet Publisher Knowledge Base. Dec 02, 2022 01:48 AM