DOKK / manpages / debian 12 / libopeniscsiusr-dev / iscsi_iface_get.3.en
iscsi_iface_get(3) API Manual iscsi_iface_get(3)

iscsi_iface_get - Retrieve specified iSCSI interface.

int iscsi_iface_get (struct iscsi_context *ctx, const char *iface_name, struct iscsi_iface **iface);

Pointer of 'struct iscsi_context'. If this pointer is NULL, your program will be terminated by assert.
String. Name of iSCSI interface. Also the file name of configuration file "/etc/iscsi/iface/<iface_name>". If this pointer is NULL or empty string, your program will be terminated by assert.
Output pointer of 'struct iscsi_iface'. Its memory should be freed by iscsi_iface_free. If this pointer is NULL, your program will be terminated by assert.

Retrieves specified iSCSI interfaces by reading configuration from "/etc/iscsi/iface/<iface_name>". To generate iSCSI interface configuration when new card installed, please use iscsi_default_iface_setup. Illegal configuration file will be treated as error LIBISCSI_ERR_IDBM. Configuration file not found will be treated as error LIBISCSI_ERR_INVAL.

int. Valid error codes are:

* LIBISCSI_OK

* LIBISCSI_ERR_BUG

* LIBISCSI_ERR_NOMEM

* LIBISCSI_ERR_ACCESS

* LIBISCSI_ERR_SYSFS_LOOKUP

* LIBISCSI_ERR_IDBM

Error number could be converted to string by iscsi_strerror.

iscsi_iface_get October 2022