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

# nvmf\_get\_discovery\_log(2)

Return the discovery log page

## NAME

nvmf\_get\_discovery\_log - Return the discovery log page

## SYNOPSIS

**int nvmf\_get\_discovery\_log** **(nvme\_ctrl\_t c** *,* **struct nvmf\_discovery\_log \*\*logp** *,* **int max\_retries** *);*

## ARGUMENTS

- c

  Discovery controller to use

- logp

  Pointer to the log page to be returned

- max\_retries

  Number of retries in case of failure

## DESCRIPTION

The memory allocated for the log page and returned in *logp* must be freed by the caller using **free**.

## NOTE

Consider using **nvmf\_get\_discovery\_wargs** instead.

## RETURN

0 on success; on failure -1 is returned and errno is set
