libnvmf_context_set_config(9) libnvme API manual libnvmf_context_set_config(9)

libnvmf_context_set_config - Set the configuration for discovery

void libnvmf_context_set_config (struct libnvmf_context *fctx , const struct libnvmf_config *config , const struct libnvmf_config_conn *conn );

Fabrics context of a discovery controller
Resolved configuration, or NULL
Connection of the discovery controller in config

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.

libnvmf_context_set_config October 2026