DOKK / manpages / debian 12 / libnvme-dev / nvmf_add_ctrl.2.en
nvmf_add_ctrl(2) libnvme API manual nvmf_add_ctrl(2)

nvmf_add_ctrl - Connect a controller and update topology

int nvmf_add_ctrl (nvme_host_t h , nvme_ctrl_t c , const struct nvme_fabrics_config *cfg );

Host to which the controller should be attached
Controller to be connected
Default configuration for the controller

Issues a 'connect' command to the NVMe-oF controller and inserts c into the topology using h as parent. c must be initialized and not connected to the topology.

0 on success; on failure errno is set and -1 is returned.

nvmf_add_ctrl January 2023