---
name: "libnvmf_generate_hostnqn_from_hostid-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvmf_generate_hostnqn_from_hostid-libnvme3"
---

# libnvmf\_generate\_hostnqn\_from\_hostid-libnvme3(2)

Generate a host nqn from host identifier

## NAME

libnvmf\_generate\_hostnqn\_from\_hostid - Generate a host nqn from host identifier

## SYNOPSIS

**char \* libnvmf\_generate\_hostnqn\_from\_hostid** **(struct libnvme\_global\_ctx \*ctx** *,* **char \*hostid** *);*

## ARGUMENTS

- ctx

  struct libnvme\_global\_ctx object

- hostid

  Host identifier

## DESCRIPTION

If *hostid* is NULL, the function generates it based on the machine identifier.

## RETURN

On success, an NVMe Qualified Name for host identification. This name is based on the given host identifier. On failure, NULL.
