TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _ISCSI_BASIC_HEADER |
struct | _ISCSI_ADDTIONAL_HEADER |
struct | _ISCSI_BI_EXP_READ_DATA_LEN_AHS |
struct | _SCSI_COMMAND |
struct | _SCSI_RESPONSE |
struct | _ISCSI_SENSE_DATA |
struct | _ISCSI_TMF_REQUEST |
struct | _ISCSI_TMF_RESPONSE |
struct | _ISCSI_SCSI_DATA_OUT |
struct | _ISCSI_SCSI_DATA_IN |
struct | _ISCSI_READY_TO_TRANSFER |
struct | _ISCSI_ASYNC_MESSAGE |
struct | _ISCSI_LOGIN_REQUEST |
struct | _ISCSI_LOGIN_RESPONSE |
struct | _ISCSI_LOGOUT_REQUEST |
struct | _ISCSI_LOGOUT_RESPONSE |
struct | _ISCSI_SNACK_REQUEST |
struct | _ISCSI_REJECT |
struct | _ISCSI_NOP_OUT |
struct | _ISCSI_NOP_IN |
struct | _ISCSI_XFER_CONTEXT |
struct | _ISCSI_IN_BUFFER_CONTEXT |
struct | _ISCSI_TCB |
struct | _ISCSI_KEY_VALUE_PAIR |
Enumerations | |
enum | DATA_DIRECTION { DataIn = 0 , DataOut = 1 , DataBi = 2 } |
enum | ISCSI_DIGEST_TYPE { IScsiDigestNone , IScsiDigestCRC32 } |
The header file of iSCSI Protocol that defines many specific data structures.
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file IScsiProto.h.
#define CONN_STATE_CLEANUP_WAIT 6 |
Definition at line 78 of file IScsiProto.h.
#define CONN_STATE_FREE 0 |
connection state for initiator
Definition at line 72 of file IScsiProto.h.
#define CONN_STATE_IN_CLEANUP 7 |
Definition at line 79 of file IScsiProto.h.
#define CONN_STATE_IN_LOGIN 2 |
Definition at line 74 of file IScsiProto.h.
#define CONN_STATE_IN_LOGOUT 4 |
Definition at line 76 of file IScsiProto.h.
#define CONN_STATE_LOGGED_IN 3 |
Definition at line 75 of file IScsiProto.h.
#define CONN_STATE_LOGOUT_REQUESTED 5 |
Definition at line 77 of file IScsiProto.h.
#define CONN_STATE_XPT_WAIT 1 |
Definition at line 73 of file IScsiProto.h.
#define DEFAULT_MAX_OUTSTANDING_R2T 1 |
Definition at line 32 of file IScsiProto.h.
#define DEFAULT_MAX_RECV_DATA_SEG_LEN 8192 |
Definition at line 30 of file IScsiProto.h.
#define HTON24 | ( | Dst, | |
Src | |||
) |
Definition at line 107 of file IScsiProto.h.
#define ISCSI_AHS_TYPE_BI_EXP_READ_DATA_LEN 0x2 |
Definition at line 158 of file IScsiProto.h.
#define ISCSI_AHS_TYPE_EXT_CDB 0x1 |
Definition at line 157 of file IScsiProto.h.
#define ISCSI_BHS_FLAG_FINAL 0x80 |
Definition at line 152 of file IScsiProto.h.
#define ISCSI_CHECK_MEDIA_GET_DHCP_WAITING_TIME EFI_TIMER_PERIOD_SECONDS(20) |
Definition at line 38 of file IScsiProto.h.
#define ISCSI_CHECK_MEDIA_LOGIN_WAITING_TIME EFI_TIMER_PERIOD_SECONDS(20) |
Definition at line 37 of file IScsiProto.h.
#define ISCSI_CHECK_OPCODE | ( | PduHdr, | |
Op | |||
) | ((((PduHdr)->OpCode) & ISCSI_OPCODE_MASK) == (Op)) |
Definition at line 95 of file IScsiProto.h.
#define ISCSI_CLEAR_FLAG | ( | PduHdr, | |
Flag | |||
) | (((ISCSI_BASIC_HEADER *) (PduHdr))->Flags &= ~(Flag)) |
Definition at line 98 of file IScsiProto.h.
#define ISCSI_CMD_PDU_TASK_ATTR_MASK 0x07 |
Definition at line 163 of file IScsiProto.h.
#define ISCSI_FLAG_ON | ( | PduHdr, | |
Flag | |||
) | ((BOOLEAN) ((((ISCSI_BASIC_HEADER *) (PduHdr))->Flags & (Flag)) == (Flag))) |
Definition at line 99 of file IScsiProto.h.
#define ISCSI_FULL_FEATURE_PHASE 3 |
Definition at line 229 of file IScsiProto.h.
#define ISCSI_GET_BUFFER_OFFSET | ( | PduHdr | ) | NTOHL (((ISCSI_SCSI_DATA_IN *) (PduHdr))->BufferOffset) |
Definition at line 118 of file IScsiProto.h.
#define ISCSI_GET_CURRENT_STAGE | ( | PduHdr | ) | ((UINT8) (((PduHdr)->Flags >> 2) & 0x3)) |
Definition at line 101 of file IScsiProto.h.
#define ISCSI_GET_DATASEG_LEN | ( | PduHdr | ) | NTOH24 (((ISCSI_BASIC_HEADER *) (PduHdr))->DataSegmentLength) |
Definition at line 116 of file IScsiProto.h.
#define ISCSI_GET_NEXT_STAGE | ( | PduHdr | ) | ((UINT8) (((PduHdr)->Flags) & 0x3)) |
Definition at line 102 of file IScsiProto.h.
#define ISCSI_GET_OPCODE | ( | PduHdr | ) | ((((ISCSI_BASIC_HEADER *) (PduHdr))->OpCode) & ISCSI_OPCODE_MASK) |
Definition at line 94 of file IScsiProto.h.
#define ISCSI_GET_PAD_LEN | ( | DataLen | ) | ((~(DataLen) + 1) & 0x3) |
Definition at line 104 of file IScsiProto.h.
#define ISCSI_IMMEDIATE_ON | ( | PduHdr | ) | ((PduHdr)->OpCode & ISCSI_REQ_IMMEDIATE) |
Definition at line 96 of file IScsiProto.h.
#define ISCSI_KEY_AUTH_METHOD "AuthMethod" |
Definition at line 43 of file IScsiProto.h.
#define ISCSI_KEY_DATA_DIGEST "DataDigest" |
Definition at line 45 of file IScsiProto.h.
#define ISCSI_KEY_DATA_PDU_IN_ORDER "DataPDUInOrder" |
Definition at line 60 of file IScsiProto.h.
#define ISCSI_KEY_DATA_SEQUENCE_IN_ORDER "DataSequenceInOrder" |
Definition at line 61 of file IScsiProto.h.
#define ISCSI_KEY_DEFAULT_TIME2RETAIN "DefaultTime2Retain" |
Definition at line 58 of file IScsiProto.h.
#define ISCSI_KEY_DEFAULT_TIME2WAIT "DefaultTime2Wait" |
Definition at line 57 of file IScsiProto.h.
#define ISCSI_KEY_ERROR_RECOVERY_LEVEL "ErrorRecoveryLevel" |
Definition at line 62 of file IScsiProto.h.
#define ISCSI_KEY_FIRST_BURST_LENGTH "FirstBurstLength" |
Definition at line 56 of file IScsiProto.h.
#define ISCSI_KEY_HEADER_DIGEST "HeaderDigest" |
Definition at line 44 of file IScsiProto.h.
#define ISCSI_KEY_IMMEDIATE_DATA "ImmediateData" |
Definition at line 53 of file IScsiProto.h.
#define ISCSI_KEY_INITIAL_R2T "InitialR2T" |
Definition at line 52 of file IScsiProto.h.
#define ISCSI_KEY_INITIATOR_ALIAS "InitiatorAlias" |
Definition at line 50 of file IScsiProto.h.
#define ISCSI_KEY_INITIATOR_NAME "InitiatorName" |
Definition at line 48 of file IScsiProto.h.
#define ISCSI_KEY_MAX_BURST_LENGTH "MaxBurstLength" |
Definition at line 55 of file IScsiProto.h.
#define ISCSI_KEY_MAX_CONNECTIONS "MaxConnections" |
Definition at line 46 of file IScsiProto.h.
#define ISCSI_KEY_MAX_OUTSTANDING_R2T "MaxOutstandingR2T" |
Definition at line 59 of file IScsiProto.h.
#define ISCSI_KEY_MAX_RECV_DATA_SEGMENT_LENGTH "MaxRecvDataSegmentLength" |
Definition at line 64 of file IScsiProto.h.
#define ISCSI_KEY_SESSION_TYPE "SessionType" |
Definition at line 63 of file IScsiProto.h.
#define ISCSI_KEY_TARGET_ADDRESS "TargetAddress" |
Definition at line 51 of file IScsiProto.h.
#define ISCSI_KEY_TARGET_ALIAS "TargetAlias" |
Definition at line 49 of file IScsiProto.h.
#define ISCSI_KEY_TARGET_NAME "TargetName" |
Definition at line 47 of file IScsiProto.h.
#define ISCSI_KEY_TARGET_PORTAL_GROUP_TAG "TargetPortalGroupTag" |
Definition at line 54 of file IScsiProto.h.
#define ISCSI_KEY_VALUE_NONE "None" |
Definition at line 66 of file IScsiProto.h.
#define ISCSI_LOGIN_OPERATIONAL_NEGOTIATION 1 |
Definition at line 228 of file IScsiProto.h.
#define ISCSI_LOGIN_REQ_PDU_FLAG_CONTINUE 0x40 |
Definition at line 203 of file IScsiProto.h.
#define ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT 0x80 |
Definition at line 202 of file IScsiProto.h.
#define ISCSI_LOGIN_RSP_PDU_FLAG_CONTINUE ISCSI_LOGIN_REQ_PDU_FLAG_CONTINUE |
Definition at line 206 of file IScsiProto.h.
#define ISCSI_LOGIN_RSP_PDU_FLAG_TRANSIT ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT |
Definition at line 205 of file IScsiProto.h.
#define ISCSI_LOGIN_STATUS_INITIATOR_ERROR 2 |
Definition at line 210 of file IScsiProto.h.
#define ISCSI_LOGIN_STATUS_REDIRECTION 1 |
Definition at line 209 of file IScsiProto.h.
#define ISCSI_LOGIN_STATUS_SUCCESS 0 |
Definition at line 208 of file IScsiProto.h.
#define ISCSI_LOGIN_STATUS_TARGET_ERROR 3 |
Definition at line 211 of file IScsiProto.h.
#define ISCSI_LOGOUT_REASON_CLOSE_CONNECTION 1 |
Definition at line 214 of file IScsiProto.h.
#define ISCSI_LOGOUT_REASON_CLOSE_SESSION 0 |
Definition at line 213 of file IScsiProto.h.
#define ISCSI_LOGOUT_REASON_REMOVE_CONNECTION_FOR_RECOVERY 2 |
Definition at line 215 of file IScsiProto.h.
#define ISCSI_LOGOUT_RESPONSE_CID_NOT_FOUND 1 |
Definition at line 218 of file IScsiProto.h.
#define ISCSI_LOGOUT_RESPONSE_CLEANUP_FAILED 3 |
Definition at line 220 of file IScsiProto.h.
#define ISCSI_LOGOUT_RESPONSE_RECOVERY_NOT_SUPPORTED 2 |
Definition at line 219 of file IScsiProto.h.
#define ISCSI_LOGOUT_RESPONSE_SESSION_CLOSED_SUCCESS 0 |
Definition at line 217 of file IScsiProto.h.
#define ISCSI_MAX_CONNS_PER_SESSION 1 |
Definition at line 28 of file IScsiProto.h.
#define ISCSI_OPCODE_ASYNC_MSG 0x32 |
Definition at line 146 of file IScsiProto.h.
#define ISCSI_OPCODE_LOGIN_REQ 0x03 |
Definition at line 126 of file IScsiProto.h.
#define ISCSI_OPCODE_LOGIN_RSP 0x23 |
Definition at line 141 of file IScsiProto.h.
#define ISCSI_OPCODE_LOGOUT_REQ 0x06 |
Definition at line 129 of file IScsiProto.h.
#define ISCSI_OPCODE_LOGOUT_RSP 0x26 |
Definition at line 144 of file IScsiProto.h.
#define ISCSI_OPCODE_MASK 0x3F |
Definition at line 91 of file IScsiProto.h.
#define ISCSI_OPCODE_NOP_IN 0x20 |
Definition at line 138 of file IScsiProto.h.
#define ISCSI_OPCODE_NOP_OUT 0x00 |
Definition at line 123 of file IScsiProto.h.
#define ISCSI_OPCODE_R2T 0x31 |
Definition at line 145 of file IScsiProto.h.
#define ISCSI_OPCODE_REJECT 0x3f |
Definition at line 150 of file IScsiProto.h.
#define ISCSI_OPCODE_SCSI_CMD 0x01 |
Definition at line 124 of file IScsiProto.h.
#define ISCSI_OPCODE_SCSI_DATA_IN 0x25 |
Definition at line 143 of file IScsiProto.h.
#define ISCSI_OPCODE_SCSI_DATA_OUT 0x05 |
Definition at line 128 of file IScsiProto.h.
#define ISCSI_OPCODE_SCSI_RSP 0x21 |
Definition at line 139 of file IScsiProto.h.
#define ISCSI_OPCODE_SCSI_TMF_REQ 0x02 |
Definition at line 125 of file IScsiProto.h.
#define ISCSI_OPCODE_SCSI_TMF_RSP 0x22 |
Definition at line 140 of file IScsiProto.h.
#define ISCSI_OPCODE_SNACK_REQ 0x10 |
Definition at line 130 of file IScsiProto.h.
#define ISCSI_OPCODE_TEXT_REQ 0x04 |
Definition at line 127 of file IScsiProto.h.
#define ISCSI_OPCODE_TEXT_RSP 0x24 |
Definition at line 142 of file IScsiProto.h.
#define ISCSI_OPCODE_VENDOR_I0 0x1c |
Definition at line 131 of file IScsiProto.h.
#define ISCSI_OPCODE_VENDOR_I1 0x1d |
Definition at line 132 of file IScsiProto.h.
#define ISCSI_OPCODE_VENDOR_I2 0x1e |
Definition at line 133 of file IScsiProto.h.
#define ISCSI_OPCODE_VENDOR_T0 0x3c |
Definition at line 147 of file IScsiProto.h.
#define ISCSI_OPCODE_VENDOR_T1 0x3d |
Definition at line 148 of file IScsiProto.h.
#define ISCSI_OPCODE_VENDOR_T2 0x3e |
Definition at line 149 of file IScsiProto.h.
#define ISCSI_REDIRECT_ADDR_END_DELIMITER ']' |
Definition at line 41 of file IScsiProto.h.
#define ISCSI_REDIRECT_ADDR_START_DELIMITER '[' |
Definition at line 40 of file IScsiProto.h.
#define ISCSI_REQ_IMMEDIATE 0x40 |
Definition at line 90 of file IScsiProto.h.
#define ISCSI_RESERVED_TAG 0xffffffff |
Definition at line 88 of file IScsiProto.h.
#define ISCSI_ROUNDUP | ( | DataLen | ) | (((DataLen) + 3) &~(0x3)) |
Definition at line 105 of file IScsiProto.h.
#define ISCSI_SECURITY_NEGOTIATION 0 |
Definition at line 227 of file IScsiProto.h.
#define ISCSI_SEQ_EQ | ( | s1, | |
s2 | |||
) | ((s1) == (s2)) |
Definition at line 15 of file IScsiProto.h.
#define ISCSI_SEQ_GT | ( | s1, | |
s2 | |||
) |
Definition at line 21 of file IScsiProto.h.
#define ISCSI_SEQ_LT | ( | s1, | |
s2 | |||
) |
Definition at line 16 of file IScsiProto.h.
#define ISCSI_SERVICE_RSP_COMMAND_COMPLETE_AT_TARGET 0x00 |
Definition at line 185 of file IScsiProto.h.
#define ISCSI_SERVICE_RSP_TARGET_FAILURE 0x01 |
Definition at line 186 of file IScsiProto.h.
#define ISCSI_SET_DATASEG_LEN | ( | PduHdr, | |
Len | |||
) | HTON24 (((ISCSI_BASIC_HEADER *) (PduHdr))->DataSegmentLength, (Len)) |
Definition at line 117 of file IScsiProto.h.
#define ISCSI_SET_FLAG | ( | PduHdr, | |
Flag | |||
) | (((ISCSI_BASIC_HEADER *) (PduHdr))->Flags |= (BOOLEAN)(Flag)) |
Definition at line 97 of file IScsiProto.h.
#define ISCSI_SET_OPCODE | ( | PduHdr, | |
Op, | |||
Flgs | |||
) | ((((ISCSI_BASIC_HEADER *) (PduHdr))->OpCode) = ((Op) | (Flgs))) |
Definition at line 93 of file IScsiProto.h.
#define ISCSI_SET_STAGES | ( | PduHdr, | |
Cur, | |||
Nxt | |||
) | ((PduHdr)->Flags = (UINT8) ((PduHdr)->Flags | ((Cur) << 2 | (Nxt)))) |
Definition at line 100 of file IScsiProto.h.
#define ISCSI_SNACK_REQUEST_TYPE_DATA_ACK 2 |
Definition at line 224 of file IScsiProto.h.
#define ISCSI_SNACK_REQUEST_TYPE_DATA_OR_R2T 0 |
Definition at line 222 of file IScsiProto.h.
#define ISCSI_SNACK_REQUEST_TYPE_RDATA 3 |
Definition at line 225 of file IScsiProto.h.
#define ISCSI_SNACK_REQUEST_TYPE_STATUS 1 |
Definition at line 223 of file IScsiProto.h.
#define ISCSI_TASK_ATTR_ACA 0x04 |
Definition at line 172 of file IScsiProto.h.
#define ISCSI_TASK_ATTR_HOQ 0x03 |
Definition at line 171 of file IScsiProto.h.
#define ISCSI_TASK_ATTR_ORDERD 0x02 |
Definition at line 170 of file IScsiProto.h.
#define ISCSI_TASK_ATTR_SIMPLE 0x01 |
Definition at line 169 of file IScsiProto.h.
#define ISCSI_TASK_ATTR_UNTAGGED 0x00 |
Definition at line 168 of file IScsiProto.h.
#define ISCSI_TMF_RSP_PDU_RSP_FUNCTION_AHTH_FAILED 6 |
Definition at line 194 of file IScsiProto.h.
#define ISCSI_TMF_RSP_PDU_RSP_FUNCTION_COMPLETE 0 |
Definition at line 188 of file IScsiProto.h.
#define ISCSI_TMF_RSP_PDU_RSP_FUNCTION_REJECTED 255 |
Definition at line 195 of file IScsiProto.h.
#define ISCSI_TMF_RSP_PDU_RSP_LUN_NOT_EXIST 2 |
Definition at line 190 of file IScsiProto.h.
#define ISCSI_TMF_RSP_PDU_RSP_NOT_SUPPORTED 5 |
Definition at line 193 of file IScsiProto.h.
#define ISCSI_TMF_RSP_PDU_RSP_TASK_NOT_EXIST 1 |
Definition at line 189 of file IScsiProto.h.
#define ISCSI_TMF_RSP_PDU_RSP_TASK_REASSGIN_NOT_SUPPORTED 4 |
Definition at line 192 of file IScsiProto.h.
#define ISCSI_TMF_RSP_PDU_RSP_TASK_STILL_ALLEGIANT 3 |
Definition at line 191 of file IScsiProto.h.
#define ISCSI_VERSION_MAX 0x00 |
Definition at line 34 of file IScsiProto.h.
#define ISCSI_VERSION_MIN 0x00 |
Definition at line 35 of file IScsiProto.h.
#define ISCSI_WELL_KNOWN_PORT 3260 |
Definition at line 27 of file IScsiProto.h.
#define MAX_RECV_DATA_SEG_LEN_IN_FFP 65536 |
Definition at line 31 of file IScsiProto.h.
#define NTOH24 | ( | src | ) | (((src)[0] << 16) | ((src)[1] << 8) | ((src)[2])) |
Definition at line 114 of file IScsiProto.h.
#define SCSI_CMD_PDU_FLAG_READ 0x40 |
Definition at line 160 of file IScsiProto.h.
#define SCSI_CMD_PDU_FLAG_WRITE 0x20 |
Definition at line 161 of file IScsiProto.h.
#define SCSI_DATA_IN_PDU_FLAG_ACKKNOWLEDGE 0x40 |
Definition at line 197 of file IScsiProto.h.
#define SCSI_DATA_IN_PDU_FLAG_OVERFLOW SCSI_RSP_PDU_FLAG_OVERFLOW |
Definition at line 198 of file IScsiProto.h.
#define SCSI_DATA_IN_PDU_FLAG_STATUS_VALID 0x01 |
Definition at line 200 of file IScsiProto.h.
#define SCSI_DATA_IN_PDU_FLAG_UNDERFLOW SCSI_RSP_PDU_FLAG_UNDERFLOW |
Definition at line 199 of file IScsiProto.h.
#define SCSI_RSP_PDU_FLAG_BI_READ_OVERFLOW 0x10 |
Definition at line 177 of file IScsiProto.h.
#define SCSI_RSP_PDU_FLAG_BI_READ_UNDERFLOW 0x08 |
Definition at line 178 of file IScsiProto.h.
#define SCSI_RSP_PDU_FLAG_OVERFLOW 0x04 |
Definition at line 179 of file IScsiProto.h.
#define SCSI_RSP_PDU_FLAG_UNDERFLOW 0x02 |
Definition at line 180 of file IScsiProto.h.
#define SESSION_STATE_FAILED 2 |
Definition at line 86 of file IScsiProto.h.
#define SESSION_STATE_FREE 0 |
session state for initiator
Definition at line 84 of file IScsiProto.h.
#define SESSION_STATE_LOGGED_IN 1 |
Definition at line 85 of file IScsiProto.h.
typedef struct _ISCSI_BASIC_HEADER ISCSI_BASIC_HEADER |
iSCSI Basic Header Segment
typedef struct _ISCSI_CONNECTION ISCSI_CONNECTION |
Definition at line 232 of file IScsiProto.h.
typedef struct _ISCSI_LOGIN_REQUEST ISCSI_LOGIN_REQUEST |
Login Request.
typedef struct _ISCSI_LOGIN_RESPONSE ISCSI_LOGIN_RESPONSE |
Login Response.
typedef struct _ISCSI_LOGOUT_REQUEST ISCSI_LOGOUT_REQUEST |
Logout Request.
typedef struct _ISCSI_LOGOUT_RESPONSE ISCSI_LOGOUT_RESPONSE |
Logout Response.
typedef struct _ISCSI_NOP_IN ISCSI_NOP_IN |
NOP-In.
typedef struct _ISCSI_NOP_OUT ISCSI_NOP_OUT |
NOP-Out.
typedef struct _ISCSI_READY_TO_TRANSFER ISCSI_READY_TO_TRANSFER |
Ready To Transfer.
typedef struct _ISCSI_REJECT ISCSI_REJECT |
Reject.
typedef struct _ISCSI_SCSI_DATA_IN ISCSI_SCSI_DATA_IN |
SCSI Data-In
typedef struct _ISCSI_SCSI_DATA_OUT ISCSI_SCSI_DATA_OUT |
SCSI Data-Out
typedef struct _ISCSI_SESSION ISCSI_SESSION |
Definition at line 231 of file IScsiProto.h.
typedef struct _ISCSI_SNACK_REQUEST ISCSI_SNACK_REQUEST |
SNACK Request.
typedef struct _ISCSI_TMF_REQUEST ISCSI_TMF_REQUEST |
iSCSI Task Management Function Request.
typedef struct _ISCSI_TMF_RESPONSE ISCSI_TMF_RESPONSE |
iSCSI Task Management Function Response.
typedef struct _SCSI_COMMAND SCSI_COMMAND |
SCSI Command
typedef struct _SCSI_RESPONSE SCSI_RESPONSE |
SCSI Response
enum DATA_DIRECTION |
Definition at line 234 of file IScsiProto.h.
enum ISCSI_DIGEST_TYPE |
Definition at line 580 of file IScsiProto.h.
Add an iSCSI key-value pair as a string into the data segment of the Login Request PDU. The DataSegmentLength and the actual size of the net buffer containing this PDU will be updated.
[in,out] | Pdu | The iSCSI PDU whose data segment the key-value pair will be added to. |
[in] | Key | The key name string. |
[in] | Value | The value string. |
EFI_SUCCESS | The key-valu pair is added to the PDU's datasegment and the correspondence length fields are updated. |
EFI_OUT_OF_RESOURCES | There is not enough space in the PDU to add the key-value pair. |
Add an iSCSI key-value pair as a string into the data segment of the Login Request PDU. The DataSegmentLength and the actual size of the net buffer containing this PDU will be updated.
[in,out] | Pdu | The iSCSI PDU whose data segment the key-value pair will be added to. |
[in] | Key | The key name string. |
[in] | Value | The value string. |
EFI_SUCCESS | The key-value pair is added to the PDU's data segment and the correspondence length fields are updated. |
EFI_OUT_OF_RESOURCES | There is not enough space in the PDU to add the key-value pair. |
EFI_PROTOCOL_ERROR | There is no such data in the net buffer. |
Definition at line 677 of file IScsiProto.c.
VOID IScsiAttatchConnection | ( | IN OUT ISCSI_SESSION * | Session, |
IN OUT ISCSI_CONNECTION * | Conn | ||
) |
Attach the iSCSI connection to the iSCSI session.
[in,out] | Session | The iSCSI session. |
[in,out] | Conn | The iSCSI connection. |
Definition at line 21 of file IScsiProto.c.
LIST_ENTRY * IScsiBuildKeyValueList | ( | IN CHAR8 * | Data, |
IN UINT32 | Len | ||
) |
Build a key-value list from the data segment.
[in] | Data | The data segment containing the key-value pairs. |
[in] | Len | Length of the data segment. |
NULL | Other errors as indicated. |
Definition at line 1876 of file IScsiProto.c.
EFI_STATUS IScsiCheckOpParams | ( | IN OUT ISCSI_CONNECTION * | Conn | ) |
Check and get the result of the parameter negotiation.
[in,out] | Conn | The connection in iSCSI login. |
EFI_SUCCESS | The parameter check is passed and negotiation is finished. |
EFI_PROTOCOL_ERROR | Some kind of iSCSI protocol error occurred. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Definition at line 1505 of file IScsiProto.c.
EFI_STATUS IScsiConnLogin | ( | IN OUT ISCSI_CONNECTION * | Conn, |
IN UINT16 | Timeout | ||
) |
This function performs the iSCSI connection login.
[in,out] | Conn | The iSCSI connection to login. |
Timeout | The timeout value in milliseconds. |
EFI_SUCCESS | The iSCSI connection is logged into the iSCSI target. |
EFI_TIMEOUT | Timeout occurred during the login procedure. |
Others | Other errors as indicated. |
This function does the iSCSI connection login.
[in,out] | Conn | The iSCSI connection to login. |
Timeout | The timeout value in millisecond. |
EFI_SUCCESS | The iSCSI connection is logged into the iSCSI target. |
EFI_TIMEOUT | Timeout occurred during the login procedure. |
Others | Other errors as indicated. |
Definition at line 122 of file IScsiProto.c.
ISCSI_CONNECTION * IScsiCreateConnection | ( | IN ISCSI_SESSION * | Session | ) |
Create a TCP connection for the iSCSI session.
[in] | Session | Points to the iSCSI session. |
Definition at line 194 of file IScsiProto.c.
VOID IScsiDestroyConnection | ( | IN ISCSI_CONNECTION * | Conn | ) |
Destroy an iSCSI connection.
[in] | Conn | The connection to destroy. |
Definition at line 310 of file IScsiProto.c.
VOID IScsiDetatchConnection | ( | IN OUT ISCSI_CONNECTION * | Conn | ) |
Detach the iSCSI connection from the session it belongs to.
[in,out] | Conn | The iSCSI connection. |
Definition at line 38 of file IScsiProto.c.
EFI_STATUS IScsiExecuteScsiCommand | ( | IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL * | PassThru, |
IN UINT8 * | Target, | ||
IN UINT64 | Lun, | ||
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET * | Packet | ||
) |
Execute the SCSI command issued through the EXT SCSI PASS THRU protocol.
[in] | PassThru | The EXT SCSI PASS THRU protocol. |
[in] | Target | The target ID. |
[in] | Lun | The LUN. |
[in,out] | Packet | The request packet containing IO request, SCSI command buffer and buffers to read/write. |
EFI_SUCCESS | The SCSI command is executed and the result is updated to the Packet. |
EFI_DEVICE_ERROR | Session state was not as required. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_NOT_READY | The target can not accept new commands. |
Others | Other errors as indicated. |
Execute the SCSI command issued through the EXT SCSI PASS THRU protocol.
[in] | PassThru | The EXT SCSI PASS THRU protocol. |
[in] | Target | The target ID. |
[in] | Lun | The LUN. |
[in,out] | Packet | The request packet containing IO request, SCSI command buffer and buffers to read/write. |
EFI_SUCCESS | The SCSI command is executed and the result is updated to the Packet. |
EFI_DEVICE_ERROR | Session state was not as required. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_PROTOCOL_ERROR | There is no such data in the net buffer. |
EFI_NOT_READY | The target can not accept new commands. |
Others | Other errors as indicated. |
Definition at line 2904 of file IScsiProto.c.
VOID IScsiFillOpParams | ( | IN ISCSI_CONNECTION * | Conn, |
IN OUT NET_BUF * | Pdu | ||
) |
Fill the operational parameters.
[in] | Conn | The connection in iSCSI login. |
[in,out] | Pdu | The iSCSI login request PDU to fill the parameters. |
Definition at line 1779 of file IScsiProto.c.
VOID IScsiFreeKeyValueList | ( | IN LIST_ENTRY * | KeyValueList | ) |
Free the key-value list.
[in] | KeyValueList | The key-value list. |
Definition at line 1978 of file IScsiProto.c.
VOID EFIAPI IScsiFreeNbufList | ( | VOID * | Arg | ) |
The callback function to free the net buffer list.
[in] | Arg | The opaque parameter. |
Definition at line 1262 of file IScsiProto.c.
CHAR8 * IScsiGetValueByKeyFromList | ( | IN OUT LIST_ENTRY * | KeyValueList, |
IN CHAR8 * | Key | ||
) |
Get the value string by the key name from the key-value list. If found, the key-value entry will be removed from the list.
[in,out] | KeyValueList | The key-value list. |
[in] | Key | The key name to find. |
NULL | The key value pair can not be found. |
Get the value string by the key name from the key-value list. If found, the key-value entry will be removed from the list.
[in,out] | KeyValueList | The key-value list. |
[in] | Key | The key name to find. |
NULL | The key value pair cannot be found. |
Definition at line 1945 of file IScsiProto.c.
EFI_STATUS IScsiNormalizeName | ( | IN OUT CHAR8 * | Name, |
IN UINTN | Len | ||
) |
Normalize the iSCSI name according to RFC.
[in,out] | Name | The iSCSI name. |
[in] | Len | length of the iSCSI name. |
EFI_SUCCESS | The iSCSI name is valid and normalized. |
EFI_PROTOCOL_ERROR | The iSCSI name is mal-formatted or not in the IQN format. |
Normalize the iSCSI name according to RFC.
[in,out] | Name | The iSCSI name. |
[in] | Len | Length of the iSCSI name. |
EFI_SUCCESS | The iSCSI name is valid and normalized. |
EFI_PROTOCOL_ERROR | The iSCSI name is malformatted or not in the IQN format. |
Definition at line 2006 of file IScsiProto.c.
EFI_STATUS IScsiPadSegment | ( | IN OUT NET_BUF * | Pdu, |
IN UINT32 | Len | ||
) |
Pad the iSCSI AHS or data segment to an integer number of 4 byte words.
[in,out] | Pdu | The iSCSI pdu which contains segments to pad. |
[in] | Len | The length of the last segment in the PDU. |
EFI_SUCCESS | The segment is padded or no need to pad it. |
EFI_OUT_OF_RESOURCES | There is not enough remaining free space to add the padding bytes. |
Pad the iSCSI AHS or data segment to an integer number of 4 byte words.
[in,out] | Pdu | The iSCSI pdu which contains segments to pad. |
[in] | Len | The length of the last segment in the PDU. |
EFI_SUCCESS | The segment is padded or there is no need to pad it. |
EFI_OUT_OF_RESOURCES | There is not enough remaining free space to add the padding bytes. |
Definition at line 1843 of file IScsiProto.c.
NET_BUF * IScsiPrepareLoginReq | ( | IN OUT ISCSI_CONNECTION * | Conn | ) |
Prepare the iSCSI login request to be sent according to the current login status.
[in,out] | Conn | The connection in the iSCSI login phase. |
NULL | Other errors as indicated. |
Definition at line 749 of file IScsiProto.c.
EFI_STATUS IScsiProcessLoginRsp | ( | IN OUT ISCSI_CONNECTION * | Conn, |
IN OUT NET_BUF * | Pdu | ||
) |
Process the iSCSI Login Response.
[in,out] | Conn | The connection on which the iSCSI login response is received. |
[in,out] | Pdu | The iSCSI login response PDU. |
EFI_SUCCESS | The iSCSI login response PDU is processed and all check are passed. |
EFI_PROTOCOL_ERROR | Some kind of iSCSI protocol error happened. |
EFI_MEDIA_CHANGED | Target is redirected. |
Others | Other errors as indicated. |
Process the iSCSI Login Response.
[in,out] | Conn | The connection on which the iSCSI login response is received. |
[in,out] | Pdu | The iSCSI login response PDU. |
EFI_SUCCESS | The iSCSI login response PDU is processed, and all checks are passed. |
EFI_PROTOCOL_ERROR | Some kind of iSCSI protocol error occurred. |
EFI_MEDIA_CHANGED | Target is redirected. |
Others | Other errors as indicated. |
Definition at line 865 of file IScsiProto.c.
EFI_STATUS IScsiReceiveLoginRsp | ( | IN ISCSI_CONNECTION * | Conn | ) |
Receive and process the iSCSI login response.
[in] | Conn | The connection in the iSCSI login phase. |
EFI_SUCCESS | The iSCSI login response PDU is received and processed. |
Others | Other errors as indicated. |
Definition at line 631 of file IScsiProto.c.
EFI_STATUS IScsiReceivePdu | ( | IN ISCSI_CONNECTION * | Conn, |
OUT NET_BUF ** | Pdu, | ||
IN ISCSI_IN_BUFFER_CONTEXT *Context | OPTIONAL, | ||
IN BOOLEAN | HeaderDigest, | ||
IN BOOLEAN | DataDigest, | ||
IN EFI_EVENT TimeoutEvent | OPTIONAL | ||
) |
Receive an iSCSI response PDU. An iSCSI response PDU contains an iSCSI PDU header and an optional data segment. The two parts will be put into two blocks of buffers in the net buffer. The digest check will be conducted in this function if needed and the digests will be trimmed from the PDU buffer.
[in] | Conn | The iSCSI connection to receive data from. |
[out] | Pdu | The received iSCSI pdu. |
[in] | Context | The context used to describe information on the caller provided buffer to receive data segment of the iSCSI pdu, it's optional. |
[in] | HeaderDigest | Whether there will be header digest received. |
[in] | DataDigest | Whether there will be data digest. |
[in] | TimeoutEvent | The timeout event, it's optional. |
EFI_SUCCESS | An iSCSI pdu is received. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_PROTOCOL_ERROR | Some kind of iSCSI protocol error occurred. |
Others | Other errors as indicated. |
Receive an iSCSI response PDU. An iSCSI response PDU contains an iSCSI PDU header and an optional data segment. The two parts will be put into two blocks of buffers in the net buffer. The digest check will be conducted in this function if needed and the digests will be trimmed from the PDU buffer.
[in] | Conn | The iSCSI connection to receive data from. |
[out] | Pdu | The received iSCSI pdu. |
[in] | Context | The context used to describe information on the caller provided buffer to receive data segment of the iSCSI pdu. It is optional. |
[in] | HeaderDigest | Whether there will be header digest received. |
[in] | DataDigest | Whether there will be data digest. |
[in] | TimeoutEvent | The timeout event. It is optional. |
EFI_SUCCESS | An iSCSI pdu is received. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_PROTOCOL_ERROR | Some kind of iSCSI protocol error occurred. |
Others | Other errors as indicated. |
Definition at line 1307 of file IScsiProto.c.
EFI_STATUS IScsiSendLoginReq | ( | IN ISCSI_CONNECTION * | Conn | ) |
Build and send the iSCSI login request to the iSCSI target according to the current login stage.
[in] | Conn | The connection in the iSCSI login phase. |
EFI_SUCCESS | The iSCSI login request PDU is built and sent on this connection. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_DEVICE_ERROR | Some kind of device error happened. |
Build and send the iSCSI login request to the iSCSI target according to the current login stage.
[in] | Conn | The connection in the iSCSI login phase. |
EFI_SUCCESS | The iSCSI login request PDU is built and sent on this connection. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_DEVICE_ERROR | Some kind of device error occurred. |
Definition at line 596 of file IScsiProto.c.
VOID IScsiSessionAbort | ( | IN OUT ISCSI_SESSION * | Session | ) |
Abort the iSCSI session, that is, reset all the connection and free the resources.
[in,out] | Session | The iSCSI session. |
Abort the iSCSI session. That is, reset all the connection(s), and free the resources.
[in,out] | Session | The iSCSI session. |
Definition at line 3166 of file IScsiProto.c.
VOID IScsiSessionInit | ( | IN OUT ISCSI_SESSION * | Session, |
IN BOOLEAN | Recovery | ||
) |
Initialize some session parameters before login.
[in,out] | Session | The iSCSI session. |
[in] | Recovery | Whether the request is from a fresh new start or recovery. |
Definition at line 3125 of file IScsiProto.c.
EFI_STATUS IScsiSessionLogin | ( | IN ISCSI_SESSION * | Session | ) |
Login the iSCSI session.
[in] | Session | The iSCSI session |
EFI_SUCCESS | The iSCSI session login procedure finished. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_NO_MEDIA | There was a media error. |
Others | Other errors as indicated. |
Login the iSCSI session.
[in] | Session | The iSCSI session. |
EFI_SUCCESS | The iSCSI session login procedure finished. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_NO_MEDIA | There was a media error. |
Others | Other errors as indicated. |
Definition at line 452 of file IScsiProto.c.
EFI_STATUS IScsiSessionReinstatement | ( | IN ISCSI_SESSION * | Session | ) |
Reinstate the session on some error.
[in] | Session | The iSCSI session |
EFI_SUCCESS | The session is reinstated from some error. |
Other | Reinstatement failed. |
Definition at line 3095 of file IScsiProto.c.
EFI_STATUS IScsiSessionReLogin | ( | IN ISCSI_SESSION * | Session | ) |
Wait for IPsec negotiation, then try to login the iSCSI session again.
[in] | Session | The iSCSI session |
EFI_SUCCESS | The iSCSI session login procedure finished. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_PROTOCOL_ERROR | Some kind of iSCSI protocol error happened. |
Wait for IPsec negotiation, then try to login the iSCSI session again.
[in] | Session | The iSCSI session. |
EFI_SUCCESS | The iSCSI session login procedure finished. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_PROTOCOL_ERROR | Some kind of iSCSI protocol error occurred. |
Definition at line 547 of file IScsiProto.c.
EFI_STATUS IScsiUpdateTargetAddress | ( | IN OUT ISCSI_SESSION * | Session, |
IN CHAR8 * | Data, | ||
IN UINT32 | Len | ||
) |
Updated the target information according the data received in the iSCSI login response with an target redirection status.
[in,out] | Session | The iSCSI session. |
[in] | Data | The data segment which should contain the TargetAddress key-value list. |
[in] | Len | Length of the data. |
EFI_SUCCESS | The target address is updated. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_NOT_FOUND | The TargetAddress key is not found. |
Others | Other errors as indicated. |
Updated the target information according the data received in the iSCSI login response with an target redirection status.
[in,out] | Session | The iSCSI session. |
[in] | Data | The data segment that should contain the TargetAddress key-value list. |
[in] | Len | Length of the data. |
EFI_SUCCESS | The target address is updated. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_NOT_FOUND | The TargetAddress key is not found. |
Others | Other errors as indicated. |
Definition at line 1103 of file IScsiProto.c.