Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On failure, this function returns an error code in the format described in Return codes.

Remarks

When using LMX_HOSTID_ALL, all HostIDs are returned, with the HostID type prefixing the HostID; for example, "ETHERNET=0123456789012345,USERNAME=MyUserName,HOSTNAME=MyHostName,...", etc. Otherwise, the HostID is returned without the HostID type prefixing the HostID; for example, for HostID type LMX_HOSTID_ETHERNET, the string in the preceding example would appear as "0123456789012345".

...

LMX_HOSTID Hostids[LMX_MAX_HOSTIDS];
int nHostids;
int i, j;
LMX_Hostid(LmxHandle, LMX_HOSTID_ETHERNET, Hostid, &nHostids);
for (i = 0; i < nHostids; i++)
  printf("Hostid: %s\n", Hostid[i].szValue);

To make use of custom HostIDs, you must set a callback function using LMX_SetOption with the flag LMX_OPT_CUSTOM_HOSTID_FUNCTION.