LIBNVMF_CONFIG_GET_DISCOVERED_PARAMS-LIBNVME3(2)
π¦ libnvmf_config_get_discovered_params(9) β libnvme API manual π¦
πΈ 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. The main-character config object, basically.hostnqnβ the host NQN that selects the file, orNULLfor the top-level file. Pick your file with the host NQN, or passNULLfor the top-level one. iykyk.is_dcβtruefor a discovery controller,falsefor an I/O controller. So yes, this little bool decides which flavor we're talking about.nqnβ the NQN of the discovered controller, orNULL. Drop the discovered controller's NQN here, orNULLif there isn't one.paramsβ set to the parameters, valid whileconfigis alive. It gets pointed at the params β and heads up, those are only valid whileconfigis alive. π«Ά
bestie please remember:paramsis valid whileconfigis alive. That's not a vibe, that's a lifetime rule. π
π DESCRIPTION π
Okay so picture this: a controller found through discovery has no section in the configuration. None. It's giving "I'm not in the config file, but I still have parameters." π
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. π«
lowkey important: a section with the well-known discovery NQN never matches. Periodt.
π RETURN π
0on success β¨-EINVALifconfigorparamsisNULLπ-ENOENTif no file ofconfighashostnqnπ
Stay configured, bestie. Sign-off from the libnvme API manual, October 2026, page libnvmf_config_get_discovered_params(9). πππ¦
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms