iSCSI

Overview

Functions and constant declared here can be used bothe on the agent and in tests. More…

// typedefs

typedef enum iscsi_connection_status iscsi_connection_status;

// enums

enum iscsi_command_attr_values;
enum iscsi_connection_status;
enum iscsi_error_recovery_levels;
enum iscsi_initiator_opcode;
enum iscsi_login_stage_t;
enum iscsi_logout_reasons;
enum iscsi_logout_responses;
enum iscsi_reject_reasons;
enum iscsi_snack_types;
enum iscsi_status_classes;
enum iscsi_status_details;
enum iscsi_targ_async_msg_events;
enum iscsi_target_opcodes;
enum iscsi_tmf_responses;
enum iscsi_tmf_task_codes;

// structs

struct generic_pdu;
struct iscsi_init_login_cmnd;
struct iscsi_init_logout_cmnd;
struct iscsi_init_nopout;
struct iscsi_init_scsi_cmnd;
struct iscsi_init_scsi_data_out;
struct iscsi_init_snack;
struct iscsi_init_task_mgt_command;
struct iscsi_init_text_cmnd;
struct iscsi_targ_async_msg;
struct iscsi_targ_login_rsp;
struct iscsi_targ_logout_rsp;
struct iscsi_targ_nopin;
struct iscsi_targ_r2t;
struct iscsi_targ_rjt;
struct iscsi_targ_scsi_data_in;
struct iscsi_targ_scsi_rsp;
struct iscsi_targ_task_mgt_response;
struct iscsi_targ_text_rsp;
struct iscsi_target_thread_params_t;
struct response_pdu;
struct scsi_fixed_sense_data;

// global functions

static int iscsi_logout_resp_str2int(const char* resp);

// macros

#define A_BIT
#define BRO_BIT
#define BRU_BIT
#define CONNREC_NOT_SUPPORTED
#define CONN_HIT_EOF
#define CONN_LOGGED_OUT
#define CSG
#define CSG1
#define CSG2
#define CSG3
#define CSG_SHIFT
#define C_BIT
#define DATACK_SNACK_ENABLE
#define DATA_SNACK_ENABLE
#define F_BIT
#define GOT_ACTIVITY
#define ISCSI_ALL_CONNECTIONS
#define ISCSI_DEFAULT_CHALLENGE_LENGTH
#define ISCSI_DEFAULT_CHAP
#define ISCSI_DEFAULT_DATA_DIGEST
#define ISCSI_DEFAULT_DATA_PDU_IN_ORDER
#define ISCSI_DEFAULT_DATA_SEQUENCE_IN_ORDER
#define ISCSI_DEFAULT_ERROR_RECOVERY_LEVEL
#define ISCSI_DEFAULT_FIRST_BURST_LENGTH
#define ISCSI_DEFAULT_HEADER_DIGEST
#define ISCSI_DEFAULT_IMMEDIATE_DATA
#define ISCSI_DEFAULT_INITIAL_R2T
#define ISCSI_DEFAULT_INITIATOR_ALIAS
#define ISCSI_DEFAULT_INITIATOR_NAME
#define ISCSI_DEFAULT_ISCSI_DEFAULT_TIME2RETAIN
#define ISCSI_DEFAULT_ISCSI_DEFAULT_TIME2WAIT
#define ISCSI_DEFAULT_MAX_BURST_LENGTH
#define ISCSI_DEFAULT_MAX_CONNECTIONS
#define ISCSI_DEFAULT_MAX_OUTSTANDING_R2T
#define ISCSI_DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
#define ISCSI_DEFAULT_SESSION_TYPE
#define ISCSI_DEFAULT_TARGET_NAME
#define ISCSI_HDR_LEN
#define ISCSI_OPCODE
#define ISCSI_SCSI_BLOCKSIZE
#define I_BIT
#define MAX_TEXT_LEN
#define NEED_TX_WAKEUP
#define NSG
#define NSG1
#define NSG2
#define NSG3
#define OFFER_0
#define OFFER_DATA_DIGEST
#define OFFER_DATA_PDU_IN_ORDER
#define OFFER_DATA_SEQUENCE_IN_ORDER
#define OFFER_DEFAULT_TIME2RETAIN
#define OFFER_DEFAULT_TIME2WAIT
#define OFFER_ERROR_RECOVERY_LEVEL
#define OFFER_FIRST_BURST_LENGTH
#define OFFER_HEADER_DIGEST
#define OFFER_IMMEDIATE_DATA
#define OFFER_INITIAL_R2T
#define OFFER_MAX_BURST_LENGTH
#define OFFER_MAX_CONNECTIONS
#define OFFER_MAX_OUTSTANDING_R2T
#define OFFER_MAX_RECV_DATA_SEGMENT_LENGTH
#define OLD_X_BIT
#define O_BIT
#define READ_TYPE_CMND
#define REPLY_BIT
#define R_BIT
#define SAM_STAT_ACA_ACTIVE
#define SAM_STAT_BUSY
#define SAM_STAT_CHECK_CONDITION
#define SAM_STAT_COMMAND_TERMINATED
#define SAM_STAT_CONDITION_MET
#define SAM_STAT_GOOD
#define SAM_STAT_INTERMEDIATE
#define SAM_STAT_INTERMEDIATE_CONDITION_MET
#define SAM_STAT_RESERVATION_CONFLICT
#define SAM_STAT_TASK_ABORTED
#define SAM_STAT_TASK_SET_FULL
#define SEND_NO_REPLY_TO_ASYNC_LOGOUT
#define SEND_NO_REPLY_TO_NOP_PING
#define SNACK
#define STATUS_SNACK_ENABLE
#define S_BIT
#define TEXT_FUDGE_LEN
#define TIME2RETAIN
#define TIME2WAIT
#define TX_TIMER_OFF
#define T_BIT
#define USE_BASE64
#define USE_DATADIGEST
#define USE_FLAT_SPACE_LUN
#define USE_FULL_REPLIES
#define USE_HEADERDIGEST
#define USE_ONE_KEY_PER_TEXT
#define USE_OPERATIONAL_PHASE
#define USE_REFLECT_XKEYS
#define USE_SECURITY_PHASE
#define USE_TARGET_CONFIRMATION
#define U_BIT
#define WRITE_TYPE_CMND
#define W_BIT

Detailed Documentation

Functions and constant declared here can be used bothe on the agent and in tests.

Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved.

Typedefs

typedef enum iscsi_connection_status iscsi_connection_status

Connection status (up, down or non-existant. Note: it is essential that ISCSI_CONNECTION_DOWN == 0 and ISCSI_CONNECTION_UP == 1, or things will break.

Macros

#define ISCSI_ALL_CONNECTIONS

If the parameters is session wide, than this value should be passed to the set parameter function as a cid

#define ISCSI_DEFAULT_TARGET_NAME

List of default parameters, used during initialization of the target_data

#define ISCSI_SCSI_BLOCKSIZE

SCSI block size for iSCSI

#define MAX_TEXT_LEN

RFC 3720, Section 5.3 Login Phase “The default MaxRecvDataSegmentLength is used during Login.”

RFC 3720, Section 12.12 MaxRecvDataSegmentLength “Default is 8192 bytes.”

#define OFFER_0

Flags: the following assumption holds: if parameter of the local Initiator structure was untouched than it should not be synchronized with the Initiator. Than the Initiator uses the default parameter and MAY NOT offer the parameter during the negotiations.

#define SNACK

SNACK for Error Recovery