TianoCore EDK2 master
Loading...
Searching...
No Matches
IScsiMisc.h
Go to the documentation of this file.
1
10#ifndef _ISCSI_MISC_H_
11#define _ISCSI_MISC_H_
12
14
18#define IP4_NODE_LEN_NEW_VERSIONS 27
19
23#define IP6_NODE_LEN_OLD_VERSIONS 43
24#define IP6_NODE_LEN_NEW_VERSIONS 60
25
29#define IP6_OLD_IPADDRESS_OFFSET 42
30
31#pragma pack(1)
33 UINT16 TargetPort;
34 UINT8 Enabled;
35 UINT8 IpMode;
36
37 EFI_IP_ADDRESS LocalIp;
38 EFI_IPv4_ADDRESS SubnetMask;
39 EFI_IP_ADDRESS Gateway;
40
41 BOOLEAN InitiatorInfoFromDhcp;
42 BOOLEAN TargetInfoFromDhcp;
43
44 CHAR8 TargetName[ISCSI_NAME_MAX_SIZE];
45 EFI_IP_ADDRESS TargetIp;
46 UINT8 PrefixLength;
47 UINT8 BootLun[8];
48
50 UINT8 ConnectRetryCount;
51 UINT8 IsId[6];
52
53 BOOLEAN RedirectFlag;
54 UINT16 OriginalTargetPort; // The port of proxy/virtual target.
55 EFI_IP_ADDRESS OriginalTargetIp; // The address of proxy/virtual target.
56
57 BOOLEAN DnsMode; // Flag indicate whether the Target address is expressed as URL format.
58 CHAR8 TargetUrl[ISCSI_TARGET_URI_MAX_SIZE];
60#pragma pack()
61
71UINT8
73 IN EFI_IPv4_ADDRESS *SubnetMask
74 );
75
88 IN CHAR8 *Str,
89 OUT UINT8 *Lun
90 );
91
99VOID
101 IN UINT8 *Lun,
102 OUT CHAR16 *String
103 );
104
114VOID
116 IN EFI_MAC_ADDRESS *Mac,
117 IN UINT32 Len,
118 IN UINT16 VlanId,
119 OUT CHAR16 *Str
120 );
121
136 IN CHAR8 *Str,
137 IN UINT8 IpMode,
139 );
140
158 IN UINT8 *BinBuffer,
159 IN UINT32 BinLength,
160 IN OUT CHAR8 *HexStr,
161 IN OUT UINT32 *HexLength
162 );
163
182 IN OUT UINT8 *BinBuffer,
183 IN OUT UINT32 *BinLength,
184 IN CHAR8 *HexStr
185 );
186
195UINTN
197 IN CHAR8 *Str
198 );
199
212 IN OUT UINT8 *Rand,
213 IN UINTN RandLength
214 );
215
229 IN EFI_HANDLE Controller,
230 IN EFI_HANDLE Image
231 );
232
245 IN EFI_HANDLE Controller
246 );
247
259 IN UINTN AttemptNum
260 );
261
273 IN UINTN KeywordNum
274 );
275
281VOID
283 IN VOID
284 );
285
296 IN UINT8 NicIndex
297 );
298
311UINT16
313 IN EFI_HANDLE Controller,
314 OUT UINTN *Bus,
315 OUT UINTN *Device,
316 OUT UINTN *Function
317 );
318
332VOID *
334 IN CHAR16 *Name,
335 IN EFI_GUID *VendorGuid,
336 OUT UINTN *VariableSize
337 );
338
351 IN EFI_HANDLE Image,
352 IN EFI_HANDLE Controller
353 );
354
366 IN ISCSI_DRIVER_DATA *Private
367 );
368
379BOOLEAN
381 IN EFI_HANDLE Controller,
382 IN UINT8 IpVersion
383 );
384
394BOOLEAN
396 IN EFI_HANDLE Controller
397 );
398
411 IN ISCSI_DRIVER_DATA *Private
412 );
413
425 IN ISCSI_SESSION *Session
426 );
427
435VOID
436EFIAPI
438 IN EFI_EVENT Event,
439 IN VOID *Context
440 );
441
466EFIAPI
468 IN EFI_HANDLE ControllerHandle,
469 IN EFI_HANDLE DriverBindingHandle,
470 IN EFI_GUID *ProtocolGuid
471 );
472
473#endif
UINT64 UINTN
UINTN IScsiNetNtoi(IN CHAR8 *Str)
Definition: IScsiMisc.c:459
VOID * IScsiGetVariableAndSize(IN CHAR16 *Name, IN EFI_GUID *VendorGuid, OUT UINTN *VariableSize)
Definition: IScsiMisc.c:1698
ISCSI_DRIVER_DATA * IScsiCreateDriverData(IN EFI_HANDLE Image, IN EFI_HANDLE Controller)
Definition: IScsiMisc.c:1748
UINT16 IScsiGetNICPciLocation(IN EFI_HANDLE Controller, OUT UINTN *Bus, OUT UINTN *Device, OUT UINTN *Function)
Definition: IScsiMisc.c:1640
EFI_STATUS IScsiCreateKeywords(IN UINTN KeywordNum)
Definition: IScsiMisc.c:949
EFI_STATUS EFIAPI IScsiTestManagedDevice(IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE DriverBindingHandle, IN EFI_GUID *ProtocolGuid)
Definition: IScsiMisc.c:2565
EFI_STATUS IScsiCleanDriverData(IN ISCSI_DRIVER_DATA *Private)
Definition: IScsiMisc.c:1807
EFI_STATUS IScsiRemoveNic(IN EFI_HANDLE Controller)
Definition: IScsiMisc.c:717
VOID IScsiCleanAttemptVariable(IN VOID)
Definition: IScsiMisc.c:1551
EFI_STATUS IScsiHexToBin(IN OUT UINT8 *BinBuffer, IN OUT UINT32 *BinLength, IN CHAR8 *HexStr)
Definition: IScsiMisc.c:385
EFI_STATUS IScsiAddNic(IN EFI_HANDLE Controller, IN EFI_HANDLE Image)
Definition: IScsiMisc.c:607
EFI_STATUS IScsiCreateAttempts(IN UINTN AttemptNum)
Definition: IScsiMisc.c:812
EFI_DEVICE_PATH_PROTOCOL * IScsiGetTcpConnDevicePath(IN ISCSI_SESSION *Session)
Definition: IScsiMisc.c:2408
EFI_STATUS IScsiGetConfigData(IN ISCSI_DRIVER_DATA *Private)
Definition: IScsiMisc.c:2055
BOOLEAN IScsiDnsIsConfigured(IN EFI_HANDLE Controller)
Definition: IScsiMisc.c:1964
EFI_STATUS IScsiAsciiStrToIp(IN CHAR8 *Str, IN UINT8 IpMode, OUT EFI_IP_ADDRESS *Ip)
Definition: IScsiMisc.c:248
VOID EFIAPI IScsiOnExitBootService(IN EFI_EVENT Event, IN VOID *Context)
Definition: IScsiMisc.c:2523
EFI_STATUS IScsiGenRandom(IN OUT UINT8 *Rand, IN UINTN RandLength)
Definition: IScsiMisc.c:483
EFI_STATUS IScsiBinToHex(IN UINT8 *BinBuffer, IN UINT32 BinLength, IN OUT CHAR8 *HexStr, IN OUT UINT32 *HexLength)
Definition: IScsiMisc.c:322
UINT8 IScsiGetSubnetMaskPrefixLength(IN EFI_IPv4_ADDRESS *SubnetMask)
Definition: IScsiMisc.c:76
VOID IScsiLunToUnicodeStr(IN UINT8 *Lun, OUT CHAR16 *String)
Definition: IScsiMisc.c:193
BOOLEAN IScsiDhcpIsConfigured(IN EFI_HANDLE Controller, IN UINT8 IpVersion)
Definition: IScsiMisc.c:1861
ISCSI_NIC_INFO * IScsiGetNicInfoByIndex(IN UINT8 NicIndex)
Definition: IScsiMisc.c:1610
VOID IScsiMacAddrToStr(IN EFI_MAC_ADDRESS *Mac, IN UINT32 Len, IN UINT16 VlanId, OUT CHAR16 *Str)
Definition: IScsiMisc.c:282
EFI_STATUS IScsiAsciiStrToLun(IN CHAR8 *Str, OUT UINT8 *Lun)
Definition: IScsiMisc.c:118
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINTN Rand(VOID)
Definition: Support.c:39
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
UINT16 ConnectTimeout
timeout value in milliseconds.
Definition: IScsiMisc.h:49
Definition: Base.h:213