Add support for Data Digest

This commit is contained in:
Brian Meagher
2024-05-04 18:54:21 -07:00
parent ec5d33da63
commit 882bcad53a
11 changed files with 254 additions and 17 deletions

View File

@@ -335,6 +335,29 @@ enum iscsi_header_digest {
EXTERN int iscsi_set_header_digest(struct iscsi_context *iscsi,
enum iscsi_header_digest header_digest);
/*
* Types of data digest we support. Default is NONE
*/
enum iscsi_data_digest {
ISCSI_DATA_DIGEST_NONE = 0,
ISCSI_DATA_DIGEST_NONE_CRC32C = 1,
ISCSI_DATA_DIGEST_CRC32C_NONE = 2,
ISCSI_DATA_DIGEST_CRC32C = 3,
ISCSI_DATA_DIGEST_LAST = ISCSI_DATA_DIGEST_CRC32C
};
/*
* Set the desired data digest for a scsi context.
* Data digest can only be set/changed before the context
* is logged in to the target.
*
* Returns:
* 0: success
* <0: error
*/
EXTERN int iscsi_set_data_digest(struct iscsi_context *iscsi,
enum iscsi_data_digest data_digest);
/*
* Specify the username and password to use for chap authentication
*/