45 #define KEY_FLAG_SEND_INI (1 << 0)
46 #define KEY_FLAG_SEND_TGT (1 << 1)
47 #define KEY_FLAG_SEND_BOTH (KEY_FLAG_SEND_INI | KEY_FLAG_SEND_TGT)
48 #define KEY_FLAG_PHASE_SEC (1 << 2)
49 #define KEY_FLAG_PHASE_OPER (1 << 3)
50 #define KEY_FLAG_PHASE_FFP (1 << 4)
51 #define KEY_FLAG_PHASE_SEC_OPER (KEY_FLAG_PHASE_SEC | KEY_FLAG_PHASE_OPER)
52 #define KEY_FLAG_PHASE_ALL (KEY_FLAG_PHASE_SEC | KEY_FLAG_PHASE_OPER | KEY_FLAG_PHASE_FFP)
53 #define KEY_FLAG_USE_LEADING (1 << 5)
54 #define KEY_FLAG_USE_LOGIN (1 << 6)
55 #define KEY_FLAG_VALID_DISC (1 << 7)
56 #define KEY_FLAG_NEGOTIATE (1 << 8)
57 #define KEY_FLAG_DEFAULT (1 << 9)
58 #define KEY_FLAG_ALLOW_MULTI (1 << 10)
59 #define KEY_FLAG_ALLOW_LARGE (1 << 11)
132 #define OCS_LOGIN_ERROR_WRONG_STATE -10
133 #define OCS_LOGIN_ERROR_VIRT_ARRAY_TOO_SMALL -11
134 #define OCS_LOGIN_REQUEST_QUEUED -12
135 #define OCS_LOGIN_NO_QUEUING_RESOURCES -13
168 uint8_t *reject_reason);
172 uint8_t reason_code);
219 uint32_t payload_len,
ocs_login_key_t
enum identifying valid login keys.
int32_t ocs_iscsi_send_logout(ocs_cxn_t *cxn, uint8_t immediate, uint8_t reason_code)
Function to send a logout PDU.
void ocs_iscsi_ffp_text_timeout(void *arg)
This function is called to check for stalled text negotiations for a connection on a target...
void ocs_iscsi_cbit_cleanup(ocs_cxn_t *cxn)
Sends the login parameters to the firmware.
int32_t ocs_iscsi_recv_login_rsp(ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len, ocs_hal_rq_buffer_t *data, uint32_t data_len)
Function to process a login response PDU.
ocs_pdu_process_rtn_e ocs_iscsi_recv_login(ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len, ocs_hal_rq_buffer_t *data, uint32_t data_len)
Function to process a login PDU on a target.
int32_t ocs_iscsi_send_async(ocs_cxn_t *cxn, void *payload, uint32_t payload_len, uint8_t reason, uint64_t lun, uint16_t param1, uint16_t param2, uint16_t param3)
Sends a asynchronous PDU with an optional payload.
ocs_pdu_process_rtn_e
iSCSI PDU processing return codes
int32_t ocs_iscsi_are_login_reqs_outstanding(ocs_cxn_t *cxn)
Checks to see if there are any retry or login IOs active on a connection.
int32_t ocs_iscsi_login_initialize(ocs_iscsi_t *iscsi)
Initialize the login and retry object used within the login module.
Defines the fields required to track the login keys during negotiation.
ocs_chap_state_e
Defines the state of the CHAP negotiation.
int32_t ocs_iscsi_send_login(ocs_cxn_t *cxn, bool is_discovery, char *tgt_name)
Function to send an initial login PDU.
ocs_hal_rtn_e
defines common HAL return statuses.
const ocs_login_key_def_t ocs_login_key_defs[KEY_MAX]
ocs_pdu_process_rtn_e ocs_iscsi_recv_text(ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len, ocs_hal_rq_buffer_t *data, uint32_t data_len, uint8_t *reject_reason)
Function to process a text PDU.
void ocs_iscsi_login_teardown(ocs_iscsi_t *iscsi)
Releases the login and retry object used within the login module.
int32_t ocs_iscsi_send_reject(ocs_cxn_t *cxn, void *hdr, uint32_t hdr_len, uint8_t reason)
Sends a reject PDU for the supplied PDU header.
int32_t ocs_iscsi_send_nop_out(ocs_cxn_t *cxn, uint64_t lun, uint32_t itt, uint32_t ttt, char *data_ptr, uint32_t data_len)
Send NOP-Out from an initiator.
ocs_pdu_process_rtn_e ocs_iscsi_recv_nop_out(ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len, ocs_hal_rq_buffer_t *data, uint32_t data_len)
Handle NOP-OUT from an initiator.
Defines a wrapper for the RQ payload buffers so that we can place it back on the proper queue...
ocs_pdu_process_rtn_e ocs_iscsi_recv_logout(ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len)
Function to process a logout PDU.
int32_t ocs_iscsi_send_nop_in(ocs_cxn_t *cxn, uint64_t lun, uint32_t itt, uint32_t ttt, char *data_ptr, uint32_t data_len)
Send NOP-In from a target.
int32_t ocs_iscsi_send_login_rsp_invalid_during_login(ocs_cxn_t *cxn, uint32_t itt)
Function to send an login Response PDU (invalid during login).
void ocs_iscsi_login_retry(ocs_cxn_t *cxn)
Attempt to start a request on the retry queue.
int32_t ocs_iscsi_send_logout_rsp(ocs_cxn_t *cxn, uint8_t response, uint32_t itt)
Function to send a logout response PDU.
int32_t ocs_iscsi_recv_logout_rsp(ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len)
Handle logout response from a target.
int32_t ocs_iscsi_recv_nop_in(ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len, ocs_hal_rq_buffer_t *data, uint32_t data_len)
Handle NOP-IN from a target.
ocs_hal_rtn_e ocs_iscsi_login_cxn_cleanup(ocs_cxn_t *cxn)
Frees any retry objects for the connection.