...
You cannot call API functions from the HostID callback functions. This will return the error LMX_API_NOT_REENTRANT.
See the hostid.c example code for details on HostID comparison usage. See LMX_OPT_HOSTID_COMPARE_FUNCTION in LMX_SetOption for details on setting this option.