---
name: "libnvmf_context_set_config-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_config-libnvme3"
---

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

Set the configuration for discovery

## NAME

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

## SYNOPSIS

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

## ARGUMENTS

- fctx

  Fabrics context of a discovery controller

- config

  Resolved configuration, or NULL

- conn

  Connection of the discovery controller in *config*

## 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.
