0cf4ffeed98eefa4430ea853832dc0344c7ca345
[mirror_edk2.git] / NetworkPkg / IScsiDxe / IScsiConfigVfr.vfr
1 /** @file
2 VFR file used by the iSCSI configuration component.
3
4 Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include "IScsiConfigNVDataStruc.h"
16
17 #define EFI_NETWORK_DEVICE_CLASS 0x04
18
19 formset
20 guid = ISCSI_CONFIG_GUID,
21 title = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_TITLE),
22 help = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_HELP),
23 class = EFI_NETWORK_DEVICE_CLASS,
24 subclass = 0x03,
25
26 varstore ISCSI_CONFIG_IFR_NVDATA,
27 varid = CONFIGURATION_VARSTORE_ID,
28 name = ISCSI_CONFIG_IFR_NVDATA,
29 guid = ISCSI_CONFIG_GUID;
30
31 form formid = FORMID_MAIN_FORM,
32 title = STRING_TOKEN(STR_ISCSI_MAIN_FORM_TITLE);
33
34 string varid = ISCSI_CONFIG_IFR_NVDATA.InitiatorName,
35 prompt = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME),
36 help = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME_HELP),
37 flags = INTERACTIVE,
38 key = KEY_INITIATOR_NAME,
39 minsize = ISCSI_NAME_IFR_MIN_SIZE,
40 maxsize = ISCSI_NAME_IFR_MAX_SIZE,
41 endstring;
42
43 subtitle text = STRING_TOKEN(STR_NULL);
44
45 goto FORMID_MAC_FORM,
46 prompt = STRING_TOKEN(STR_ADD_ATTEMPT_ENTRY),
47 help = STRING_TOKEN(STR_ADD_ATTEMPT_ENTRY),
48 flags = INTERACTIVE,
49 key = KEY_ADD_ATTEMPT;
50
51 label ATTEMPT_ENTRY_LABEL;
52 label LABEL_END;
53
54 subtitle text = STRING_TOKEN(STR_NULL);
55
56 goto FORMID_DELETE_FORM,
57 prompt = STRING_TOKEN (STR_DEL_ATTEMPT_ENTRY),
58 help = STRING_TOKEN (STR_DEL_ATTEMPT_ENTRY_HELP),
59 flags = INTERACTIVE,
60 key = KEY_DELETE_ATTEMPT;
61
62 subtitle text = STRING_TOKEN(STR_NULL);
63
64 goto FORMID_ORDER_FORM,
65 prompt = STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY),
66 help = STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY),
67 flags = INTERACTIVE,
68 key = KEY_ORDER_ATTEMPT_CONFIG;
69
70 subtitle text = STRING_TOKEN(STR_NULL);
71
72 endform;
73
74 form formid = FORMID_MAC_FORM,
75 title = STRING_TOKEN(STR_ISCSI_MAC_FORM_TITLE);
76
77 label MAC_ENTRY_LABEL;
78 label LABEL_END;
79
80 endform;
81
82 form formid = FORMID_ORDER_FORM,
83 title = STRING_TOKEN(STR_ORDER_ATTEMPT_ENTRY);
84
85 label ORDER_ENTRY_LABEL;
86 label LABEL_END;
87
88 goto FORMID_MAIN_FORM,
89 prompt = STRING_TOKEN (STR_SAVE_AND_EXIT),
90 help = STRING_TOKEN (STR_SAVE_AND_EXIT),
91 flags = INTERACTIVE,
92 key = KEY_SAVE_ORDER_CHANGES;
93
94 goto FORMID_MAIN_FORM,
95 prompt = STRING_TOKEN (STR_NO_SAVE_AND_EXIT),
96 help = STRING_TOKEN (STR_NO_SAVE_AND_EXIT),
97 flags = INTERACTIVE,
98 key = KEY_IGNORE_ORDER_CHANGES;
99
100 endform;
101
102 form formid = FORMID_DELETE_FORM,
103 title = STRING_TOKEN(STR_DEL_ATTEMPT_ENTRY);
104
105 label DELETE_ENTRY_LABEL;
106 label LABEL_END;
107
108 goto FORMID_MAIN_FORM,
109 prompt = STRING_TOKEN (STR_SAVE_AND_EXIT),
110 help = STRING_TOKEN (STR_SAVE_AND_EXIT),
111 flags = INTERACTIVE,
112 key = KEY_SAVE_DELETE_ATTEMPT;
113
114 goto FORMID_MAIN_FORM,
115 prompt = STRING_TOKEN (STR_NO_SAVE_AND_EXIT),
116 help = STRING_TOKEN (STR_NO_SAVE_AND_EXIT),
117 flags = INTERACTIVE,
118 key = KEY_IGNORE_DELETE_ATTEMPT;
119
120 endform;
121
122 form formid = FORMID_ATTEMPT_FORM,
123 title = STRING_TOKEN(STR_ISCSI_ATTEMPT_FORM_TITLE);
124
125 string varid = ISCSI_CONFIG_IFR_NVDATA.AttemptName,
126 prompt = STRING_TOKEN(STR_ISCSI_ATTEMPT_NAME),
127 help = STRING_TOKEN(STR_ISCSI_ATTEMPT_NAME_HELP),
128 flags = INTERACTIVE,
129 key = KEY_ATTEMPT_NAME,
130 minsize = 0,
131 maxsize = ATTEMPT_NAME_MAX_SIZE,
132 endstring;
133
134 subtitle text = STRING_TOKEN(STR_NULL);
135
136 oneof varid = ISCSI_CONFIG_IFR_NVDATA.Enabled,
137 prompt = STRING_TOKEN(STR_ISCSI_MODE_PROMPT),
138 help = STRING_TOKEN(STR_ISCSI_MODE_HELP),
139 option text = STRING_TOKEN(STR_ISCSI_MODE_DISABLED), value = ISCSI_DISABLED, flags = DEFAULT;
140 option text = STRING_TOKEN(STR_ISCSI_MODE_ENABLED), value = ISCSI_ENABLED, flags = 0;
141 option text = STRING_TOKEN(STR_ISCSI_MODE_ENABLED_FOR_MPIO), value = ISCSI_ENABLED_FOR_MPIO, flags = 0;
142 endoneof;
143
144 subtitle text = STRING_TOKEN(STR_NULL);
145
146 oneof varid = ISCSI_CONFIG_IFR_NVDATA.IpMode,
147 questionid = KEY_IP_MODE,
148 prompt = STRING_TOKEN(STR_IP_MODE_PROMPT),
149 help = STRING_TOKEN(STR_IP_MODE_HELP),
150 option text = STRING_TOKEN(STR_IP_MODE_IP4), value = IP_MODE_IP4, flags = INTERACTIVE;
151 option text = STRING_TOKEN(STR_IP_MODE_IP6), value = IP_MODE_IP6, flags = INTERACTIVE;
152 option text = STRING_TOKEN(STR_IP_MODE_AUTOCONFIG), value = IP_MODE_AUTOCONFIG, flags = INTERACTIVE;
153 endoneof;
154
155 subtitle text = STRING_TOKEN(STR_NULL);
156
157 numeric varid = ISCSI_CONFIG_IFR_NVDATA.ConnectRetryCount,
158 prompt = STRING_TOKEN(STR_ISCSI_CONFIG_RETRY),
159 help = STRING_TOKEN(STR_ISCSI_CONFIG_RETRY_HELP),
160 flags = 0,
161 minimum = CONNECT_MIN_RETRY,
162 maximum = CONNECT_MAX_RETRY,
163 step = 0,
164 endnumeric;
165
166 numeric varid = ISCSI_CONFIG_IFR_NVDATA.ConnectTimeout,
167 prompt = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT),
168 help = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT_HELP),
169 flags = 0,
170 minimum = CONNECT_MIN_TIMEOUT,
171 maximum = CONNECT_MAX_TIMEOUT,
172 step = 0,
173 default = CONNECT_DEFAULT_TIMEOUT,
174 endnumeric;
175
176 subtitle text = STRING_TOKEN(STR_NULL);
177
178 string varid = ISCSI_CONFIG_IFR_NVDATA.IsId,
179 prompt = STRING_TOKEN(STR_ISCSI_CONFIG_ISID),
180 help = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP),
181 flags = INTERACTIVE,
182 key = KEY_CONFIG_ISID,
183 minsize = ISID_CONFIGURABLE_MIN_LEN,
184 maxsize = ISID_CONFIGURABLE_MAX_LEN,
185 endstring;
186
187 subtitle text = STRING_TOKEN(STR_NULL);
188
189 suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
190 checkbox varid = ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp,
191 prompt = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP),
192 help = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP),
193 flags = INTERACTIVE,
194 key = KEY_DHCP_ENABLE,
195 endcheckbox;
196 endif;
197
198 suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01 OR
199 ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_IP6 OR
200 ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
201 string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp,
202 prompt = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS),
203 help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
204 flags = INTERACTIVE,
205 key = KEY_LOCAL_IP,
206 minsize = IP4_MIN_SIZE,
207 maxsize = IP4_MAX_SIZE,
208 endstring;
209
210 string varid = ISCSI_CONFIG_IFR_NVDATA.SubnetMask,
211 prompt = STRING_TOKEN(STR_ISCSI_LOCAL_MASK),
212 help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
213 flags = INTERACTIVE,
214 key = KEY_SUBNET_MASK,
215 minsize = IP4_MIN_SIZE,
216 maxsize = IP4_MAX_SIZE,
217 endstring;
218
219 string varid = ISCSI_CONFIG_IFR_NVDATA.Gateway,
220 prompt = STRING_TOKEN(STR_ISCSI_LOCAL_GATEWAY),
221 help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
222 flags = INTERACTIVE,
223 key = KEY_GATE_WAY,
224 minsize = IP4_MIN_SIZE,
225 maxsize = IP4_MAX_SIZE,
226 endstring;
227
228 endif;
229
230 suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
231 subtitle text = STRING_TOKEN(STR_NULL);
232 endif;
233
234 suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG OR
235 ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00;
236 checkbox varid = ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp,
237 prompt = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP_ON_TARGET),
238 help = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP_ON_TARGET),
239 flags = 0,
240 endcheckbox;
241 endif;
242
243 suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG OR
244 ideqval ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp == 0x01;
245
246 string varid = ISCSI_CONFIG_IFR_NVDATA.TargetName,
247 prompt = STRING_TOKEN(STR_ISCSI_TARGET_NAME),
248 help = STRING_TOKEN(STR_ISCSI_TARGET_NAME_HELP),
249 flags = INTERACTIVE,
250 key = KEY_TARGET_NAME,
251 minsize = ISCSI_NAME_IFR_MIN_SIZE,
252 maxsize = ISCSI_NAME_IFR_MAX_SIZE,
253 endstring;
254
255 string varid = ISCSI_CONFIG_IFR_NVDATA.TargetIp,
256 prompt = STRING_TOKEN(STR_ISCSI_TARGET_IP_ADDRESS),
257 help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
258 flags = INTERACTIVE,
259 key = KEY_TARGET_IP,
260 minsize = IP_MIN_SIZE,
261 maxsize = IP_MAX_SIZE,
262 endstring;
263
264 numeric varid = ISCSI_CONFIG_IFR_NVDATA.TargetPort,
265 prompt = STRING_TOKEN(STR_ISCSI_TARGET_PORT),
266 help = STRING_TOKEN(STR_ISCSI_TARGET_PORT),
267 flags = 0,
268 minimum = TARGET_PORT_MIN_NUM,
269 maximum = TARGET_PORT_MAX_NUM,
270 step = 0,
271 endnumeric;
272
273 string varid = ISCSI_CONFIG_IFR_NVDATA.BootLun,
274 prompt = STRING_TOKEN(STR_ISCSI_BOOT_LUN),
275 help = STRING_TOKEN(STR_ISCSI_BOOT_LUN_HELP),
276 flags = INTERACTIVE,
277 key = KEY_BOOT_LUN,
278 minsize = LUN_MIN_SIZE,
279 maxsize = LUN_MAX_SIZE,
280 endstring;
281
282 endif;
283
284 suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
285 subtitle text = STRING_TOKEN(STR_NULL);
286 endif;
287
288 oneof varid = ISCSI_CONFIG_IFR_NVDATA.AuthenticationType,
289 questionid = KEY_AUTH_TYPE,
290 prompt = STRING_TOKEN(STR_AUTHEN_TYPE_PROMPT),
291 help = STRING_TOKEN(STR_AUTHEN_TYPE_HELP),
292 option text = STRING_TOKEN(STR_AUTHEN_TYPE_CHAP), value = ISCSI_AUTH_TYPE_CHAP, flags = 0;
293 option text = STRING_TOKEN(STR_AUTHEN_TYPE_NONE), value = ISCSI_AUTH_TYPE_NONE, flags = DEFAULT;
294 endoneof;
295
296 suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.AuthenticationType == ISCSI_AUTH_TYPE_CHAP;
297 oneof varid = ISCSI_CONFIG_IFR_NVDATA.CHAPType,
298 prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT),
299 help = STRING_TOKEN(STR_CHAP_TYPE_HELP),
300 option text = STRING_TOKEN(STR_CHAP_TYPE_UNI), value = ISCSI_CHAP_UNI, flags = 0;
301 option text = STRING_TOKEN(STR_CHAP_TYPE_MUTUAL), value = ISCSI_CHAP_MUTUAL, flags = DEFAULT;
302 endoneof;
303 endif;
304
305 suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.AuthenticationType == ISCSI_AUTH_TYPE_CHAP;
306 string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPName,
307 prompt = STRING_TOKEN(STR_ISCSI_CHAP_NAME),
308 help = STRING_TOKEN(STR_ISCSI_CHAP_NAME),
309 flags = INTERACTIVE,
310 key = KEY_CHAP_NAME,
311 minsize = 0,
312 maxsize = ISCSI_CHAP_NAME_MAX_LEN,
313 endstring;
314
315 string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret,
316 prompt = STRING_TOKEN(STR_ISCSI_CHAP_SECRET),
317 help = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP),
318 flags = INTERACTIVE,
319 key = KEY_CHAP_SECRET,
320 minsize = ISCSI_CHAP_SECRET_MIN_LEN,
321 maxsize = ISCSI_CHAP_SECRET_MAX_LEN,
322 endstring;
323
324 endif;
325
326 suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.AuthenticationType == ISCSI_AUTH_TYPE_CHAP OR
327 NOT ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_MUTUAL;
328
329 string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName,
330 prompt = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME),
331 help = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME),
332 flags = INTERACTIVE,
333 key = KEY_REVERSE_CHAP_NAME,
334 minsize = 0,
335 maxsize = ISCSI_CHAP_NAME_MAX_LEN,
336 endstring;
337
338 string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret,
339 prompt = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_SECRET),
340 help = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP),
341 flags = INTERACTIVE,
342 key = KEY_REVERSE_CHAP_SECRET,
343 minsize = ISCSI_CHAP_SECRET_MIN_LEN,
344 maxsize = ISCSI_CHAP_SECRET_MAX_LEN,
345 endstring;
346
347 endif;
348
349 subtitle text = STRING_TOKEN(STR_NULL);
350
351 goto FORMID_ATTEMPT_FORM,
352 prompt = STRING_TOKEN (STR_SAVE_CHANGES),
353 help = STRING_TOKEN (STR_SAVE_CHANGES_HELP),
354 flags = INTERACTIVE,
355 key = KEY_SAVE_ATTEMPT_CONFIG;
356
357 goto FORMID_MAIN_FORM,
358 prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM),
359 help = STRING_TOKEN (STR_RETURN_MAIN_FORM),
360 flags = 0;
361
362 endform;
363
364 endformset;
365