libnvmf\_context\_set\_config(9) libnvme API manual libnvmf\_context\_set\_config(9)

# [NAME](#NAME)

libnvmf\_context\_set\_config - Set the configuration for discovery

# [SYNOPSIS](#SYNOPSIS)

**void libnvmf\_context\_set\_config** **(struct libnvmf\_context \*fctx ,** **const struct libnvmf\_config \*config ,** **const struct libnvmf\_config\_conn \*conn );**

# [ARGUMENTS](#ARGUMENTS)

[fctx](#fctx)

Fabrics context of a discovery controller

[config](#config)

Resolved configuration, or NULL

[conn](#conn)

Connection of the discovery controller in *config*

# [DESCRIPTION](#DESCRIPTION)

**libnvmf\_discover** connects to the controllers in the discovery log page. With a configuration, a controller gets the KX-HMAC-CHAP secrets of the \[Subsystem] or \[Discovery Controller] section with its NQN. The section must be in the same file as *conn*.

If no section sets the host secret, the controller uses the host secret of the discovery controller. This is also what happens without a configuration. The controller secret comes only from a section.

The caller keeps ownership of *config* and *conn*. They must stay valid until **libnvmf\_discover** returns.

libnvmf\_context\_set\_config October 2026

---

Document: libnvmf_context_set_config-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
