]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h
sync comments, fix function header, rename variable name to follow coding style.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiConfigNVDataStruc.h
1 /** @file
2 Define NVData structures used by the iSCSI configuration component
3
4 Copyright (c) 2004 - 2007, Intel Corporation
5 All rights reserved. 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 Module Name:
14
15 IScsiConfigNVDataStruc.h
16
17 Abstract:
18
19 NVData structure used by the iSCSI configuration component.
20
21 **/
22
23 #ifndef _ISCSI_NVDATASTRUC_H_
24 #define _ISCSI_NVDATASTRUC_H_
25
26 #define ISCSI_CONFIG_GUID \
27 { \
28 0x6456ed61, 0x3579, 0x41c9, { 0x8a, 0x26, 0x0a, 0x0b, 0xd6, 0x2b, 0x78, 0xfc } \
29 }
30
31 #define VAR_EQ_TEST_NAME 0x100
32
33 #define FORMID_MAIN_FORM 1
34 #define FORMID_DEVICE_FORM 2
35
36 #define ISCSI_NAME_MAX_SIZE 224
37
38 //
39 // Vfr has a limit on the size, it's 255 bytes.
40 //
41 #define ISCSI_NAME_IFR_MAX_SIZE 126
42
43 #define IP_MIN_SIZE 7
44 #define IP_MAX_SIZE 15
45 #define IP4_STR_MAX_SIZE 16
46
47 #define LUN_MIN_SIZE 1
48 #define LUN_MAX_SIZE 20
49
50 #define ISCSI_CHAP_NONE 0
51 #define ISCSI_CHAP_UNI 1
52 #define ISCSI_CHAP_MUTUAL 2
53
54 #define TARGET_PORT_MIN_NUM 0
55 #define TARGET_PORT_MAX_NUM 65535
56
57 #define DEVICE_ENTRY_LABEL 0x1234
58
59 #define KEY_INITIATOR_NAME 0x101
60 #define KEY_DHCP_ENABLE 0x102
61 #define KEY_LOCAL_IP 0x103
62 #define KEY_SUBNET_MASK 0x104
63 #define KEY_GATE_WAY 0x105
64 #define KEY_TARGET_IP 0x106
65 #define KEY_CHAP_NAME 0x107
66 #define KEY_CHAP_SECRET 0x108
67 #define KEY_REVERSE_CHAP_NAME 0x109
68 #define KEY_REVERSE_CHAP_SECRET 0x10a
69 #define KEY_SAVE_CHANGES 0x10b
70 #define KEY_TARGET_NAME 0x10c
71 #define KEY_BOOT_LUN 0x10d
72
73 #define KEY_DEVICE_ENTRY_BASE 0x1000
74
75 #define ISCSI_LUN_STR_MAX_LEN 21
76 #define ISCSI_CHAP_SECRET_MIN_LEN 13
77 #define ISCSI_CHAP_SECRET_MAX_LEN 17
78 #define ISCSI_CHAP_NAME_MAX_LEN 126
79
80 #pragma pack(1)
81 typedef struct {
82 CHAR16 InitiatorName[ISCSI_NAME_IFR_MAX_SIZE];
83
84 UINT8 Enabled;
85
86 UINT8 InitiatorInfoFromDhcp;
87 CHAR16 LocalIp[IP4_STR_MAX_SIZE];
88 CHAR16 SubnetMask[IP4_STR_MAX_SIZE];
89 CHAR16 Gateway[IP4_STR_MAX_SIZE];
90
91 CHAR16 TargetName[ISCSI_NAME_IFR_MAX_SIZE];
92 CHAR16 TargetIp[IP4_STR_MAX_SIZE];
93 UINT16 TargetPort;
94 CHAR16 BootLun[ISCSI_LUN_STR_MAX_LEN];
95 UINT8 TargetInfoFromDhcp;
96
97 UINT8 CHAPType;
98 CHAR16 CHAPName[ISCSI_CHAP_NAME_MAX_LEN];
99 CHAR16 CHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN];
100 CHAR16 ReverseCHAPName[ISCSI_CHAP_NAME_MAX_LEN];
101 CHAR16 ReverseCHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN];
102 } ISCSI_CONFIG_IFR_NVDATA;
103 #pragma pack()
104
105 #endif