This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Publisher
- :
- FlexNet Publisher Forum
- :
- composite id from string
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2009
12:18 PM
composite id from string
I would like to generate a composite id from a string given on stdin (or environment variable, file content), but not directly from the hardware of the current system.
Let's say, I want to build my composite id only from the ethernet id (HOSTID_ETHER), but I first want to check the ethernet ids given from the customer, e.g. if they come from a virtual machine. Since I cannot "decrypt" a composite id to get the ethernet id, I'd like to ask the customer to send me just the ethernet id.
So I have given the ethernet id as a text string, how to produce a composite id out of it?
I tried building a composite id from a vendor id, but this won't produce the same results. Given e.g. a ethernet id 00:11:22:33:44:55, I tried to supply "00:11:22:33:44:55" or "001122334455" as h->id.vendor in x_flexlm_gethostid(). Is there some api call like lc_hostid_from_string()?
Thanks in advance for any advice,
Frank
Let's say, I want to build my composite id only from the ethernet id (HOSTID_ETHER), but I first want to check the ethernet ids given from the customer, e.g. if they come from a virtual machine. Since I cannot "decrypt" a composite id to get the ethernet id, I'd like to ask the customer to send me just the ethernet id.
So I have given the ethernet id as a text string, how to produce a composite id out of it?
I tried building a composite id from a vendor id, but this won't produce the same results. Given e.g. a ethernet id 00:11:22:33:44:55, I tried to supply "00:11:22:33:44:55" or "001122334455" as h->id.vendor in x_flexlm_gethostid(). Is there some api call like lc_hostid_from_string()?
Thanks in advance for any advice,
Frank
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2009
03:50 PM
I haven't tried it, but as a test, does a composite-hostid-based-on-vendor-defined-hostid work if you mimic one of the string types, such as HOSTID_USER?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 02, 2009
03:20 AM
First I tried
which returns "USER=frank" for buf.
yields "COMPOSITE=FF609E9F8F76". But
will lead to "COMPOSITE=215938A349A8" :confused:
lc_new_job(...);
lc_hostid(lm_job, HOSTID_USER, buf);
which returns "USER=frank" for buf.
lc_init_simple_composite(lm_job, {HOSTID_USER}, 1);
lc_hostid(lm_job, HOSTID_COMPOSITE, buf);
yields "COMPOSITE=FF609E9F8F76". But
x_flexlm_newid();
lc_init_simple_composite(lm_job, {HOSTID_VENDOR}, 1);
lc_hostid(lm_job, HOSTID_COMPOSITE, buf);
/* using examples/vendor_hostid/vendor_hostid.c as template with */
h.get_vendor_id = x_flexlm_gethostid;
/* in x_flexlm_newid() and setting */
strncpy(h->id.vendor, "frank", MAX_HOSTID_LEN);
/* in x_flexlm_gethostid() */
will lead to "COMPOSITE=215938A349A8" :confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 02, 2009
09:53 AM
What is your custom keyword (the h.label or VENDEF_ID_TYPE string)? In any case, it might be that the hostid type is incorporated into the composite hostid hash, just as "USER=Something" and "HOSTNAME=Something" would presumably have different composites/hashes.
Depending on what you're doing, can you just always use your vendor-defined hostid type, where the validation side it gets its value from lc_hostid?
Depending on what you're doing, can you just always use your vendor-defined hostid type, where the validation side it gets its value from lc_hostid?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 03, 2009
12:25 AM
RobertDickau wrote:
... In any case, it might be that the hostid type is incorporated into the composite hostid hash, just as "USER=Something" and "HOSTNAME=Something" would presumably have different composites/hashes.
Depending on what you're doing, can you just always use your vendor-defined hostid type, where the validation side it gets its value from lc_hostid?
Yes, I see. Many thanks for this detailed answer!
Frank
