Versions Compared

Key

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

...

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

Example

You can use the following code to retrieve all the HostIDs with the LMX_HOSTID_IPADDRESS type that are currently in use and display them on success.

Code Block
languagecpp
#include <lmx.h>
#include <stdio.h>

LMX_HANDLE h;

int main() {
  char s[LMX_MAX_LONG_STRING_LENGTH];

  exit_on_error(LMX_Init(&h));
  exit_on_error(LMX_HostidSimple(h, LMX_HOSTID_IPADDRESS, s));
  printf("HostIDs found: %s\n", s);
  
  return 0;
}