libnvmf_config_get_discovered_params-libnvme32
Discovered controller parameters.
Usage
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 |
Overview
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.