+15
-14
@@ -18,6 +18,7 @@
|
|||||||
#define __iscsi_h__
|
#define __iscsi_h__
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#define EXTERN __declspec( dllexport )
|
#define EXTERN __declspec( dllexport )
|
||||||
@@ -740,8 +741,8 @@ iscsi_unmap_task(struct iscsi_context *iscsi, int lun, int anchor, int group,
|
|||||||
iscsi_command_cb cb, void *private_data);
|
iscsi_command_cb cb, void *private_data);
|
||||||
|
|
||||||
EXTERN struct scsi_task *
|
EXTERN struct scsi_task *
|
||||||
iscsi_readtoc_task(struct iscsi_context *iscsi, int lun, int msf, int format,
|
iscsi_readtoc_task(struct iscsi_context *iscsi, int lun, int msf, int format,
|
||||||
int track_session, int maxsize,
|
int track_session, int maxsize,
|
||||||
iscsi_command_cb cb, void *private_data);
|
iscsi_command_cb cb, void *private_data);
|
||||||
|
|
||||||
EXTERN struct scsi_task *
|
EXTERN struct scsi_task *
|
||||||
@@ -754,7 +755,7 @@ iscsi_release6_task(struct iscsi_context *iscsi, int lun,
|
|||||||
|
|
||||||
EXTERN struct scsi_task *
|
EXTERN struct scsi_task *
|
||||||
iscsi_report_supported_opcodes_task(struct iscsi_context *iscsi, int lun,
|
iscsi_report_supported_opcodes_task(struct iscsi_context *iscsi, int lun,
|
||||||
int return_timeouts, int maxsize,
|
int return_timeouts, int maxsize,
|
||||||
iscsi_command_cb cb, void *private_data);
|
iscsi_command_cb cb, void *private_data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -970,7 +971,7 @@ iscsi_scsi_cancel_all_tasks(struct iscsi_context *iscsi);
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is to set the debugging level where level is
|
* This function is to set the debugging level where level is
|
||||||
*
|
*
|
||||||
* 0 = disabled (default)
|
* 0 = disabled (default)
|
||||||
* 1 = errors only
|
* 1 = errors only
|
||||||
* 2 = connection related info
|
* 2 = connection related info
|
||||||
@@ -994,39 +995,39 @@ EXTERN void iscsi_log_to_stderr(int level, const char *message);
|
|||||||
* This function is to set the TCP_USER_TIMEOUT option. It has to be called after iscsi
|
* This function is to set the TCP_USER_TIMEOUT option. It has to be called after iscsi
|
||||||
* context creation. The value given in ms is then applied each time a new socket is created.
|
* context creation. The value given in ms is then applied each time a new socket is created.
|
||||||
*/
|
*/
|
||||||
EXTERN void
|
EXTERN void
|
||||||
iscsi_set_tcp_user_timeout(struct iscsi_context *iscsi, int timeout_ms);
|
iscsi_set_tcp_user_timeout(struct iscsi_context *iscsi, int timeout_ms);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is to set the TCP_KEEPIDLE option. It has to be called after iscsi
|
* This function is to set the TCP_KEEPIDLE option. It has to be called after iscsi
|
||||||
* context creation.
|
* context creation.
|
||||||
*/
|
*/
|
||||||
EXTERN void
|
EXTERN void
|
||||||
iscsi_set_tcp_keepidle(struct iscsi_context *iscsi, int value);
|
iscsi_set_tcp_keepidle(struct iscsi_context *iscsi, int value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is to set the TCP_KEEPCNT option. It has to be called after iscsi
|
* This function is to set the TCP_KEEPCNT option. It has to be called after iscsi
|
||||||
* context creation.
|
* context creation.
|
||||||
*/
|
*/
|
||||||
EXTERN void
|
EXTERN void
|
||||||
iscsi_set_tcp_keepcnt(struct iscsi_context *iscsi, int value);
|
iscsi_set_tcp_keepcnt(struct iscsi_context *iscsi, int value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is to set the TCP_KEEPINTVL option. It has to be called after iscsi
|
* This function is to set the TCP_KEEPINTVL option. It has to be called after iscsi
|
||||||
* context creation.
|
* context creation.
|
||||||
*/
|
*/
|
||||||
EXTERN void
|
EXTERN void
|
||||||
iscsi_set_tcp_keepintvl(struct iscsi_context *iscsi, int value);
|
iscsi_set_tcp_keepintvl(struct iscsi_context *iscsi, int value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is to set the TCP_SYNCNT option. It has to be called after iscsi
|
* This function is to set the TCP_SYNCNT option. It has to be called after iscsi
|
||||||
* context creation.
|
* context creation.
|
||||||
*/
|
*/
|
||||||
EXTERN void
|
EXTERN void
|
||||||
iscsi_set_tcp_syncnt(struct iscsi_context *iscsi, int value);
|
iscsi_set_tcp_syncnt(struct iscsi_context *iscsi, int value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is to set the interface that outbound connections for this socket are bound to.
|
* This function is to set the interface that outbound connections for this socket are bound to.
|
||||||
* You max specify more than one interface here separated by comma.
|
* You max specify more than one interface here separated by comma.
|
||||||
*/
|
*/
|
||||||
EXTERN void
|
EXTERN void
|
||||||
|
|||||||
+1
-141
@@ -176,124 +176,10 @@ struct scsi_readtoc_list {
|
|||||||
struct scsi_readtoc_desc desc[0];
|
struct scsi_readtoc_desc desc[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct scsi_reportluns_params {
|
|
||||||
int report_type;
|
|
||||||
};
|
|
||||||
struct scsi_read6_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_read10_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_read12_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_read16_params {
|
|
||||||
uint64_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_write10_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_write12_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_write16_params {
|
|
||||||
uint64_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_startstopunit_params {
|
|
||||||
int immed;
|
|
||||||
int pcm;
|
|
||||||
int pc;
|
|
||||||
int no_flush;
|
|
||||||
int loej;
|
|
||||||
int start;
|
|
||||||
};
|
|
||||||
struct scsi_preventallow_params {
|
|
||||||
int prevent;
|
|
||||||
};
|
|
||||||
struct scsi_orwrite_params {
|
|
||||||
uint64_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_compareandwrite_params {
|
|
||||||
uint64_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_writeverify10_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_writeverify12_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_writeverify16_params {
|
|
||||||
uint64_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
};
|
|
||||||
struct scsi_verify10_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
int vprotect;
|
|
||||||
int dpo;
|
|
||||||
int bytchk;
|
|
||||||
};
|
|
||||||
struct scsi_verify12_params {
|
|
||||||
uint32_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
int vprotect;
|
|
||||||
int dpo;
|
|
||||||
int bytchk;
|
|
||||||
};
|
|
||||||
struct scsi_verify16_params {
|
|
||||||
uint64_t lba;
|
|
||||||
uint32_t num_blocks;
|
|
||||||
int vprotect;
|
|
||||||
int dpo;
|
|
||||||
int bytchk;
|
|
||||||
};
|
|
||||||
struct scsi_readcapacity10_params {
|
|
||||||
int lba;
|
|
||||||
int pmi;
|
|
||||||
};
|
|
||||||
struct scsi_inquiry_params {
|
|
||||||
int evpd;
|
|
||||||
int page_code;
|
|
||||||
};
|
|
||||||
struct scsi_modesense6_params {
|
|
||||||
int dbd;
|
|
||||||
int pc;
|
|
||||||
int page_code;
|
|
||||||
int sub_page_code;
|
|
||||||
};
|
|
||||||
struct scsi_serviceactionin_params {
|
|
||||||
enum scsi_service_action_in sa;
|
|
||||||
};
|
|
||||||
struct scsi_readtoc_params {
|
|
||||||
int msf;
|
|
||||||
int format;
|
|
||||||
int track_session;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct scsi_report_supported_params {
|
struct scsi_report_supported_params {
|
||||||
int return_timeouts;
|
int return_timeouts;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct scsi_maintenancein_params {
|
|
||||||
enum scsi_maintenance_in sa;
|
|
||||||
union {
|
|
||||||
struct scsi_report_supported_params reportsupported;
|
|
||||||
} params;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct scsi_sense {
|
struct scsi_sense {
|
||||||
unsigned char error_type;
|
unsigned char error_type;
|
||||||
enum scsi_sense_key key;
|
enum scsi_sense_key key;
|
||||||
@@ -318,32 +204,6 @@ struct scsi_task {
|
|||||||
int xfer_dir;
|
int xfer_dir;
|
||||||
int expxferlen;
|
int expxferlen;
|
||||||
unsigned char cdb[SCSI_CDB_MAX_SIZE];
|
unsigned char cdb[SCSI_CDB_MAX_SIZE];
|
||||||
union {
|
|
||||||
struct scsi_read6_params read6;
|
|
||||||
struct scsi_read10_params read10;
|
|
||||||
struct scsi_read12_params read12;
|
|
||||||
struct scsi_read16_params read16;
|
|
||||||
struct scsi_write10_params write10;
|
|
||||||
struct scsi_write12_params write12;
|
|
||||||
struct scsi_write16_params write16;
|
|
||||||
struct scsi_startstopunit_params startstopunit;
|
|
||||||
struct scsi_preventallow_params preventallow;
|
|
||||||
struct scsi_orwrite_params orwrite;
|
|
||||||
struct scsi_compareandwrite_params compareandwrite;
|
|
||||||
struct scsi_writeverify10_params writeverify10;
|
|
||||||
struct scsi_writeverify12_params writeverify12;
|
|
||||||
struct scsi_writeverify16_params writeverify16;
|
|
||||||
struct scsi_verify10_params verify10;
|
|
||||||
struct scsi_verify12_params verify12;
|
|
||||||
struct scsi_verify16_params verify16;
|
|
||||||
struct scsi_readcapacity10_params readcapacity10;
|
|
||||||
struct scsi_reportluns_params reportluns;
|
|
||||||
struct scsi_inquiry_params inquiry;
|
|
||||||
struct scsi_modesense6_params modesense6;
|
|
||||||
struct scsi_serviceactionin_params serviceactionin;
|
|
||||||
struct scsi_readtoc_params readtoc;
|
|
||||||
struct scsi_maintenancein_params maintenancein;
|
|
||||||
} params;
|
|
||||||
|
|
||||||
enum scsi_residual residual_status;
|
enum scsi_residual residual_status;
|
||||||
int residual;
|
int residual;
|
||||||
@@ -780,7 +640,7 @@ struct scsi_op_timeout_descriptor {
|
|||||||
uint8_t command_specific;
|
uint8_t command_specific;
|
||||||
uint32_t nominal_processing_timeout;
|
uint32_t nominal_processing_timeout;
|
||||||
uint32_t recommended_timeout;
|
uint32_t recommended_timeout;
|
||||||
|
|
||||||
};
|
};
|
||||||
struct scsi_command_descriptor {
|
struct scsi_command_descriptor {
|
||||||
uint8_t op_code;
|
uint8_t op_code;
|
||||||
|
|||||||
+331
-351
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user