---
name: "nvme_ctrl_find"
section: "2"
platform: "linux"
package: "libnvme-dev"
version: "1.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_ctrl_find"
---

# nvme\_ctrl\_find(2)

Locate an existing controller

## NAME

nvme\_ctrl\_find - Locate an existing controller

## SYNOPSIS

**nvme\_ctrl\_t nvme\_ctrl\_find** **(nvme\_subsystem\_t s** *,* **const char \*transport** *,* **const char \*traddr** *,* **const char \*trsvcid** *,* **const char \*subsysnqn** *,* **const char \*host\_traddr** *,* **const char \*host\_iface** *);*

## ARGUMENTS

- s

  *nvme\_subsystem\_t* object

- transport

  Transport name

- traddr

  Transport address

- trsvcid

  Transport service identifier

- subsysnqn

  Subsystem NQN

- host\_traddr

  Host transport address

- host\_iface

  Host interface name

## DESCRIPTION

Lookup a controller in *s* based on *transport*, *traddr*, *trsvcid*, *subsysnqn*, *host\_traddr*, and *host\_iface*. *transport* must be specified, other fields may be required depending on the transport. Parameters set to NULL will be ignored.

Unlike **nvme\_lookup\_ctrl**, this function does not create a new object if an existing controller cannot be found.

## RETURN

Controller instance on success, NULL otherwise.
