libnvme\_scan\_topology(9) libnvme API manual libnvme\_scan\_topology(9)

# [NAME](#NAME)

libnvme\_scan\_topology - Scan NVMe topology and apply filter

# [SYNOPSIS](#SYNOPSIS)

**int libnvme\_scan\_topology** **(struct libnvme\_global\_ctx \*ctx ,** **libnvme\_scan\_filter\_t f ,** **void \*f\_args );**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

struct libnvme\_global\_ctx object

[f](#f)

filter to apply

[f\_args](#f_args)

user-specified argument to *f*

# [DESCRIPTION](#DESCRIPTION)

Scans the NVMe topology and filters out the resulting elements by applying *f*.

# [RETURN](#RETURN)

0 on success, negative error code otherwise.

libnvme\_scan\_topology September 2026

---

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