---
name: "libnvme_mi_admin_xfer-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvme_mi_admin_xfer-libnvme3"
---

# libnvme\_mi\_admin\_xfer-libnvme3(2)

Raw admin transfer interface.

## NAME

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

## 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

- hdl

  transport handle to send the admin command to

- admin\_req

  request data

- req\_data\_size

  size of request data payload

- admin\_resp

  buffer for response data

- resp\_data\_offset

  offset into request data to retrieve from controller

- resp\_data\_size

  size of response data buffer, updated to received size

## 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

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