libnvme\_mi\_admin\_xfer(9) libnvme API manual libnvme\_mi\_admin\_xfer(9)

# [NAME](#NAME)

libnvme\_mi\_admin\_xfer - Raw admin transfer interface.

# [SYNOPSIS](#SYNOPSIS)

**int libnvme\_mi\_admin\_xfer** **(struct libnvme\_transport\_handle \*hdl ,** **struct nvme\_mi\_admin\_req\_hdr \*admin\_req ,** **size\_t req\_data\_size ,** **struct nvme\_mi\_admin\_resp\_hdr \*admin\_resp ,** **off\_t resp\_data\_offset ,** **size\_t \*resp\_data\_size );**

# [ARGUMENTS](#ARGUMENTS)

[hdl](#hdl)

transport handle to send the admin command to

[admin\_req](#admin_req)

request data

[req\_data\_size](#req_data_size)

size of request data payload

[admin\_resp](#admin_resp)

buffer for response data

[resp\_data\_offset](#resp_data_offset)

offset into request data to retrieve from controller

[resp\_data\_size](#resp_data_size)

size of response data buffer, updated to received size

# [DESCRIPTION](#DESCRIPTION)

Performs an arbitrary NVMe Admin command, using the provided request data, in *admin\_req*. The size of the request data \*payload* is specified in *req\_data\_size* - this does not include the standard header length (so a header-only request would have a size of 0).

On success, response data is stored in *admin\_resp*, which has an optional appended payload buffer of *resp\_data\_size* bytes. The actual payload transferred will be stored in *resp\_data\_size*. These sizes do not include the Admin request header, so 0 represents no payload.

As with all Admin commands, we can request partial data from the Admin Response payload, offset by *resp\_data\_offset*.

See: *struct nvme\_mi\_admin\_req\_hdr* and *struct nvme\_mi\_admin\_resp\_hdr*.

# [RETURN](#RETURN)

The nvme command status if a response was received (see *enum nvme\_status\_field*) or negative error code otherwise.

libnvme\_mi\_admin\_xfer October 2026

---

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