Sponsor:

Your company here, and a link to your site. Click to find out more.

iscsi_session_get - Man Page

Retrieve specified iSCSI sessions.

Synopsis

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.

Description

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.

Info

January 2024 API Manual