iPXE
|
An iSCSI session. More...
#include <iscsi.h>
Data Fields | |
struct refcnt | refcnt |
Reference counter. More... | |
struct interface | control |
SCSI command-issuing interface. More... | |
struct interface | data |
SCSI command interface. More... | |
struct interface | socket |
Transport-layer socket. More... | |
char * | initiator_iqn |
Initiator IQN. More... | |
char * | target_address |
Target address. More... | |
unsigned int | target_port |
Target port. More... | |
char * | target_iqn |
Target IQN. More... | |
int | status |
Session status. More... | |
char * | initiator_username |
Initiator username (if any) More... | |
char * | initiator_password |
Initiator password (if any) More... | |
char * | target_username |
Target username (if any) More... | |
char * | target_password |
Target password (if any) More... | |
unsigned char | chap_challenge [17] |
CHAP challenge (for target auth only) More... | |
struct chap_response | chap |
CHAP response (used for both initiator and target auth) More... | |
size_t | max_burst_len |
Maximum burst length. More... | |
uint16_t | isid_iana_qual |
Initiator session ID (IANA format) qualifier. More... | |
uint32_t | itt |
Initiator task tag. More... | |
uint32_t | ttt |
Target transfer tag. More... | |
uint32_t | transfer_offset |
Transfer offset. More... | |
uint32_t | transfer_len |
Transfer length. More... | |
uint32_t | cmdsn |
Command sequence number. More... | |
uint32_t | statsn |
Status sequence number. More... | |
union iscsi_bhs | tx_bhs |
Basic header segment for current TX PDU. More... | |
enum iscsi_tx_state | tx_state |
State of the TX engine. More... | |
struct process | process |
TX process. More... | |
union iscsi_bhs | rx_bhs |
Basic header segment for current RX PDU. More... | |
enum iscsi_rx_state | rx_state |
State of the RX engine. More... | |
size_t | rx_offset |
Byte offset within the current RX state. More... | |
size_t | rx_len |
Length of the current RX state. More... | |
void * | rx_buffer |
Buffer for received data (not always used) More... | |
struct scsi_cmd * | command |
Current SCSI command, if any. More... | |
struct sockaddr | target_sockaddr |
Target socket address (for boot firmware table) More... | |
struct scsi_lun | lun |
SCSI LUN (for boot firmware table) More... | |
struct acpi_descriptor | desc |
ACPI descriptor. More... | |
struct refcnt iscsi_session::refcnt |
struct interface iscsi_session::control |
SCSI command-issuing interface.
Definition at line 549 of file iscsi.h.
Referenced by iscsi_close(), iscsi_open(), and iscsi_rx_login_response().
struct interface iscsi_session::data |
SCSI command interface.
Definition at line 551 of file iscsi.h.
Referenced by iscsi_close(), iscsi_command_close(), iscsi_open(), iscsi_scsi_command(), and iscsi_scsi_done().
struct interface iscsi_session::socket |
Transport-layer socket.
Definition at line 553 of file iscsi.h.
Referenced by iscsi_close(), iscsi_close_connection(), iscsi_open(), iscsi_open_connection(), iscsi_tx_bhs(), iscsi_tx_data_out(), iscsi_tx_login_request(), iscsi_tx_step(), and iscsi_vredirect().
char* iscsi_session::initiator_iqn |
Initiator IQN.
Definition at line 556 of file iscsi.h.
Referenced by ibft_install(), iscsi_build_login_request_strings(), iscsi_fetch_settings(), iscsi_free(), and iscsi_open().
char* iscsi_session::target_address |
Target address.
Definition at line 558 of file iscsi.h.
Referenced by iscsi_free(), iscsi_handle_targetaddress_value(), iscsi_open(), iscsi_open_connection(), and iscsi_parse_root_path().
unsigned int iscsi_session::target_port |
Target port.
Definition at line 560 of file iscsi.h.
Referenced by iscsi_handle_targetaddress_value(), iscsi_open_connection(), and iscsi_parse_root_path().
char* iscsi_session::target_iqn |
Target IQN.
Definition at line 562 of file iscsi.h.
Referenced by efi_iscsi_path(), ibft_fill_target(), iscsi_build_login_request_strings(), iscsi_free(), iscsi_open(), and iscsi_parse_root_path().
int iscsi_session::status |
Session status.
This is the bitwise-OR of zero or more ISCSI_STATUS_XXX constants.
Definition at line 569 of file iscsi.h.
Referenced by ibft_fill_target_chap(), ibft_fill_target_reverse_chap(), iscsi_build_login_request_strings(), iscsi_close_connection(), 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(), iscsi_scsi_window(), and iscsi_start_login().
char* iscsi_session::initiator_username |
Initiator username (if any)
Definition at line 572 of file iscsi.h.
Referenced by ibft_fill_target_chap(), ibft_fill_target_reverse_chap(), iscsi_build_login_request_strings(), iscsi_check_auth(), iscsi_fetch_settings(), and iscsi_free().
char* iscsi_session::initiator_password |
Initiator password (if any)
Definition at line 574 of file iscsi.h.
Referenced by ibft_fill_target_chap(), ibft_fill_target_reverse_chap(), iscsi_check_auth(), iscsi_fetch_settings(), iscsi_free(), and iscsi_handle_chap_i_value().
char* iscsi_session::target_username |
Target username (if any)
Definition at line 576 of file iscsi.h.
Referenced by ibft_fill_target_reverse_chap(), iscsi_build_login_request_strings(), iscsi_check_auth(), iscsi_fetch_settings(), iscsi_free(), iscsi_handle_chap_c_value(), iscsi_handle_chap_n_value(), and iscsi_open_connection().
char* iscsi_session::target_password |
Target password (if any)
Definition at line 578 of file iscsi.h.
Referenced by ibft_fill_target_reverse_chap(), iscsi_check_auth(), iscsi_fetch_settings(), iscsi_free(), and iscsi_handle_chap_r_value().
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 585 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 |
CHAP response (used for both initiator and target auth)
Definition at line 587 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().
size_t iscsi_session::max_burst_len |
Maximum burst length.
Definition at line 590 of file iscsi.h.
Referenced by iscsi_handle_maxburstlength_value(), iscsi_open_connection(), and iscsi_scsi_capacity().
uint16_t iscsi_session::isid_iana_qual |
Initiator session ID (IANA format) qualifier.
This is part of the ISID. It is generated randomly whenever a new connection is opened.
Definition at line 597 of file iscsi.h.
Referenced by iscsi_open_connection(), and iscsi_start_login().
uint32_t iscsi_session::itt |
Initiator task tag.
This is the tag of the current command. It is incremented whenever a new command is started.
Definition at line 603 of file iscsi.h.
Referenced by iscsi_new_itt(), iscsi_scsi_command(), iscsi_scsi_done(), iscsi_start_command(), iscsi_start_data_out(), and iscsi_start_login().
uint32_t iscsi_session::ttt |
Target transfer tag.
This is the tag attached to a sequence of data-out PDUs in response to an R2T.
Definition at line 609 of file iscsi.h.
Referenced by iscsi_rx_r2t(), and iscsi_start_data_out().
uint32_t iscsi_session::transfer_offset |
Transfer offset.
This is the offset for an in-progress sequence of data-out PDUs in response to an R2T.
Definition at line 615 of file iscsi.h.
Referenced by iscsi_rx_r2t(), and iscsi_start_data_out().
uint32_t iscsi_session::transfer_len |
Transfer length.
This is the length for an in-progress sequence of data-out PDUs in response to an R2T.
Definition at line 621 of file iscsi.h.
Referenced by iscsi_rx_r2t(), and iscsi_start_data_out().
uint32_t iscsi_session::cmdsn |
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 629 of file iscsi.h.
Referenced by iscsi_rx_data(), iscsi_start_command(), and iscsi_start_login().
uint32_t iscsi_session::statsn |
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 637 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 |
Basic header segment for current TX PDU.
Definition at line 640 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_done(), iscsi_tx_login_request(), and iscsi_tx_step().
enum iscsi_tx_state iscsi_session::tx_state |
State of the TX engine.
Definition at line 642 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 |
TX process.
Definition at line 644 of file iscsi.h.
Referenced by iscsi_close(), iscsi_open(), iscsi_tx_pause(), and iscsi_tx_resume().
union iscsi_bhs iscsi_session::rx_bhs |
Basic header segment for current RX PDU.
Definition at line 647 of file iscsi.h.
Referenced by iscsi_rx_bhs(), iscsi_rx_data(), iscsi_rx_data_in(), iscsi_rx_login_response(), iscsi_rx_nop_in(), iscsi_rx_r2t(), iscsi_rx_scsi_response(), and iscsi_socket_deliver().
enum iscsi_rx_state iscsi_session::rx_state |
State of the RX engine.
Definition at line 649 of file iscsi.h.
Referenced by iscsi_close_connection(), iscsi_open_connection(), and iscsi_socket_deliver().
size_t iscsi_session::rx_offset |
Byte offset within the current RX state.
Definition at line 651 of file iscsi.h.
Referenced by iscsi_close_connection(), iscsi_open_connection(), iscsi_rx_bhs(), iscsi_rx_buffered_data(), iscsi_rx_data_in(), and iscsi_socket_deliver().
size_t iscsi_session::rx_len |
Length of the current RX state.
Definition at line 653 of file iscsi.h.
Referenced by iscsi_rx_buffered_data(), iscsi_rx_login_response(), and iscsi_socket_deliver().
void* iscsi_session::rx_buffer |
Buffer for received data (not always used)
Definition at line 655 of file iscsi.h.
Referenced by iscsi_rx_buffered_data(), iscsi_rx_buffered_data_done(), iscsi_rx_login_response(), and iscsi_rx_scsi_response().
struct scsi_cmd* iscsi_session::command |
Current SCSI command, if any.
Definition at line 658 of file iscsi.h.
Referenced by iscsi_command_close(), iscsi_free(), iscsi_rx_data_in(), iscsi_scsi_command(), iscsi_scsi_done(), iscsi_scsi_window(), iscsi_start_command(), iscsi_start_data_out(), and iscsi_tx_data_out().
struct sockaddr iscsi_session::target_sockaddr |
Target socket address (for boot firmware table)
Definition at line 661 of file iscsi.h.
Referenced by efi_iscsi_path(), ibft_complete(), ibft_fill_target(), ibft_fill_target_nic_association(), ibft_netdev_is_required(), and iscsi_vredirect().
struct scsi_lun iscsi_session::lun |
SCSI LUN (for boot firmware table)
Definition at line 663 of file iscsi.h.
Referenced by efi_iscsi_path(), ibft_fill_target(), iscsi_open(), and iscsi_parse_root_path().
struct acpi_descriptor iscsi_session::desc |
ACPI descriptor.
Definition at line 665 of file iscsi.h.
Referenced by iscsi_describe(), and iscsi_open().