.TH "iscsi_iface_get" 3 "iscsi_iface_get" "June 2023" "API Manual" LINUX .SH NAME iscsi_iface_get \- Retrieve specified iSCSI interface. .SH SYNOPSIS .B "int" iscsi_iface_get .BI "(struct iscsi_context *" ctx "," .BI "const char *" iface_name "," .BI "struct iscsi_iface **" iface ");" .SH ARGUMENTS .IP "ctx" 12 Pointer of 'struct iscsi_context'. If this pointer is NULL, your program will be terminated by assert. .IP "iface_name" 12 String. Name of iSCSI interface. Also the file name of configuration file "/etc/iscsi/iface/". If this pointer is NULL or empty string, your program will be terminated by assert. .IP "iface" 12 Output pointer of 'struct iscsi_iface'. Its memory should be freed by \fBiscsi_iface_free\fP. If this pointer is NULL, your program will be terminated by assert. .SH "DESCRIPTION" Retrieves specified iSCSI interfaces by reading configuration from "/etc/iscsi/iface/". To generate iSCSI interface configuration when new card installed, please use \fBiscsi_default_iface_setup\fP. Illegal configuration file will be treated as error LIBISCSI_ERR_IDBM. Configuration file not found will be treated as error LIBISCSI_ERR_INVAL. .SH "RETURN" 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 \fBiscsi_strerror\fP.