2 The header file of IScsiConfig.c.
4 Copyright (c) 2004 - 2008, Intel Corporation.<BR>
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
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.
15 #ifndef _ISCSI_CONFIG_H_
16 #define _ISCSI_CONFIG_H_
18 #include <Library/HiiLib.h>
19 #include <Library/ExtendedHiiLib.h>
20 #include <Library/IfrSupportLib.h>
21 #include <Library/ExtendedIfrSupportLib.h>
22 #include <Library/DebugLib.h>
23 #include <Library/BaseLib.h>
24 #include <Library/NetLib.h>
26 extern UINT8 IScsiConfigDxeBin
[];
27 extern UINT8 IScsiDxeStrings
[];
29 #define ISCSI_INITATOR_NAME_VAR_NAME L"I_NAME"
31 #define ISCSI_CONFIG_VAR_ATTR (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE)
33 #define ISCSI_FORM_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('I', 'f', 'c', 'i')
35 #define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \
38 ISCSI_FORM_CALLBACK_INFO, \
40 ISCSI_FORM_CALLBACK_INFO_SIGNATURE \
45 typedef struct _ISCSI_MAC_INFO
{
50 typedef struct _ISCSI_DEVICE_LIST
{
52 ISCSI_MAC_INFO MacInfo
[1];
57 typedef struct _ISCSI_CONFIG_FORM_ENTRY
{
59 EFI_HANDLE Controller
;
61 EFI_STRING_ID PortTitleToken
;
62 EFI_STRING_ID PortTitleHelpToken
;
64 ISCSI_SESSION_CONFIG_NVDATA SessionConfigData
;
65 ISCSI_CHAP_AUTH_CONFIG_NVDATA AuthConfigData
;
66 } ISCSI_CONFIG_FORM_ENTRY
;
68 typedef struct _ISCSI_FORM_CALLBACK_INFO
{
70 EFI_HANDLE DriverHandle
;
71 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess
;
72 EFI_HII_DATABASE_PROTOCOL
*HiiDatabase
;
73 EFI_HII_CONFIG_ROUTING_PROTOCOL
*ConfigRouting
;
76 EFI_HII_HANDLE RegisteredHandle
;
77 ISCSI_CONFIG_FORM_ENTRY
*Current
;
78 } ISCSI_FORM_CALLBACK_INFO
;
81 Updates the iSCSI configuration form to add/delete an entry for the iSCSI
82 device specified by the Controller.
84 @param[in] DriverBindingHandle The driverbinding handle.
85 @param[in] Controller The controller handle of the iSCSI device.
86 @param[in] AddForm Whether to add or delete a form entry.
88 @retval EFI_SUCCESS The iSCSI configuration form is updated.
89 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
90 @retval Others Some unexpected errors happened.
93 IScsiConfigUpdateForm (
94 IN EFI_HANDLE DriverBindingHandle
,
95 IN EFI_HANDLE Controller
,
100 Initialize the iSCSI configuration form.
102 @param[in] DriverBindingHandle The iSCSI driverbinding handle.
104 @retval EFI_SUCCESS The iSCSI configuration form is initialized.
105 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
106 @retval Others Some unexpected error happened.
109 IScsiConfigFormInit (
110 IN EFI_HANDLE DriverBindingHandle
114 Unload the iSCSI configuration form, this includes: delete all the iSCSI
115 device configuration entries, uninstall the form callback protocol and
116 free the resources used.
118 @param[in] DriverBindingHandle The iSCSI driverbinding handle.
120 @retval EFI_SUCCESS The iSCSI configuration form is unloaded.
121 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
124 IScsiConfigFormUnload (
125 IN EFI_HANDLE DriverBindingHandle