libnvmf\_connect\_args\_emit(9) libnvme API manual libnvmf\_connect\_args\_emit(9)

# [NAME](#NAME)

libnvmf\_connect\_args\_emit - render a connection as "nvme connect" options.

# [SYNOPSIS](#SYNOPSIS)

**int libnvmf\_connect\_args\_emit** **(const struct libnvmf\_tid \*tid ,** **const struct libnvmf\_params \*params ,** **void (\*callback)(const char \*arg, void \*user\_data) ,** **void \*user\_data );**

# [ARGUMENTS](#ARGUMENTS)

[tid](#tid)

addressing + identity, or NULL to emit the parameters only

[params](#params)

connection parameters, or NULL to emit the TID only

[callback](#callback)

called once per formatted option, e.g. "--transport=tcp"; the string is only valid for the duration of the call

[user\_data](#user_data)

caller context passed to *callback*

# [DESCRIPTION](#DESCRIPTION)

Emits the TID's set fields first, in fixed order (--transport, --traddr, --trsvcid, --nqn, --host-traddr, --host-iface, --hostnqn, --hostid), then the parameters in their iteration order. Unset and reset parameters are skipped so the kernel default applies; a boolean parameter is emitted as a bare "--flag" when true and skipped when false. Consumer-private options are the caller's to append.

This is the consumption path for the resolved configuration: each connection becomes the option list of one "nvme connect" invocation. It also renders a connection as a human-readable, copy-pasteable command line for "config show" style output.

# [RETURN](#RETURN)

0 on success, -EINVAL when *callback* is NULL, -ENOMEM when formatting an option fails (the emission stops there).

libnvmf\_connect\_args\_emit October 2026

---

Document: libnvmf_connect_args_emit-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
