LIBNVMF_CONFIG_GET_DISCOVERED_PARAMS-LIBNVME3(2)

πŸ“¦ version 3.2, in arch rolling

πŸ¦‹ 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, or NULL for the top-level file. Pick your file with the host NQN, or pass NULL for the top-level one. iykyk.
  • is_dc β€” true for a discovery controller, false for an I/O controller. So yes, this little bool decides which flavor we're talking about.
  • nqn β€” the NQN of the discovered controller, or NULL. Drop the discovered controller's NQN here, or NULL if there isn't one.
  • params β€” set to the parameters, valid while config is alive. It gets pointed at the params β€” and heads up, those are only valid while config is alive. 🫢
bestie please remember: params is valid while config is 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 🌈

  • 0 on success ✨
  • -EINVAL if config or params is NULL πŸ’€
  • -ENOENT if no file of config has hostnqn 😭

Stay configured, bestie. Sign-off from the libnvme API manual, October 2026, page libnvmf_config_get_discovered_params(9). πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from