iscsi\_nodes\_get(3) API Manual iscsi\_nodes\_get(3)

# [NAME](#NAME)

iscsi\_nodes\_get - Retrieve all iSCSI nodes.

# [SYNOPSIS](#SYNOPSIS)

**int iscsi\_nodes\_get** **(struct iscsi\_context \*ctx,** **struct iscsi\_node \*\*\*nodes,** **uint32\_t \*node\_count);**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

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

[nodes](#nodes)

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

[node\_count](#node_count)

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

# [DESCRIPTION](#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.

# [RETURN](#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 **iscsi\_strerror**.

iscsi\_nodes\_get October 2026

---

Document: iscsi_nodes_get(3) from open-iscsi 2.1.13-r3 (Chainguard OS)
Source: https://github.com/open-iscsi/open-iscsi
