Add functions to control how IMMEDIATE_DATA and INITIAL_R2T is negotiated
This commit is contained in:
@@ -52,16 +52,6 @@ struct iscsi_in_pdu {
|
||||
void iscsi_free_iscsi_in_pdu(struct iscsi_context *iscsi, struct iscsi_in_pdu *in);
|
||||
void iscsi_free_iscsi_inqueue(struct iscsi_context *iscsi, struct iscsi_in_pdu *inqueue);
|
||||
|
||||
enum iscsi_initial_r2t {
|
||||
ISCSI_INITIAL_R2T_NO = 0,
|
||||
ISCSI_INITIAL_R2T_YES = 1
|
||||
};
|
||||
|
||||
enum iscsi_immediate_data {
|
||||
ISCSI_IMMEDIATE_DATA_NO = 0,
|
||||
ISCSI_IMMEDIATE_DATA_YES = 1
|
||||
};
|
||||
|
||||
struct iscsi_context {
|
||||
char initiator_name[MAX_STRING_SIZE+1];
|
||||
char target_name[MAX_STRING_SIZE+1];
|
||||
|
||||
@@ -84,6 +84,34 @@ struct iscsi_url {
|
||||
struct iscsi_context *iscsi;
|
||||
};
|
||||
|
||||
/*
|
||||
* This function is used to set the desired mode for immediate data.
|
||||
* This can be set on a context before it has been logged in to the target
|
||||
* and controls how the initiator will try to negotiate the immediate data.
|
||||
*
|
||||
* Default is for libiscsi to try to negotiate ISCSI_IMMEDIATE_DATA_YES
|
||||
*/
|
||||
enum iscsi_immediate_data {
|
||||
ISCSI_IMMEDIATE_DATA_NO = 0,
|
||||
ISCSI_IMMEDIATE_DATA_YES = 1
|
||||
};
|
||||
int iscsi_set_immediate_data(struct iscsi_context *iscsi, enum iscsi_immediate_data immediate_data);
|
||||
|
||||
/*
|
||||
* This function is used to set the desired mode for initial_r2t
|
||||
* This can be set on a context before it has been logged in to the target
|
||||
* and controls how the initiator will try to negotiate the initial r2t.
|
||||
*
|
||||
* Default is for libiscsi to try to negotiate ISCSI_INITIAL_R2T_YES
|
||||
*/
|
||||
enum iscsi_initial_r2t {
|
||||
ISCSI_INITIAL_R2T_NO = 0,
|
||||
ISCSI_INITIAL_R2T_YES = 1
|
||||
};
|
||||
int
|
||||
iscsi_set_initial_r2t(struct iscsi_context *iscsi, enum iscsi_initial_r2t initial_r2t);
|
||||
|
||||
|
||||
/*
|
||||
* This function is used to parse an iSCSI URL into a iscsi_url structure.
|
||||
* iSCSI URL format :
|
||||
|
||||
Reference in New Issue
Block a user