---
name: "libnvmf_config_get_discovered_params-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_discovered_params-libnvme3"
---

# libnvmf\_config\_get\_discovered\_params-libnvme3(2)

discovered controller parameters.

## NAME

libnvmf\_config\_get\_discovered\_params - discovered controller parameters.

## SYNOPSIS

**int libnvmf\_config\_get\_discovered\_params** **(const struct libnvmf\_config \*config** *,* **const char \*hostnqn** *,* **bool is\_dc** *,* **const char \*nqn** *,* **const struct libnvmf\_params \*\*params** *);*

## ARGUMENTS

- config

  the resolved configuration

- hostnqn

  the host NQN that selects the file, or NULL for the top-level file

- is\_dc

  true for a discovery controller, false for an I/O controller

- nqn

  the NQN of the discovered controller, or NULL

- params

  set to the parameters, valid while *config* is alive

## DESCRIPTION

A controller found through discovery has no section in the configuration. Its parameters come from one file: the file whose \[Host\] section has *hostnqn*. For a controller found through a discovery controller of *config*, use **libnvmf\_config\_conn\_get\_hostnqn** of that discovery controller's connection.

The parameters are the defaults of that file for a discovery controller or an I/O controller. If the file also has a section with nqn = *nqn*, its kxchap-secret and kxchap-ctrl-secret replace the defaults. That section is a \[Discovery Controller\] section if *is\_dc* is true, a \[Subsystem\] section otherwise. Its controller= lines do not matter. A section with the well-known discovery NQN never matches.

## RETURN

0 on success, -EINVAL if *config* or *params* is NULL, or -ENOENT if no file of *config* has *hostnqn*.
