---
name: "libnvmf_config_get_hostnqn-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_config_get_hostnqn-libnvme3"
---

# libnvmf\_config\_get\_hostnqn-libnvme3(2)

the top-level \[Host\] host NQN.

## NAME

libnvmf\_config\_get\_hostnqn - the top-level \[Host\] host NQN.

## SYNOPSIS

**const char \* libnvmf\_config\_get\_hostnqn** **(const struct libnvmf\_config \*config** *);*

## ARGUMENTS

- config

  the resolved configuration

## DESCRIPTION

The identity of the configuration's default persona, as written in the top-level file's \[Host\] section.  A drop-in's persona is deliberately not reachable here: it belongs to that drop-in's own connections.

Each connection already carries the identity it is made under, but a configuration may name a persona and configure no connections at all -- a host that only connects what it discovers.  This is how that identity is read.

## RETURN

borrowed string, valid while *config* is alive, or NULL when the top-level file names no host NQN (the caller falls back to the system identity in /etc/nvme/hostnqn).
