Merge pull request #123 from plieven/asyncv3
add support for async messages
This commit is contained in:
@@ -80,6 +80,7 @@ struct iscsi_context {
|
||||
|
||||
int fd;
|
||||
int is_connected;
|
||||
int is_corked;
|
||||
|
||||
int tcp_user_timeout;
|
||||
int tcp_keepcnt;
|
||||
@@ -125,6 +126,7 @@ struct iscsi_context {
|
||||
int no_auto_reconnect;
|
||||
int reconnect_deferred;
|
||||
int reconnect_max_retries;
|
||||
int pending_reconnect;
|
||||
|
||||
int log_level;
|
||||
iscsi_log_fn log_fn;
|
||||
@@ -188,8 +190,9 @@ enum iscsi_opcode {
|
||||
ISCSI_PDU_DATA_IN = 0x25,
|
||||
ISCSI_PDU_LOGOUT_RESPONSE = 0x26,
|
||||
ISCSI_PDU_R2T = 0x31,
|
||||
ISCSI_PDU_ASYNC_MSG = 0x32,
|
||||
ISCSI_PDU_REJECT = 0x3f,
|
||||
ISCSI_PDU_NO_PDU = 0xff
|
||||
ISCSI_PDU_NO_PDU = 0xff
|
||||
};
|
||||
|
||||
struct iscsi_scsi_cbdata {
|
||||
@@ -209,6 +212,13 @@ struct iscsi_pdu {
|
||||
* This includes any DATA-OUT PDU as well as all NOPs.
|
||||
*/
|
||||
#define ISCSI_PDU_DROP_ON_RECONNECT 0x00000004
|
||||
/* stop sending after this PDU has been sent */
|
||||
#define ISCSI_PDU_CORK_WHEN_SENT 0x00000008
|
||||
/* put this immediate delivery PDU in front of outqueue.
|
||||
* This is currently only used for immediate logout requests
|
||||
* as answer to an async logout event. */
|
||||
#define ISCSI_PDU_URGENT_DELIVERY 0x00000010
|
||||
|
||||
|
||||
uint32_t flags;
|
||||
|
||||
@@ -339,14 +349,18 @@ iscsi_log_message(struct iscsi_context *iscsi, int level, const char *format, ..
|
||||
void
|
||||
iscsi_add_to_outqueue(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
|
||||
|
||||
int
|
||||
iscsi_serial32_compare(uint32_t s1, uint32_t s2);
|
||||
int iscsi_serial32_compare(uint32_t s1, uint32_t s2);
|
||||
void iscsi_adjust_statsn(struct iscsi_context *iscsi, struct iscsi_in_pdu *in);
|
||||
void iscsi_adjust_maxexpcmdsn(struct iscsi_context *iscsi, struct iscsi_in_pdu *in);
|
||||
|
||||
uint32_t
|
||||
iscsi_itt_post_increment(struct iscsi_context *iscsi);
|
||||
uint32_t iscsi_itt_post_increment(struct iscsi_context *iscsi);
|
||||
|
||||
void iscsi_timeout_scan(struct iscsi_context *iscsi);
|
||||
|
||||
int
|
||||
iscsi_logout_async_internal(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
void *private_data, uint32_t flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user