]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Define NVData structures used by the iSCSI configuration component\r | |
3 | \r | |
4 | Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _ISCSI_NVDATASTRUC_H_\r | |
16 | #define _ISCSI_NVDATASTRUC_H_\r | |
17 | \r | |
18 | #include <Guid/Ip4IScsiConfigHii.h>\r | |
19 | \r | |
20 | #define VAR_EQ_TEST_NAME 0x100\r | |
21 | \r | |
22 | #define FORMID_MAIN_FORM 1\r | |
23 | #define FORMID_DEVICE_FORM 2\r | |
24 | \r | |
25 | #define ISCSI_NAME_MAX_SIZE 224\r | |
26 | \r | |
27 | //\r | |
28 | // Vfr has a limit on the size, it's 255 bytes.\r | |
29 | //\r | |
30 | #define ISCSI_NAME_IFR_MIN_SIZE 4\r | |
31 | #define ISCSI_NAME_IFR_MAX_SIZE 223\r | |
32 | \r | |
33 | #define IP_MIN_SIZE 7\r | |
34 | #define IP_MAX_SIZE 15\r | |
35 | #define IP4_STR_MAX_SIZE 16\r | |
36 | \r | |
37 | #define LUN_MIN_SIZE 1\r | |
38 | #define LUN_MAX_SIZE 20\r | |
39 | \r | |
40 | #define ISCSI_CHAP_NONE 0\r | |
41 | #define ISCSI_CHAP_UNI 1\r | |
42 | #define ISCSI_CHAP_MUTUAL 2\r | |
43 | \r | |
44 | #define TARGET_PORT_MIN_NUM 0\r | |
45 | #define TARGET_PORT_MAX_NUM 65535\r | |
46 | \r | |
47 | #define DEVICE_ENTRY_LABEL 0x1234\r | |
48 | #define LABEL_END 0xffff\r | |
49 | \r | |
50 | #define KEY_INITIATOR_NAME 0x101\r | |
51 | #define KEY_DHCP_ENABLE 0x102\r | |
52 | #define KEY_LOCAL_IP 0x103\r | |
53 | #define KEY_SUBNET_MASK 0x104\r | |
54 | #define KEY_GATE_WAY 0x105\r | |
55 | #define KEY_TARGET_IP 0x106\r | |
56 | #define KEY_CHAP_NAME 0x107\r | |
57 | #define KEY_CHAP_SECRET 0x108\r | |
58 | #define KEY_REVERSE_CHAP_NAME 0x109\r | |
59 | #define KEY_REVERSE_CHAP_SECRET 0x10a\r | |
60 | #define KEY_SAVE_CHANGES 0x10b\r | |
61 | #define KEY_TARGET_NAME 0x10c\r | |
62 | #define KEY_BOOT_LUN 0x10d\r | |
63 | #define KEY_CONFIG_ISID 0x10e\r | |
64 | \r | |
65 | #define KEY_DEVICE_ENTRY_BASE 0x1000\r | |
66 | \r | |
67 | #define ISCSI_LUN_STR_MAX_LEN 21\r | |
68 | #define ISCSI_CHAP_SECRET_MIN_LEN 12\r | |
69 | #define ISCSI_CHAP_SECRET_MAX_LEN 16\r | |
70 | //\r | |
71 | // ISCSI_CHAP_SECRET_STORAGE = ISCSI_CHAP_SECRET_MAX_LEN + sizeof (NULL-Terminator)\r | |
72 | //\r | |
73 | #define ISCSI_CHAP_SECRET_STORAGE 17\r | |
74 | \r | |
75 | #define ISCSI_CHAP_NAME_MAX_LEN 126\r | |
76 | #define ISCSI_CHAP_NAME_STORAGE 127\r | |
77 | \r | |
78 | #define ISID_CONFIGURABLE_MIN_LEN 6\r | |
79 | #define ISID_CONFIGURABLE_MAX_LEN 12\r | |
80 | #define ISID_CONFIGURABLE_STORAGE 13\r | |
81 | \r | |
82 | #pragma pack(1)\r | |
83 | typedef struct {\r | |
84 | CHAR16 InitiatorName[ISCSI_NAME_MAX_SIZE];\r | |
85 | \r | |
86 | UINT8 Enabled;\r | |
87 | \r | |
88 | UINT8 InitiatorInfoFromDhcp;\r | |
89 | CHAR16 LocalIp[IP4_STR_MAX_SIZE];\r | |
90 | CHAR16 SubnetMask[IP4_STR_MAX_SIZE];\r | |
91 | CHAR16 Gateway[IP4_STR_MAX_SIZE];\r | |
92 | \r | |
93 | CHAR16 TargetName[ISCSI_NAME_MAX_SIZE];\r | |
94 | CHAR16 TargetIp[IP4_STR_MAX_SIZE];\r | |
95 | UINT16 TargetPort;\r | |
96 | CHAR16 BootLun[ISCSI_LUN_STR_MAX_LEN];\r | |
97 | UINT8 TargetInfoFromDhcp;\r | |
98 | \r | |
99 | UINT8 CHAPType;\r | |
100 | CHAR16 CHAPName[ISCSI_CHAP_NAME_STORAGE];\r | |
101 | CHAR16 CHAPSecret[ISCSI_CHAP_SECRET_STORAGE];\r | |
102 | CHAR16 ReverseCHAPName[ISCSI_CHAP_NAME_STORAGE];\r | |
103 | CHAR16 ReverseCHAPSecret[ISCSI_CHAP_SECRET_STORAGE];\r | |
104 | \r | |
105 | CHAR16 IsId[ISID_CONFIGURABLE_STORAGE];\r | |
106 | } ISCSI_CONFIG_IFR_NVDATA;\r | |
107 | #pragma pack()\r | |
108 | \r | |
109 | #endif\r |