libnvme_get_host(9) libnvme API manual libnvme_get_host(9)

libnvme_get_host - Returns a host object

int libnvme_get_host (struct libnvme_global_ctx *ctx , const char *hostnqn , const char *hostid , struct libnvme_host **h );

struct libnvme_global_ctx object
Host NQN (optional)
Host ID (optional)
struct libnvme_host object to return

Returns a host object based on the hostnqn/hostid values or the default if hostnqn/hostid are NULL.

0 on success, negative error code otherwise.

libnvme_get_host September 2026