...
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 the "LMX_OPT_HOSTID_COMPARE_FUNCTION" description in LMX_SetOption for details on setting this option.