iPXE
Data Fields
iscsi_session Struct Reference

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_cmdcommand
 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...
 

Detailed Description

An iSCSI session.

Definition at line 544 of file iscsi.h.

Field Documentation

◆ refcnt

struct refcnt iscsi_session::refcnt

Reference counter.

Definition at line 546 of file iscsi.h.

Referenced by iscsi_open().

◆ control

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().

◆ data

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().

◆ socket

struct interface iscsi_session::socket

◆ initiator_iqn

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().

◆ target_address

char* iscsi_session::target_address

◆ target_port

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().

◆ target_iqn

char* iscsi_session::target_iqn

◆ status

int iscsi_session::status

◆ initiator_username

char* iscsi_session::initiator_username

◆ initiator_password

char* iscsi_session::initiator_password

◆ target_username

char* iscsi_session::target_username

◆ target_password

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().

◆ chap_challenge

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().

◆ chap

struct chap_response iscsi_session::chap

◆ max_burst_len

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().

◆ isid_iana_qual

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().

◆ itt

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().

◆ ttt

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().

◆ transfer_offset

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().

◆ transfer_len

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().

◆ cmdsn

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().

◆ statsn

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().

◆ tx_bhs

union iscsi_bhs iscsi_session::tx_bhs

◆ tx_state

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().

◆ process

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().

◆ rx_bhs

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().

◆ rx_state

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().

◆ rx_offset

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().

◆ rx_len

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().

◆ rx_buffer

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().

◆ command

struct scsi_cmd* iscsi_session::command

◆ target_sockaddr

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().

◆ lun

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().

◆ desc

struct acpi_descriptor iscsi_session::desc

ACPI descriptor.

Definition at line 665 of file iscsi.h.

Referenced by iscsi_describe(), and iscsi_open().


The documentation for this struct was generated from the following file: