TianoCore EDK2 master
Loading...
Searching...
No Matches
IScsiImpl.h
Go to the documentation of this file.
1
9#ifndef _ISCSI_IMPL_H_
10#define _ISCSI_IMPL_H_
11
12#include <Uefi.h>
13
15
19#include <Protocol/DevicePath.h>
21
22#include <Protocol/Ip6.h>
23#include <Protocol/Dhcp4.h>
24#include <Protocol/Dhcp6.h>
25#include <Protocol/Dns4.h>
26#include <Protocol/Dns6.h>
27#include <Protocol/Tcp4.h>
28#include <Protocol/Tcp6.h>
29#include <Protocol/Ip4Config2.h>
30#include <Protocol/Ip6Config.h>
31
37
39#include <Library/BaseLib.h>
41#include <Library/DebugLib.h>
43#include <Library/HiiLib.h>
45#include <Library/NetLib.h>
46#include <Library/PrintLib.h>
47#include <Library/SafeIntLib.h>
48#include <Library/TcpIoLib.h>
51#include <Library/UefiLib.h>
53
54#include <Guid/MdeModuleHii.h>
55#include <Guid/EventGroup.h>
56#include <Guid/Acpi.h>
57
59#include "IScsiDriver.h"
60#include "IScsiProto.h"
61#include "IScsiCHAP.h"
62#include "IScsiDhcp.h"
63#include "IScsiDhcp6.h"
64
65#include "IScsiIbft.h"
66#include "IScsiMisc.h"
67#include "IScsiDns.h"
68#include "IScsiConfig.h"
69
70#define ISCSI_AUTH_INITIAL 0
71
72#define ISCSI_SESSION_SIGNATURE SIGNATURE_32 ('I', 'S', 'S', 'N')
76#define ISCSI_GET_MAPPING_TIMEOUT 100000000U
80#define ISCSI_WAIT_IPSEC_TIMEOUT 30000000U
81
83 UINT32 Signature;
84
85 ISCSI_DRIVER_DATA *Private;
87
88 UINT8 AuthType;
89 union {
91 } AuthData;
92
93 UINT8 State;
94
95 UINT8 Isid[6];
96 UINT16 Tsih;
97
98 UINT32 CmdSN;
99 UINT32 ExpCmdSN;
100 UINT32 MaxCmdSN;
101
102 UINT32 InitiatorTaskTag;
103 UINT16 NextCid;
104
105 LIST_ENTRY Conns;
106 UINT32 NumConns;
107
108 LIST_ENTRY TcbList;
109
110 //
111 // Session-wide parameters
112 //
113 UINT16 TargetPortalGroupTag;
114 UINT32 MaxConnections;
115 BOOLEAN InitialR2T;
116 BOOLEAN ImmediateData;
117 UINT32 MaxBurstLength;
118 UINT32 FirstBurstLength;
119 UINT32 DefaultTime2Wait;
120 UINT32 DefaultTime2Retain;
121 UINT16 MaxOutstandingR2T;
122 BOOLEAN DataPDUInOrder;
123 BOOLEAN DataSequenceInOrder;
124 UINT8 ErrorRecoveryLevel;
125};
126
127#define ISCSI_CONNECTION_SIGNATURE SIGNATURE_32 ('I', 'S', 'C', 'N')
128
130 UINT32 Signature;
131 LIST_ENTRY Link;
132
133 EFI_EVENT TimeoutEvent;
134
135 ISCSI_SESSION *Session;
136
137 UINT8 State;
138 UINT8 CurrentStage;
139 UINT8 NextStage;
140
141 UINT8 AuthStep;
142
143 BOOLEAN PartialReqSent;
144 BOOLEAN PartialRspRcvd;
145
146 BOOLEAN TransitInitiated;
147 BOOLEAN ParamNegotiated;
148
149 UINT16 Cid;
150 UINT32 ExpStatSN;
151
152 //
153 // Queues...
154 //
155 NET_BUF_QUEUE RspQue;
156
157 BOOLEAN Ipv6Flag;
158 TCP_IO TcpIo;
159
160 //
161 // Connection-only parameters.
162 //
163 UINT32 MaxRecvDataSegmentLength;
164 ISCSI_DIGEST_TYPE HeaderDigest;
165 ISCSI_DIGEST_TYPE DataDigest;
166};
167
168#define ISCSI_DRIVER_DATA_SIGNATURE SIGNATURE_32 ('I', 'S', 'D', 'A')
169
170#define ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU(PassThru) \
171 CR ( \
172 PassThru, \
173 ISCSI_DRIVER_DATA, \
174 IScsiExtScsiPassThru, \
175 ISCSI_DRIVER_DATA_SIGNATURE \
176 )
177
178#define ISCSI_DRIVER_DATA_FROM_IDENTIFIER(Identifier) \
179 CR ( \
180 Identifier, \
181 ISCSI_DRIVER_DATA, \
182 IScsiIdentifier, \
183 ISCSI_DRIVER_DATA_SIGNATURE \
184 )
185
187 UINT32 Signature;
188 EFI_HANDLE Image;
189 EFI_HANDLE Controller;
190 ISCSI_PRIVATE_PROTOCOL IScsiIdentifier;
191
192 EFI_EVENT ExitBootServiceEvent;
193
194 EFI_EXT_SCSI_PASS_THRU_PROTOCOL IScsiExtScsiPassThru;
195 EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
196 EFI_HANDLE ExtScsiPassThruHandle;
197 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
198 EFI_HANDLE ChildHandle;
199 ISCSI_SESSION *Session;
200};
201
202#endif
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33