]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h
move iscsi driver into network directory, and change its name to comply with name...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiConfigNVDataStruc.h
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h
new file mode 100644 (file)
index 0000000..768547a
--- /dev/null
@@ -0,0 +1,104 @@
+/*++\r
+\r
+Copyright (c) 2004 - 2007, Intel Corporation\r
+All rights reserved. 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
+\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
+#ifndef _ISCSI_NVDATASTRUC_H_\r
+#define _ISCSI_NVDATASTRUC_H_\r
+\r
+#define ISCSI_CONFIG_GUID \\r
+  { \\r
+    0x6456ed61, 0x3579, 0x41c9, { 0x8a, 0x26, 0x0a, 0x0b, 0xd6, 0x2b, 0x78, 0xfc } \\r
+  }\r
+\r
+#define VAR_EQ_TEST_NAME    0x100\r
+\r
+#define FORMID_MAIN_FORM    1\r
+#define FORMID_DEVICE_FORM  2\r
+\r
+#define ISCSI_NAME_MAX_SIZE 224\r
+\r
+//\r
+// Vfr has a limit on the size, it's 255 bytes.\r
+//\r
+#define ISCSI_NAME_IFR_MAX_SIZE   126\r
+\r
+#define IP_MIN_SIZE               7\r
+#define IP_MAX_SIZE               15\r
+#define IP4_STR_MAX_SIZE          16\r
+\r
+#define LUN_MIN_SIZE              1\r
+#define LUN_MAX_SIZE              20\r
+\r
+#define ISCSI_CHAP_NONE           0\r
+#define ISCSI_CHAP_UNI            1\r
+#define ISCSI_CHAP_MUTUAL         2\r
+\r
+#define TARGET_PORT_MIN_NUM       0\r
+#define TARGET_PORT_MAX_NUM       65535\r
+\r
+#define DEVICE_ENTRY_LABEL        0x1234\r
+\r
+#define KEY_INITIATOR_NAME        0x101\r
+#define KEY_DHCP_ENABLE           0x102\r
+#define KEY_LOCAL_IP              0x103\r
+#define KEY_SUBNET_MASK           0x104\r
+#define KEY_GATE_WAY              0x105\r
+#define KEY_TARGET_IP             0x106\r
+#define KEY_CHAP_NAME             0x107\r
+#define KEY_CHAP_SECRET           0x108\r
+#define KEY_REVERSE_CHAP_NAME     0x109\r
+#define KEY_REVERSE_CHAP_SECRET   0x10a\r
+#define KEY_SAVE_CHANGES          0x10b\r
+#define KEY_TARGET_NAME           0x10c\r
+#define KEY_BOOT_LUN              0x10d\r
+\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_NAME_MAX_LEN   126\r
+\r
+#pragma pack(1)\r
+typedef struct {\r
+  CHAR16  InitiatorName[ISCSI_NAME_IFR_MAX_SIZE];\r
+\r
+  UINT8   Enabled;\r
+\r
+  UINT8   InitiatorInfoFromDhcp;\r
+  CHAR16  LocalIp[IP4_STR_MAX_SIZE];\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  TargetIp[IP4_STR_MAX_SIZE];\r
+  UINT16  TargetPort;\r
+  CHAR16  BootLun[ISCSI_LUN_STR_MAX_LEN];\r
+  UINT8   TargetInfoFromDhcp;\r
+\r
+  UINT8   CHAPType;\r
+  CHAR16  CHAPName[ISCSI_CHAP_NAME_MAX_LEN];\r
+  CHAR16  CHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN];\r
+  CHAR16  ReverseCHAPName[ISCSI_CHAP_NAME_MAX_LEN];\r
+  CHAR16  ReverseCHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN];\r
+} ISCSI_CONFIG_IFR_NVDATA;\r
+#pragma pack()\r
+\r
+#endif\r