libnvmf\_create\_ctrl(9) libnvme API manual libnvmf\_create\_ctrl(9)

# [NAME](#NAME)

libnvmf\_create\_ctrl - Allocate an unconnected NVMe controller

# [SYNOPSIS](#SYNOPSIS)

**int libnvmf\_create\_ctrl** **(struct libnvme\_global\_ctx \*ctx ,** **struct libnvmf\_context \*fctx ,** **struct libnvme\_ctrl \*\*c );**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

struct libnvme\_global\_ctx object

[fctx](#fctx)

Fabrics context

[c](#c)

*struct libnvme\_ctrl* object to return

# [DESCRIPTION](#DESCRIPTION)

Creates an unconnected controller to be used for **libnvme\_add\_ctrl**. The controller carries over *fctx*'s connection parameters together with its authentication and transport encryption settings (kxchap keys, keyring, TLS key and TLS key identity).

# [RETURN](#RETURN)

0 on success, negative error code otherwise.

libnvmf\_create\_ctrl September 2026

---

Document: libnvmf_create_ctrl-libnvme3(2) from nvme-cli 3.1-r1 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
