---
name: "libnvme_scan_topology-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_scan_topology-libnvme3"
---

# libnvme\_scan\_topology-libnvme3(2)

Scan NVMe topology and apply filter

## NAME

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

## SYNOPSIS

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

## ARGUMENTS

- ctx

  struct libnvme\_global\_ctx object

- f

  filter to apply

- f\_args

  user-specified argument to *f*

## DESCRIPTION

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

## RETURN

0 on success, negative error code otherwise.
