iscsi_session_get3
Retrieve specified iscsi sessions.
Usage
int iscsi_session_get (struct iscsi_context *ctx, uint32_t sid, struct iscsi_session **se);
Arguments
- ctx
-
Pointer of 'struct iscsi_context'. If this pointer is NULL, your program will be terminated by assert.
- sid
-
uint32_t, iSCSI session ID.
- se
-
Output pointer of 'struct iscsi_session' pointer. Its memory should be freed by
iscsi_session_free. If this pointer is NULL, your program will be terminated by assert. If specified iSCSI session does not exist, this pointer will be set to NULL with LIBISCSI_OK returned.
Overview
Retrieves specified iSCSI sessions. For the properties of
Return
int. Valid error codes are:
* LIBISCSI_OK
* LIBISCSI_ERR_BUG
* LIBISCSI_ERR_NOMEM
* LIBISCSI_ERR_ACCESS
* LIBISCSI_ERR_SYSFS_LOOKUP
* LIBISCSI_ERR_SESS_NOT_FOUND
Error number could be converted to string by iscsi_strerror.
Releases
4 releases since Debian 11 (Bullseye); the text changed 3 times.