---
name: "libnvmf_context_set_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_context_set_hostnqn-libnvme3"
---

# libnvmf\_context\_set\_hostnqn-libnvme3(2)

Set host NQN and host ID for context

## NAME

libnvmf\_context\_set\_hostnqn - Set host NQN and host ID for context

## SYNOPSIS

**int libnvmf\_context\_set\_hostnqn** **(struct libnvmf\_context \*fctx** *,* **const char \*hostnqn** *,* **const char \*hostid** *);*

## ARGUMENTS

- fctx

  Fabrics context

- hostnqn

  Host NQN

- hostid

  Host identifier

## DESCRIPTION

Sets the host NQN and host ID for the context.

## RETURN

0 on success, negative error code otherwise.
