9#ifndef _ISCSI_NVDATASTRUC_H_
10#define _ISCSI_NVDATASTRUC_H_
14#define VAR_EQ_TEST_NAME 0x100
15#define CONFIGURATION_VARSTORE_ID 0x6666
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
23#define ISCSI_MAX_ATTEMPTS_NUM FixedPcdGet8 (PcdMaxIScsiAttemptNumber)
25#define ISCSI_NAME_IFR_MIN_SIZE 4
26#define ISCSI_NAME_IFR_MAX_SIZE 223
27#define ISCSI_NAME_MAX_SIZE 224
29#define ATTEMPT_NAME_LIST_SIZE 96
30#define ATTEMPT_NAME_SIZE 12
32#define CONNECT_MIN_RETRY 0
33#define CONNECT_MAX_RETRY 16
35#define CONNECT_MIN_TIMEOUT 100
36#define CONNECT_MAX_TIMEOUT 20000
37#define CONNECT_DEFAULT_TIMEOUT 1000
39#define ISCSI_ACTIVE_DISABLED 0
40#define ISCSI_ACTIVE_ENABLED 1
42#define ISCSI_DISABLED 0
43#define ISCSI_ENABLED 1
44#define ISCSI_ENABLED_FOR_MPIO 2
48#define IP_MODE_AUTOCONFIG 2
50#define ISCSI_AUTH_TYPE_NONE 0
51#define ISCSI_AUTH_TYPE_CHAP 1
52#define ISCSI_AUTH_TYPE_KRB 2
55#define IP4_MAX_SIZE 15
56#define IP4_STR_MAX_SIZE 16
63#define IP_STR_MAX_SIZE 40
66#define LUN_MAX_SIZE 20
67#define ISCSI_LUN_STR_MAX_LEN 21
69#define ISCSI_CHAP_UNI 0
70#define ISCSI_CHAP_MUTUAL 1
72#define TARGET_PORT_MIN_NUM 0
73#define TARGET_PORT_MAX_NUM 65535
74#define LABEL_END 0xffff
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
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
100#define KEY_IP_MODE 0x11c
101#define KEY_AUTH_TYPE 0x11d
102#define KEY_CONFIG_ISID 0x11e
104#define ATTEMPT_ENTRY_LABEL 0x9000
105#define KEY_ATTEMPT_ENTRY_BASE 0xa000
106#define KEY_DE_ATTEMPT_ENTRY_BASE 0xb000
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
116#define ISCSI_CHAP_SECRET_MIN_LEN 12
117#define ISCSI_CHAP_SECRET_MAX_LEN 16
121#define ISCSI_CHAP_SECRET_STORAGE 17
123#define ISCSI_CHAP_NAME_MAX_LEN 126
124#define ISCSI_CHAP_NAME_STORAGE 127
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
133#define ISID_CONFIGURABLE_MIN_LEN 6
134#define ISID_CONFIGURABLE_MAX_LEN 12
135#define ISID_CONFIGURABLE_STORAGE 13
140#define ISCSI_MAX_MAC_STRING_LEN 96
145#define ISCSI_TARGET_URI_MIN_SIZE 0
146#define ISCSI_TARGET_URI_MAX_SIZE 255
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];
168 CHAR16 InitiatorName[ISCSI_NAME_MAX_SIZE];
169 CHAR16 AttemptName[ATTEMPT_NAME_SIZE];
173 UINT8 ConnectRetryCount;
175 UINT16 ConnectTimeout;
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];
183 CHAR16 TargetName[ISCSI_NAME_MAX_SIZE];
184 CHAR16 TargetIp[ISCSI_TARGET_URI_MAX_SIZE];
186 CHAR16 BootLun[ISCSI_LUN_STR_MAX_LEN];
188 UINT8 AuthenticationType;
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];
196 BOOLEAN MutualRequired;
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;
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];
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];