iscsi_ifaces_get(3)

iscsi_ifaces_get3

Retrieve all iscsi interfaces.

Usage

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

Overview

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.

Releases

4 releases since Debian 11 (Bullseye); the text changed 3 times.

  1. 11
  2. 12
  3. 13
  4. Arch

From open-iscsi 2.1.13-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.