VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/NetworkPkg/IScsiDxe/IScsiConfigNVDataStruc.h@ 85718

Last change on this file since 85718 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 7.1 KB
Line 
1/** @file
2 Define NVData structures used by the iSCSI configuration component.
3
4Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
5SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#ifndef _ISCSI_NVDATASTRUC_H_
10#define _ISCSI_NVDATASTRUC_H_
11
12#include <Guid/IScsiConfigHii.h>
13
14#define VAR_EQ_TEST_NAME 0x100
15#define CONFIGURATION_VARSTORE_ID 0x6666
16
17#define FORMID_MAIN_FORM 1
18#define FORMID_MAC_FORM 2
19#define FORMID_ATTEMPT_FORM 3
20#define FORMID_ORDER_FORM 4
21#define FORMID_DELETE_FORM 5
22
23#define ISCSI_MAX_ATTEMPTS_NUM FixedPcdGet8 (PcdMaxIScsiAttemptNumber)
24
25#define ISCSI_NAME_IFR_MIN_SIZE 4
26#define ISCSI_NAME_IFR_MAX_SIZE 223
27#define ISCSI_NAME_MAX_SIZE 224
28
29#define ATTEMPT_NAME_LIST_SIZE 96
30#define ATTEMPT_NAME_SIZE 12
31
32#define CONNECT_MIN_RETRY 0
33#define CONNECT_MAX_RETRY 16
34
35#define CONNECT_MIN_TIMEOUT 100
36#define CONNECT_MAX_TIMEOUT 20000
37#define CONNECT_DEFAULT_TIMEOUT 1000
38
39#define ISCSI_ACTIVE_DISABLED 0
40#define ISCSI_ACTIVE_ENABLED 1
41
42#define ISCSI_DISABLED 0
43#define ISCSI_ENABLED 1
44#define ISCSI_ENABLED_FOR_MPIO 2
45
46#define IP_MODE_IP4 0
47#define IP_MODE_IP6 1
48#define IP_MODE_AUTOCONFIG 2
49
50#define ISCSI_AUTH_TYPE_NONE 0
51#define ISCSI_AUTH_TYPE_CHAP 1
52#define ISCSI_AUTH_TYPE_KRB 2
53
54#define IP4_MIN_SIZE 7
55#define IP4_MAX_SIZE 15
56#define IP4_STR_MAX_SIZE 16
57
58//
59// Macros used for an IPv4 or an IPv6 address.
60//
61#define IP_MIN_SIZE 2
62#define IP_MAX_SIZE 39
63#define IP_STR_MAX_SIZE 40
64
65#define LUN_MIN_SIZE 1
66#define LUN_MAX_SIZE 20
67#define ISCSI_LUN_STR_MAX_LEN 21
68
69#define ISCSI_CHAP_UNI 0
70#define ISCSI_CHAP_MUTUAL 1
71
72#define TARGET_PORT_MIN_NUM 0
73#define TARGET_PORT_MAX_NUM 65535
74#define LABEL_END 0xffff
75
76#define KEY_INITIATOR_NAME 0x101
77#define KEY_DHCP_ENABLE 0x102
78#define KEY_LOCAL_IP 0x103
79#define KEY_SUBNET_MASK 0x104
80#define KEY_GATE_WAY 0x105
81#define KEY_TARGET_IP 0x106
82#define KEY_CHAP_NAME 0x107
83#define KEY_CHAP_SECRET 0x108
84#define KEY_REVERSE_CHAP_NAME 0x109
85#define KEY_REVERSE_CHAP_SECRET 0x10a
86#define KEY_SAVE_CHANGES 0x10b
87#define KEY_TARGET_NAME 0x10c
88#define KEY_BOOT_LUN 0x10d
89
90#define KEY_ADD_ATTEMPT 0x10e
91#define KEY_SAVE_ATTEMPT_CONFIG 0x10f
92#define KEY_ORDER_ATTEMPT_CONFIG 0x110
93#define KEY_SAVE_ORDER_CHANGES 0x111
94#define KEY_IGNORE_ORDER_CHANGES 0x112
95#define KEY_ATTEMPT_NAME 0x113
96#define KEY_SAVE_DELETE_ATTEMPT 0x114
97#define KEY_IGNORE_DELETE_ATTEMPT 0x115
98#define KEY_DELETE_ATTEMPT 0x116
99
100#define KEY_IP_MODE 0x11c
101#define KEY_AUTH_TYPE 0x11d
102#define KEY_CONFIG_ISID 0x11e
103
104#define ATTEMPT_ENTRY_LABEL 0x9000
105#define KEY_ATTEMPT_ENTRY_BASE 0xa000
106#define KEY_DE_ATTEMPT_ENTRY_BASE 0xb000
107
108#define KEY_DEVICE_ENTRY_BASE 0x1000
109#define KEY_MAC_ENTRY_BASE 0x2000
110#define MAC_ENTRY_LABEL 0x3000
111#define ORDER_ENTRY_LABEL 0x4000
112#define DELETE_ENTRY_LABEL 0x5000
113#define KEYWORD_ENTRY_LABEL 0x6000
114#define CONFIG_OPTION_OFFSET 0x9000
115
116#define ISCSI_CHAP_SECRET_MIN_LEN 12
117#define ISCSI_CHAP_SECRET_MAX_LEN 16
118//
119// ISCSI_CHAP_SECRET_STORAGE = ISCSI_CHAP_SECRET_MAX_LEN + sizeof (NULL-Terminator)
120//
121#define ISCSI_CHAP_SECRET_STORAGE 17
122
123#define ISCSI_CHAP_NAME_MAX_LEN 126
124#define ISCSI_CHAP_NAME_STORAGE 127
125
126#define KERBEROS_SECRET_MIN_LEN 12
127#define KERBEROS_SECRET_MAX_LEN 16
128#define KERBEROS_SECRET_STORAGE 17
129#define KERBEROS_NAME_MAX_LEN 96
130#define KERBEROS_KDC_PORT_MIN_NUM 0
131#define KERBEROS_KDC_PORT_MAX_NUM 65535
132
133#define ISID_CONFIGURABLE_MIN_LEN 6
134#define ISID_CONFIGURABLE_MAX_LEN 12
135#define ISID_CONFIGURABLE_STORAGE 13
136
137//
138// sizeof (EFI_MAC_ADDRESS) * 3
139//
140#define ISCSI_MAX_MAC_STRING_LEN 96
141
142///
143/// Macro used for target Url.
144///
145#define ISCSI_TARGET_URI_MIN_SIZE 0
146#define ISCSI_TARGET_URI_MAX_SIZE 255
147
148#pragma pack(1)
149
150//
151// Used by keyword.
152//
153typedef struct {
154 CHAR16 ISCSIIsId[ISID_CONFIGURABLE_STORAGE];
155 CHAR16 ISCSIInitiatorIpAddress[IP4_STR_MAX_SIZE];
156 CHAR16 ISCSIInitiatorNetmask[IP4_STR_MAX_SIZE];
157 CHAR16 ISCSIInitiatorGateway[IP4_STR_MAX_SIZE];
158 CHAR16 ISCSITargetName[ISCSI_NAME_MAX_SIZE];
159 CHAR16 ISCSITargetIpAddress[ISCSI_TARGET_URI_MAX_SIZE];
160 CHAR16 ISCSILun[ISCSI_LUN_STR_MAX_LEN];
161 CHAR16 ISCSIChapUsername[ISCSI_CHAP_NAME_STORAGE];
162 CHAR16 ISCSIChapSecret[ISCSI_CHAP_SECRET_STORAGE];
163 CHAR16 ISCSIReverseChapUsername[ISCSI_CHAP_NAME_STORAGE];
164 CHAR16 ISCSIReverseChapSecret[ISCSI_CHAP_SECRET_STORAGE];
165} KEYWORD_STR;
166
167typedef struct _ISCSI_CONFIG_IFR_NVDATA {
168 CHAR16 InitiatorName[ISCSI_NAME_MAX_SIZE];
169 CHAR16 AttemptName[ATTEMPT_NAME_SIZE];
170 UINT8 Enabled;
171 UINT8 IpMode;
172
173 UINT8 ConnectRetryCount;
174 UINT8 Padding1;
175 UINT16 ConnectTimeout; // Timeout value in milliseconds.
176
177 UINT8 InitiatorInfoFromDhcp;
178 UINT8 TargetInfoFromDhcp;
179 CHAR16 LocalIp[IP4_STR_MAX_SIZE];
180 CHAR16 SubnetMask[IP4_STR_MAX_SIZE];
181 CHAR16 Gateway[IP4_STR_MAX_SIZE];
182
183 CHAR16 TargetName[ISCSI_NAME_MAX_SIZE];
184 CHAR16 TargetIp[ISCSI_TARGET_URI_MAX_SIZE];
185 UINT16 TargetPort;
186 CHAR16 BootLun[ISCSI_LUN_STR_MAX_LEN];
187
188 UINT8 AuthenticationType;
189
190 UINT8 CHAPType;
191 CHAR16 CHAPName[ISCSI_CHAP_NAME_STORAGE];
192 CHAR16 CHAPSecret[ISCSI_CHAP_SECRET_STORAGE];
193 CHAR16 ReverseCHAPName[ISCSI_CHAP_NAME_STORAGE];
194 CHAR16 ReverseCHAPSecret[ISCSI_CHAP_SECRET_STORAGE];
195
196 BOOLEAN MutualRequired;
197 UINT8 Padding2;
198 CHAR16 KerberosUserName[KERBEROS_NAME_MAX_LEN];
199 CHAR16 KerberosUserSecret[KERBEROS_SECRET_STORAGE];
200 CHAR16 KerberosKDCName[KERBEROS_NAME_MAX_LEN];
201 CHAR16 KerberosKDCRealm[KERBEROS_NAME_MAX_LEN];
202 CHAR16 KerberosKDCIp[IP_STR_MAX_SIZE];
203 UINT16 KerberosKDCPort;
204
205 UINT8 DynamicOrderedList[ISCSI_MAX_ATTEMPTS_NUM];
206 UINT8 DeleteAttemptList[ISCSI_MAX_ATTEMPTS_NUM];
207 UINT8 AddAttemptList[ISCSI_MAX_ATTEMPTS_NUM];
208 CHAR16 IsId[ISID_CONFIGURABLE_STORAGE];
209
210 //
211 // This will be used by keywords.
212 //
213 CHAR16 ISCSIMacAddr[ISCSI_MAX_MAC_STRING_LEN];
214 CHAR16 ISCSIAttemptOrder[ATTEMPT_NAME_LIST_SIZE];
215 CHAR16 ISCSIAddAttemptList[ATTEMPT_NAME_LIST_SIZE];
216 CHAR16 ISCSIDeleteAttemptList[ATTEMPT_NAME_LIST_SIZE];
217 CHAR16 ISCSIDisplayAttemptList[ATTEMPT_NAME_LIST_SIZE];
218 CHAR16 ISCSIAttemptName[ATTEMPT_NAME_LIST_SIZE];
219 UINT8 ISCSIBootEnableList[ISCSI_MAX_ATTEMPTS_NUM];
220 UINT8 ISCSIIpAddressTypeList[ISCSI_MAX_ATTEMPTS_NUM];
221 UINT8 ISCSIConnectRetry[ISCSI_MAX_ATTEMPTS_NUM];
222 UINT16 ISCSIConnectTimeout[ISCSI_MAX_ATTEMPTS_NUM];
223 UINT8 ISCSIInitiatorInfoViaDHCP[ISCSI_MAX_ATTEMPTS_NUM];
224 UINT8 ISCSITargetInfoViaDHCP[ISCSI_MAX_ATTEMPTS_NUM];
225 UINT16 ISCSITargetTcpPort[ISCSI_MAX_ATTEMPTS_NUM];
226 UINT8 ISCSIAuthenticationMethod[ISCSI_MAX_ATTEMPTS_NUM];
227 UINT8 ISCSIChapType[ISCSI_MAX_ATTEMPTS_NUM];
228 KEYWORD_STR Keyword[ISCSI_MAX_ATTEMPTS_NUM];
229} ISCSI_CONFIG_IFR_NVDATA;
230#pragma pack()
231
232#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette