---
name: "iscsi_ifaces_get"
section: "3"
platform: "linux"
package: "open-iscsi"
version: "2.1.13-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/iscsi_ifaces_get"
---

# iscsi\_ifaces\_get(3)

Retrieve all iSCSI interfaces.

## NAME

iscsi\_ifaces\_get - Retrieve all iSCSI interfaces.

## SYNOPSIS

**int iscsi\_ifaces\_get** **(struct iscsi\_context \****ctx***,** **struct iscsi\_iface \*\*\****ifaces***,** **uint32\_t \****iface\_count***);**

## ARGUMENTS

- ctx

  Pointer of 'struct iscsi\_context'. If this pointer is NULL, your program will be terminated by assert.

- ifaces

  Output pointer of 'struct iscsi\_iface' pointer array. Its memory should be freed by **iscsi\_ifaces\_free**. If this pointer is NULL, your program will be terminated by assert.

- iface\_count

  Output pointer of uint32\_t. Will store the size of

## DESCRIPTION

Retrieves all iSCSI interfaces. For the properties of 'struct iscsi\_iface', please refer to the functions defined in 'libopeniscsiusr\_iface.h' file. The returned results contains default iSCSI interfaces(iser and iscsi\_tcp) and iSCSI interfaces configured in "/etc/iscsi/ifaces/". Illegal configuration file will be skipped and warned. To generate iSCSI interface configuration when new card installed, please use **iscsi\_default\_iface\_setup**.

## RETURN

int. Valid error codes are:

\* LIBISCSI\_OK

\* LIBISCSI\_ERR\_BUG

\* LIBISCSI\_ERR\_NOMEM

\* LIBISCSI\_ERR\_ACCESS

\* LIBISCSI\_ERR\_SYSFS\_LOOKUP

Error number could be converted to string by **iscsi\_strerror**.
