-/*++\r
+/** @file\r
+ Define NVData structures used by the iSCSI configuration component\r
\r
-Copyright (c) 2004 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- IScsiConfigNVDataStruc.h\r
- \r
-Abstract:\r
- \r
- NVData structure used by the iSCSI configuration component.\r
-\r
---*/\r
+**/\r
\r
#ifndef _ISCSI_NVDATASTRUC_H_\r
#define _ISCSI_NVDATASTRUC_H_\r
//\r
// Vfr has a limit on the size, it's 255 bytes.\r
//\r
-#define ISCSI_NAME_IFR_MAX_SIZE 126\r
+#define ISCSI_NAME_IFR_MIN_SIZE 4\r
+#define ISCSI_NAME_IFR_MAX_SIZE 223\r
\r
#define IP_MIN_SIZE 7\r
#define IP_MAX_SIZE 15\r
#define TARGET_PORT_MAX_NUM 65535\r
\r
#define DEVICE_ENTRY_LABEL 0x1234\r
+#define LABEL_END 0xffff\r
\r
#define KEY_INITIATOR_NAME 0x101\r
#define KEY_DHCP_ENABLE 0x102\r
#define KEY_DEVICE_ENTRY_BASE 0x1000\r
\r
#define ISCSI_LUN_STR_MAX_LEN 21\r
-#define ISCSI_CHAP_SECRET_MIN_LEN 13\r
-#define ISCSI_CHAP_SECRET_MAX_LEN 17\r
+#define ISCSI_CHAP_SECRET_MIN_LEN 12\r
+#define ISCSI_CHAP_SECRET_MAX_LEN 16\r
+//\r
+// ISCSI_CHAP_SECRET_STORAGE = ISCSI_CHAP_SECRET_MAX_LEN + sizeof (NULL-Terminator)\r
+//\r
+#define ISCSI_CHAP_SECRET_STORAGE 17\r
+\r
#define ISCSI_CHAP_NAME_MAX_LEN 126\r
\r
#pragma pack(1)\r
typedef struct {\r
- CHAR16 InitiatorName[ISCSI_NAME_IFR_MAX_SIZE];\r
+ CHAR16 InitiatorName[ISCSI_NAME_MAX_SIZE];\r
\r
UINT8 Enabled;\r
\r
CHAR16 SubnetMask[IP4_STR_MAX_SIZE];\r
CHAR16 Gateway[IP4_STR_MAX_SIZE];\r
\r
- CHAR16 TargetName[ISCSI_NAME_IFR_MAX_SIZE];\r
+ CHAR16 TargetName[ISCSI_NAME_MAX_SIZE];\r
CHAR16 TargetIp[IP4_STR_MAX_SIZE];\r
UINT16 TargetPort;\r
CHAR16 BootLun[ISCSI_LUN_STR_MAX_LEN];\r
\r
UINT8 CHAPType;\r
CHAR16 CHAPName[ISCSI_CHAP_NAME_MAX_LEN];\r
- CHAR16 CHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN];\r
+ CHAR16 CHAPSecret[ISCSI_CHAP_SECRET_STORAGE];\r
CHAR16 ReverseCHAPName[ISCSI_CHAP_NAME_MAX_LEN];\r
- CHAR16 ReverseCHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN];\r
+ CHAR16 ReverseCHAPSecret[ISCSI_CHAP_SECRET_STORAGE];\r
} ISCSI_CONFIG_IFR_NVDATA;\r
#pragma pack()\r
\r