iscsi_sessions_get - Retrieve all iSCSI sessions.
Contents
Arguments
ctx Pointer of 'struct iscsi_context'. If this pointer is NULL, your program will be terminated
by assert.
ses Output pointer of 'struct iscsi_session' pointer array. Its memory should be freed by
iscsi_sessions_free. If this pointer is NULL, your program will be terminated by assert.
se_count Output pointer of uint32_t. Will store the size of
Description
Retrieves all iSCSI sessions. For the properties of 'struct iscsi_session', please refer to the functions
defined in 'libopeniscsiusr_session.h' file.
Name
iscsi_sessions_get - Retrieve all iSCSI sessions.
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.
July 2025 iscsi_sessions_get iscsi_sessions_get(3)
Synopsis
intiscsi_sessions_get(structiscsi_context*ctx,structiscsi_session***ses,uint32_t*se_count);
