10#ifndef _ISCSI_CONFIG_H_
11#define _ISCSI_CONFIG_H_
17extern UINT8 IScsiConfigVfrBin[];
18extern UINT8 IScsiDxeStrings[];
21#define VAR_OFFSET(Field) \
22 ((UINT16) ((UINTN) &(((ISCSI_CONFIG_IFR_NVDATA *) 0)->Field)))
24#define QUESTION_ID(Field) \
25 ((UINT16) (VAR_OFFSET (Field) + CONFIG_OPTION_OFFSET))
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)
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)
82#define ISCSI_INITATOR_NAME_VAR_NAME L"I_NAME"
84#define ISCSI_CONFIG_VAR_ATTR (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE)
86#define ISCSI_FORM_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('I', 'f', 'c', 'i')
88#define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \
91 ISCSI_FORM_CALLBACK_INFO, \
93 ISCSI_FORM_CALLBACK_INFO_SIGNATURE \
100 UINT8 AttemptConfigIndex;
102 BOOLEAN ValidiBFTPath;
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];
113 UINT8 AuthenticationType;
117 BOOLEAN AutoConfigureSuccess;
159 IN UINT16 StartLabelNumber,
160 OUT VOID **StartOpCodeHandle,
162 OUT VOID **EndOpCodeHandle,
216 IN UINT8 AttemptConfigIndex
EFI_STATUS IScsiConfigFormUnload(IN EFI_HANDLE DriverBindingHandle)
ISCSI_ATTEMPT_CONFIG_NVDATA * IScsiConfigGetAttemptByConfigIndex(IN UINT8 AttemptConfigIndex)
VOID IScsiConfigUpdateAttempt(VOID)
EFI_STATUS IScsiCreateOpCode(IN UINT16 StartLabelNumber, OUT VOID **StartOpCodeHandle, OUT EFI_IFR_GUID_LABEL **StartLabel, OUT VOID **EndOpCodeHandle, OUT EFI_IFR_GUID_LABEL **EndLabel)
EFI_STATUS IScsiConfigFormInit(IN EFI_HANDLE DriverBindingHandle)