#include <iscsi.h>
Data Fields | |
| struct refcnt | refcnt |
| Reference counter. | |
| struct xfer_interface | socket |
| Transport-layer socket. | |
| char * | target_address |
| Target address. | |
| unsigned int | target_port |
| Target port. | |
| char * | target_iqn |
| Target IQN. | |
| struct scsi_lun | lun |
| Logical Unit Number (LUN). | |
| struct sockaddr | target_sockaddr |
| Target socket address (recorded only for iBFT). | |
| int | status |
| Session status. | |
| int | retry_count |
| Retry count. | |
| char * | initiator_username |
| Initiator username (if any). | |
| char * | initiator_password |
| Initiator password (if any). | |
| char * | target_username |
| Target username (if any). | |
| char * | target_password |
| Target password (if any). | |
| unsigned char | chap_challenge [17] |
| CHAP challenge (for target auth only). | |
| struct chap_response | chap |
| CHAP response (used for both initiator and target auth). | |
| uint16_t | tsih |
| Target session identifying handle. | |
| uint32_t | itt |
| Initiator task tag. | |
| uint32_t | ttt |
| Target transfer tag. | |
| uint32_t | transfer_offset |
| Transfer offset. | |
| uint32_t | transfer_len |
| Transfer length. | |
| uint32_t | cmdsn |
| Command sequence number. | |
| uint32_t | statsn |
| Status sequence number. | |
| union iscsi_bhs | tx_bhs |
| Basic header segment for current TX PDU. | |
| enum iscsi_tx_state | tx_state |
| State of the TX engine. | |
| struct process | process |
| TX process. | |
| union iscsi_bhs | rx_bhs |
| Basic header segment for current RX PDU. | |
| enum iscsi_rx_state | rx_state |
| State of the RX engine. | |
| size_t | rx_offset |
| Byte offset within the current RX state. | |
| size_t | rx_len |
| Length of the current RX state. | |
| void * | rx_buffer |
| Buffer for received data (not always used). | |
| struct scsi_command * | command |
| Current SCSI command. | |
| int | instant_rc |
| Instant return code. | |
Definition at line 496 of file iscsi.h.
struct refcnt iscsi_session::refcnt [read] |
struct xfer_interface iscsi_session::socket [read] |
Transport-layer socket.
Definition at line 501 of file iscsi.h.
Referenced by iscsi_attach(), iscsi_close_connection(), iscsi_detach(), iscsi_open_connection(), iscsi_tx_bhs(), iscsi_tx_data_out(), iscsi_tx_data_padding(), iscsi_tx_login_request(), and iscsi_tx_step().
Target address.
Definition at line 504 of file iscsi.h.
Referenced by iscsi_attach(), iscsi_free(), iscsi_handle_targetaddress_value(), iscsi_open_connection(), and iscsi_parse_root_path().
| unsigned int iscsi_session::target_port |
Target port.
Definition at line 506 of file iscsi.h.
Referenced by iscsi_handle_targetaddress_value(), iscsi_open_connection(), and iscsi_parse_root_path().
Target IQN.
Definition at line 508 of file iscsi.h.
Referenced by ibft_fill_target(), iscsi_attach(), iscsi_build_login_request_strings(), iscsi_free(), and iscsi_parse_root_path().
struct scsi_lun iscsi_session::lun [read] |
Logical Unit Number (LUN).
Definition at line 510 of file iscsi.h.
Referenced by iscsi_parse_root_path(), iscsi_start_command(), and iscsi_start_data_out().
struct sockaddr iscsi_session::target_sockaddr [read] |
Target socket address (recorded only for iBFT).
Definition at line 512 of file iscsi.h.
Referenced by ibft_fill_target(), and iscsi_vredirect().
Session status.
This is the bitwise-OR of zero or more ISCSI_STATUS_XXX constants.
Definition at line 519 of file iscsi.h.
Referenced by ibft_fill_target_chap(), ibft_fill_target_reverse_chap(), iscsi_build_login_request_strings(), iscsi_close_connection(), iscsi_command(), iscsi_handle_authmethod_value(), iscsi_handle_chap_c_value(), iscsi_handle_chap_r_value(), iscsi_login_request_done(), iscsi_open_connection(), iscsi_rx_login_response(), and iscsi_start_login().
Retry count.
Number of times that the connection has been retried. Reset upon a successful connection.
Definition at line 525 of file iscsi.h.
Referenced by iscsi_rx_login_response(), and iscsi_socket_close().
Initiator username (if any).
Definition at line 528 of file iscsi.h.
Referenced by ibft_fill_target_chap(), ibft_fill_target_reverse_chap(), iscsi_build_login_request_strings(), iscsi_free(), and iscsi_set_auth().
Initiator password (if any).
Definition at line 530 of file iscsi.h.
Referenced by ibft_fill_target_chap(), ibft_fill_target_reverse_chap(), iscsi_free(), iscsi_handle_chap_i_value(), and iscsi_set_auth().
Target username (if any).
Definition at line 532 of file iscsi.h.
Referenced by ibft_fill_target_reverse_chap(), iscsi_build_login_request_strings(), iscsi_free(), iscsi_handle_chap_c_value(), iscsi_handle_chap_n_value(), iscsi_open_connection(), and iscsi_set_auth().
Target password (if any).
Definition at line 534 of file iscsi.h.
Referenced by ibft_fill_target_reverse_chap(), iscsi_free(), iscsi_handle_chap_r_value(), and iscsi_set_auth().
| unsigned char iscsi_session::chap_challenge[17] |
CHAP challenge (for target auth only).
This is a block of random data; the first byte is used as the CHAP identifier (CHAP_I) and the remainder as the CHAP challenge (CHAP_C).
Definition at line 541 of file iscsi.h.
Referenced by iscsi_build_login_request_strings(), iscsi_handle_chap_c_value(), and iscsi_handle_chap_r_value().
struct chap_response iscsi_session::chap [read] |
CHAP response (used for both initiator and target auth).
Definition at line 543 of file iscsi.h.
Referenced by iscsi_build_login_request_strings(), iscsi_close_connection(), iscsi_free(), iscsi_handle_chap_c_value(), iscsi_handle_chap_i_value(), iscsi_handle_chap_r_value(), and iscsi_login_request_done().
Target session identifying handle.
This is assigned by the target when we first log in, and must be reused on subsequent login attempts.
Definition at line 550 of file iscsi.h.
Referenced by iscsi_rx_login_response(), and iscsi_start_login().
Initiator task tag.
This is the tag of the current command. It is incremented whenever a new command is started.
Definition at line 556 of file iscsi.h.
Referenced by iscsi_open_connection(), iscsi_start_command(), iscsi_start_data_out(), and iscsi_start_login().
Target transfer tag.
This is the tag attached to a sequence of data-out PDUs in response to an R2T.
Definition at line 562 of file iscsi.h.
Referenced by iscsi_rx_r2t(), and iscsi_start_data_out().
Transfer offset.
This is the offset for an in-progress sequence of data-out PDUs in response to an R2T.
Definition at line 569 of file iscsi.h.
Referenced by iscsi_rx_r2t(), and iscsi_start_data_out().
Transfer length.
This is the length for an in-progress sequence of data-out PDUs in response to an R2T.
Definition at line 576 of file iscsi.h.
Referenced by iscsi_rx_r2t(), and iscsi_start_data_out().
Command sequence number.
This is the sequence number of the current command, used to fill out the CmdSN field in iSCSI request PDUs. It is updated with the value of the ExpCmdSN field whenever we receive an iSCSI response PDU containing such a field.
Definition at line 584 of file iscsi.h.
Referenced by iscsi_rx_data(), iscsi_start_command(), and iscsi_start_login().
Status sequence number.
This is the most recent status sequence number present in the StatSN field of an iSCSI response PDU containing such a field. Whenever we send an iSCSI request PDU, we fill out the ExpStatSN field with this value plus one.
Definition at line 592 of file iscsi.h.
Referenced by iscsi_rx_data(), iscsi_start_command(), iscsi_start_data_out(), and iscsi_start_login().
union iscsi_bhs iscsi_session::tx_bhs [write] |
Basic header segment for current TX PDU.
Definition at line 595 of file iscsi.h.
Referenced by iscsi_data_out_done(), iscsi_start_command(), iscsi_start_data_out(), iscsi_start_login(), iscsi_start_tx(), iscsi_tx_bhs(), iscsi_tx_data(), iscsi_tx_data_out(), iscsi_tx_data_padding(), iscsi_tx_done(), iscsi_tx_login_request(), and iscsi_tx_step().
State of the TX engine.
Definition at line 597 of file iscsi.h.
Referenced by iscsi_close_connection(), iscsi_open_connection(), iscsi_scsi_done(), iscsi_start_tx(), and iscsi_tx_step().
struct process iscsi_session::process [read] |
TX process.
Definition at line 599 of file iscsi.h.
Referenced by iscsi_attach(), and iscsi_detach().
union iscsi_bhs iscsi_session::rx_bhs [write] |
Basic header segment for current RX PDU.
Definition at line 602 of file iscsi.h.
Referenced by iscsi_rx_bhs(), iscsi_rx_data(), iscsi_rx_data_in(), iscsi_rx_login_response(), iscsi_rx_r2t(), iscsi_rx_scsi_response(), and iscsi_socket_deliver_raw().
State of the RX engine.
Definition at line 604 of file iscsi.h.
Referenced by iscsi_close_connection(), iscsi_open_connection(), and iscsi_socket_deliver_raw().
Byte offset within the current RX state.
Definition at line 606 of file iscsi.h.
Referenced by iscsi_close_connection(), iscsi_open_connection(), iscsi_rx_bhs(), iscsi_rx_buffered_data(), iscsi_rx_data_in(), iscsi_rx_scsi_response(), and iscsi_socket_deliver_raw().
Length of the current RX state.
Definition at line 608 of file iscsi.h.
Referenced by iscsi_rx_buffered_data(), iscsi_rx_login_response(), and iscsi_socket_deliver_raw().
| void* iscsi_session::rx_buffer |
Buffer for received data (not always used).
Definition at line 610 of file iscsi.h.
Referenced by iscsi_rx_buffered_data(), iscsi_rx_buffered_data_done(), and iscsi_rx_login_response().
struct scsi_command* iscsi_session::command [read] |
Current SCSI command.
Set to NULL when command is complete.
Definition at line 616 of file iscsi.h.
Referenced by iscsi_command(), iscsi_rx_data_in(), iscsi_rx_scsi_response(), iscsi_scsi_done(), iscsi_start_command(), and iscsi_tx_data_out().
Instant return code.
Set to a non-zero value if all requests should return immediately. This can be used to e.g. avoid retrying logins that are doomed to fail authentication.
Definition at line 623 of file iscsi.h.
Referenced by iscsi_command(), iscsi_rx_login_response(), and iscsi_socket_close().
1.5.7.1