TianoCore EDK2 master
Loading...
Searching...
No Matches
IScsiConfig.h
Go to the documentation of this file.
1
10#ifndef _ISCSI_CONFIG_H_
11#define _ISCSI_CONFIG_H_
12
14
16
17extern UINT8 IScsiConfigVfrBin[];
18extern UINT8 IScsiDxeStrings[];
19extern ISCSI_FORM_CALLBACK_INFO *mCallbackInfo;
20
21#define VAR_OFFSET(Field) \
22 ((UINT16) ((UINTN) &(((ISCSI_CONFIG_IFR_NVDATA *) 0)->Field)))
23
24#define QUESTION_ID(Field) \
25 ((UINT16) (VAR_OFFSET (Field) + CONFIG_OPTION_OFFSET))
26
27#define DYNAMIC_ONE_OF_VAR_OFFSET VAR_OFFSET (Enabled)
28#define DYNAMIC_ORDERED_LIST_QUESTION_ID QUESTION_ID (DynamicOrderedList)
29#define DYNAMIC_ORDERED_LIST_VAR_OFFSET VAR_OFFSET (DynamicOrderedList)
30#define ATTEMPT_DEL_QUESTION_ID QUESTION_ID (DeleteAttemptList)
31#define ATTEMPT_DEL_VAR_OFFSET VAR_OFFSET (DeleteAttemptList)
32#define ATTEMPT_ADD_QUESTION_ID QUESTION_ID (AddAttemptList)
33#define ATTEMPT_ADD_VAR_OFFSET VAR_OFFSET (AddAttemptList)
34
35//
36// Define QuestionId and OffSet for Keywords.
37//
38#define ATTEMPT_MAC_ADDR_VAR_OFFSET VAR_OFFSET (ISCSIMacAddr)
39#define ATTEMPT_ATTEMPT_NAME_QUESTION_ID QUESTION_ID (ISCSIAttemptName)
40#define ATTEMPT_ATTEMPT_NAME_VAR_OFFSET VAR_OFFSET (ISCSIAttemptName)
41#define ATTEMPT_BOOTENABLE_QUESTION_ID QUESTION_ID (ISCSIBootEnableList)
42#define ATTEMPT_BOOTENABLE_VAR_OFFSET VAR_OFFSET (ISCSIBootEnableList)
43#define ATTEMPT_ADDRESS_TYPE_QUESTION_ID QUESTION_ID (ISCSIIpAddressTypeList)
44#define ATTEMPT_ADDRESS_TYPE_VAR_OFFSET VAR_OFFSET (ISCSIIpAddressTypeList)
45#define ATTEMPT_CONNECT_RETRY_QUESTION_ID QUESTION_ID (ISCSIConnectRetry)
46#define ATTEMPT_CONNECT_RETRY_VAR_OFFSET VAR_OFFSET (ISCSIConnectRetry)
47#define ATTEMPT_CONNECT_TIMEOUT_QUESTION_ID QUESTION_ID (ISCSIConnectTimeout)
48#define ATTEMPT_CONNECT_TIMEOUT_VAR_OFFSET VAR_OFFSET (ISCSIConnectTimeout)
49#define ATTEMPT_ISID_QUESTION_ID QUESTION_ID (Keyword->ISCSIIsId)
50#define ATTEMPT_ISID_VAR_OFFSET VAR_OFFSET (Keyword->ISCSIIsId)
51#define ATTEMPT_INITIATOR_VIA_DHCP_QUESTION_ID QUESTION_ID (ISCSIInitiatorInfoViaDHCP)
52#define ATTEMPT_INITIATOR_VIA_DHCP_VAR_OFFSET VAR_OFFSET (ISCSIInitiatorInfoViaDHCP)
53#define ATTEMPT_INITIATOR_IP_ADDRESS_QUESTION_ID QUESTION_ID (Keyword->ISCSIInitiatorIpAddress)
54#define ATTEMPT_INITIATOR_IP_ADDRESS_VAR_OFFSET VAR_OFFSET (Keyword->ISCSIInitiatorIpAddress)
55#define ATTEMPT_INITIATOR_NET_MASK_QUESTION_ID QUESTION_ID (Keyword->ISCSIInitiatorNetmask)
56#define ATTEMPT_INITIATOR_NET_MASK_VAR_OFFSET VAR_OFFSET (Keyword->ISCSIInitiatorNetmask)
57#define ATTEMPT_INITIATOR_GATE_WAY_QUESTION_ID QUESTION_ID (Keyword->ISCSIInitiatorGateway)
58#define ATTEMPT_INITIATOR_GATE_WAY_VAR_OFFSET VAR_OFFSET (Keyword->ISCSIInitiatorGateway)
59#define ATTEMPT_TARGET_VIA_DHCP_QUESTION_ID QUESTION_ID (ISCSITargetInfoViaDHCP)
60#define ATTEMPT_TARGET_VIA_DHCP_VAR_OFFSET VAR_OFFSET (ISCSITargetInfoViaDHCP)
61#define ATTEMPT_TARGET_NAME_QUESTION_ID QUESTION_ID (Keyword->ISCSITargetName)
62#define ATTEMPT_TARGET_NAME_VAR_OFFSET VAR_OFFSET (Keyword->ISCSITargetName)
63#define ATTEMPT_TARGET_IP_ADDRESS_QUESTION_ID QUESTION_ID (Keyword->ISCSITargetIpAddress)
64#define ATTEMPT_TARGET_IP_ADDRESS_VAR_OFFSET VAR_OFFSET (Keyword->ISCSITargetIpAddress)
65#define ATTEMPT_TARGET_TCP_PORT_QUESTION_ID QUESTION_ID (ISCSITargetTcpPort)
66#define ATTEMPT_TARGET_TCP_PORT_VAR_OFFSET VAR_OFFSET (ISCSITargetTcpPort)
67#define ATTEMPT_LUN_QUESTION_ID QUESTION_ID (Keyword->ISCSILun)
68#define ATTEMPT_LUN_VAR_OFFSET VAR_OFFSET (Keyword->ISCSILun)
69#define ATTEMPT_AUTHENTICATION_METHOD_QUESTION_ID QUESTION_ID (ISCSIAuthenticationMethod)
70#define ATTEMPT_AUTHENTICATION_METHOD_VAR_OFFSET VAR_OFFSET (ISCSIAuthenticationMethod)
71#define ATTEMPT_CHARTYPE_QUESTION_ID QUESTION_ID (ISCSIChapType)
72#define ATTEMPT_CHARTYPE_VAR_OFFSET VAR_OFFSET (ISCSIChapType)
73#define ATTEMPT_CHAR_USER_NAME_QUESTION_ID QUESTION_ID (Keyword->ISCSIChapUsername)
74#define ATTEMPT_CHAR_USER_NAME_VAR_OFFSET VAR_OFFSET (Keyword->ISCSIChapUsername)
75#define ATTEMPT_CHAR_SECRET_QUESTION_ID QUESTION_ID (Keyword->ISCSIChapSecret)
76#define ATTEMPT_CHAR_SECRET_VAR_OFFSET VAR_OFFSET (Keyword->ISCSIChapSecret)
77#define ATTEMPT_CHAR_REVERSE_USER_NAME_QUESTION_ID QUESTION_ID (Keyword->ISCSIReverseChapUsername)
78#define ATTEMPT_CHAR_REVERSE_USER_NAME_VAR_OFFSET VAR_OFFSET (Keyword->ISCSIReverseChapUsername)
79#define ATTEMPT_CHAR_REVERSE_SECRET_QUESTION_ID QUESTION_ID (Keyword->ISCSIReverseChapSecret)
80#define ATTEMPT_CHAR_REVERSE_SECRET_VAR_OFFSET VAR_OFFSET (Keyword->ISCSIReverseChapSecret)
81
82#define ISCSI_INITATOR_NAME_VAR_NAME L"I_NAME"
83
84#define ISCSI_CONFIG_VAR_ATTR (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE)
85
86#define ISCSI_FORM_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('I', 'f', 'c', 'i')
87
88#define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \
89 CR ( \
90 Callback, \
91 ISCSI_FORM_CALLBACK_INFO, \
92 ConfigAccess, \
93 ISCSI_FORM_CALLBACK_INFO_SIGNATURE \
94 )
95
96#pragma pack(1)
98 LIST_ENTRY Link;
99 UINT8 NicIndex;
100 UINT8 AttemptConfigIndex;
101 BOOLEAN DhcpSuccess;
102 BOOLEAN ValidiBFTPath;
103 BOOLEAN ValidPath;
104 UINT8 AutoConfigureMode;
105 EFI_STRING_ID AttemptTitleToken;
106 EFI_STRING_ID AttemptTitleHelpToken;
107 CHAR8 AttemptName[ATTEMPT_NAME_SIZE];
108 CHAR8 MacString[ISCSI_MAX_MAC_STRING_LEN];
109 EFI_IP_ADDRESS PrimaryDns;
110 EFI_IP_ADDRESS SecondaryDns;
111 EFI_IP_ADDRESS DhcpServer;
112 ISCSI_SESSION_CONFIG_NVDATA SessionConfigData;
113 UINT8 AuthenticationType;
114 union {
116 } AuthConfigData;
117 BOOLEAN AutoConfigureSuccess;
118 UINT8 Actived;
119};
120
124typedef struct {
125 VENDOR_DEVICE_PATH VendorDevicePath;
128
129#pragma pack()
130
132 UINT32 Signature;
133 EFI_HANDLE DriverHandle;
135 UINT16 *KeyList;
136 VOID *FormBuffer;
137 EFI_HII_HANDLE RegisteredHandle;
139};
140
159 IN UINT16 StartLabelNumber,
160 OUT VOID **StartOpCodeHandle,
161 OUT EFI_IFR_GUID_LABEL **StartLabel,
162 OUT VOID **EndOpCodeHandle,
163 OUT EFI_IFR_GUID_LABEL **EndLabel
164 );
165
177 IN EFI_HANDLE DriverBindingHandle
178 );
179
193 IN EFI_HANDLE DriverBindingHandle
194 );
195
200VOID
202 VOID
203 );
204
216 IN UINT8 AttemptConfigIndex
217 );
218
219#endif
EFI_STATUS IScsiConfigFormUnload(IN EFI_HANDLE DriverBindingHandle)
Definition: IScsiConfig.c:3878
ISCSI_ATTEMPT_CONFIG_NVDATA * IScsiConfigGetAttemptByConfigIndex(IN UINT8 AttemptConfigIndex)
Definition: IScsiConfig.c:391
VOID IScsiConfigUpdateAttempt(VOID)
Definition: IScsiConfig.c:1884
EFI_STATUS IScsiCreateOpCode(IN UINT16 StartLabelNumber, OUT VOID **StartOpCodeHandle, OUT EFI_IFR_GUID_LABEL **StartLabel, OUT VOID **EndOpCodeHandle, OUT EFI_IFR_GUID_LABEL **EndLabel)
Definition: IScsiConfig.c:1796
EFI_STATUS IScsiConfigFormInit(IN EFI_HANDLE DriverBindingHandle)
Definition: IScsiConfig.c:3806
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
VOID * EFI_HII_HANDLE