]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h
update file header
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiConfig.h
CommitLineData
12618416 1/** @file\r
2 The header file of IScsiConfig.c\r
6a690e23 3\r
12618416 4Copyright (c) 2004 - 2008, Intel Corporation\r
7a444476 5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
6a690e23 12\r
13Module Name:\r
14\r
15 IScsiConfig.h\r
16\r
17Abstract:\r
18\r
12618416 19 The header file of IScsiConfig.c\r
6a690e23 20\r
12618416 21**/\r
6a690e23 22\r
23#ifndef _ISCSI_CONFIG_H_\r
24#define _ISCSI_CONFIG_H_\r
25\r
93e3992d 26#include <Library/HiiLib.h>\r
9226efe5 27#include <Library/ExtendedHiiLib.h>\r
93e3992d 28#include <Library/IfrSupportLib.h>\r
9226efe5 29#include <Library/ExtendedIfrSupportLib.h>\r
6a690e23 30#include <Library/DebugLib.h>\r
31#include <Library/BaseLib.h>\r
6a690e23 32#include <Library/NetLib.h>\r
33#include "IScsiConfigNVDataStruc.h"\r
34\r
35extern UINT8 IScsiConfigDxeBin[];\r
7a444476 36extern UINT8 IScsiDxeStrings[];\r
6a690e23 37\r
38#define ISCSI_INITATOR_NAME_VAR_NAME L"I_NAME"\r
39\r
40#define ISCSI_CONFIG_VAR_ATTR (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE)\r
41\r
42#define ISCSI_FORM_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('I', 'f', 'c', 'i')\r
43\r
44#define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \\r
45 CR ( \\r
46 Callback, \\r
47 ISCSI_FORM_CALLBACK_INFO, \\r
93e3992d 48 ConfigAccess, \\r
6a690e23 49 ISCSI_FORM_CALLBACK_INFO_SIGNATURE \\r
50 )\r
51\r
52#pragma pack(1)\r
53\r
54typedef struct _ISCSI_MAC_INFO {\r
55 EFI_MAC_ADDRESS Mac;\r
56 UINT8 Len;\r
57} ISCSI_MAC_INFO;\r
58\r
59typedef struct _ISCSI_DEVICE_LIST {\r
60 UINT8 NumDevice;\r
61 ISCSI_MAC_INFO MacInfo[1];\r
62} ISCSI_DEVICE_LIST;\r
63\r
64#pragma pack()\r
65\r
66typedef struct _ISCSI_CONFIG_FORM_ENTRY {\r
e48e37fc 67 LIST_ENTRY Link;\r
6a690e23 68 EFI_HANDLE Controller;\r
69 CHAR16 MacString[95];\r
6c7a807a 70 EFI_STRING_ID PortTitleToken;\r
71 EFI_STRING_ID PortTitleHelpToken;\r
6a690e23 72\r
73 ISCSI_SESSION_CONFIG_NVDATA SessionConfigData;\r
74 ISCSI_CHAP_AUTH_CONFIG_NVDATA AuthConfigData;\r
75} ISCSI_CONFIG_FORM_ENTRY;\r
76\r
77typedef struct _ISCSI_FORM_CALLBACK_INFO {\r
93e3992d 78 UINTN Signature;\r
79 EFI_HANDLE DriverHandle;\r
80 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r
81 EFI_HII_DATABASE_PROTOCOL *HiiDatabase;\r
82 EFI_HII_CONFIG_ROUTING_PROTOCOL *ConfigRouting;\r
83 UINT16 *KeyList;\r
84 VOID *FormBuffer;\r
85 EFI_HII_HANDLE RegisteredHandle;\r
86 ISCSI_CONFIG_FORM_ENTRY *Current;\r
6a690e23 87} ISCSI_FORM_CALLBACK_INFO;\r
88\r
12618416 89/**\r
90 Updates the iSCSI configuration form to add/delete an entry for the iSCSI\r
91 device specified by the Controller.\r
92\r
93 @param DriverBindingHandle[in] The driverbinding handle.\r
94\r
95 @param Controller[in] The controller handle of the iSCSI device.\r
96\r
97 @param AddForm[in] Whether to add or delete a form entry.\r
98\r
99 @retval EFI_SUCCESS The iSCSI configuration form is updated.\r
100\r
101 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
102\r
103**/\r
6a690e23 104EFI_STATUS\r
105IScsiConfigUpdateForm (\r
106 IN EFI_HANDLE DriverBindingHandle,\r
107 IN EFI_HANDLE Controller,\r
108 IN BOOLEAN AddForm\r
109 );\r
110\r
12618416 111/**\r
112 Initialize the iSCSI configuration form.\r
113\r
114 @param DriverBindingHandle[in] The iSCSI driverbinding handle.\r
115\r
116 @retval EFI_SUCCESS The iSCSI configuration form is initialized.\r
117\r
118 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
119\r
120**/\r
6a690e23 121EFI_STATUS\r
122IScsiConfigFormInit (\r
123 IN EFI_HANDLE DriverBindingHandle\r
124 );\r
125\r
12618416 126/**\r
127 Unload the iSCSI configuration form, this includes: delete all the iSCSI\r
128 device configuration entries, uninstall the form callback protocol and\r
129 free the resources used.\r
130\r
131 @param DriverBindingHandle[in] The iSCSI driverbinding handle.\r
132\r
133 @retval EFI_SUCCESS The iSCSI configuration form is unloaded.\r
134\r
135 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
136\r
137**/\r
6a690e23 138EFI_STATUS\r
139IScsiConfigFormUnload (\r
140 IN EFI_HANDLE DriverBindingHandle\r
141 );\r
142\r
143#endif\r