.TH "iscsi_nodes_get" 3 "iscsi_nodes_get" "October 2022" "API Manual" LINUX
.SH NAME
iscsi_nodes_get \- Retrieve all iSCSI nodes.
.SH SYNOPSIS
.B "int" iscsi_nodes_get
.BI "(struct iscsi_context *" ctx ","
.BI "struct iscsi_node ***" nodes ","
.BI "uint32_t *" node_count ");"
.SH ARGUMENTS
.IP "ctx" 12
Pointer of 'struct iscsi_context'.
If this pointer is NULL, your program will be terminated by assert.
.IP "nodes" 12
Output pointer of 'struct iscsi_node' pointer array. Its memory
should be freed by \fBiscsi_nodes_free\fP.
If this pointer is NULL, your program will be terminated by assert.
.IP "node_count" 12
Output pointer of uint32_t. Will store the size of
'struct iscsi_node' pointer array.
.SH "DESCRIPTION"

Retrieves all iSCSI nodes. For the properties of 'struct iscsi_node',
please refer to the functions defined in 'libopeniscsiusr_node.h' file.
The returned results contains iSCSI nodes configured in "/etc/iscsi/nodes/".
Illegal configuration file will be skipped and warned.
The returned 'struct iscsi_node' pointer array is sorted by target name,
connection address, connection port and interface.
.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.