3 Copyright (c) 2007 Intel Corporation. All rights reserved
4 This software and associated documentation (if any) is furnished
5 under a license and may only be used or copied in accordance
6 with the terms of the license. Except as permitted by such
7 license, no part of this software or documentation may be
8 reproduced, stored in a retrieval system, or transmitted in any
9 form or by any means without the express written consent of
21 #ifndef _ISCSI_CONFIG_H_
22 #define _ISCSI_CONFIG_H_
24 #include <Library/FrameworkHiiLib.h>
25 #include <Protocol/FrameworkFormBrowser.h>
26 #include <Protocol/FrameworkFormCallback.h>
27 #include <Library/FrameworkIfrSupportLib.h>
28 #include <Library/DebugLib.h>
29 #include <Library/BaseLib.h>
31 #include <Library/NetLib.h>
32 #include "IScsiConfigNVDataStruc.h"
34 extern UINT8 IScsiConfigDxeBin
[];
35 extern UINT8 iSCSIStrings
[];
37 #define ISCSI_INITATOR_NAME_VAR_NAME L"I_NAME"
39 #define ISCSI_CONFIG_VAR_ATTR (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE)
41 #define ISCSI_FORM_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('I', 'f', 'c', 'i')
43 #define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \
46 ISCSI_FORM_CALLBACK_INFO, \
48 ISCSI_FORM_CALLBACK_INFO_SIGNATURE \
53 typedef struct _ISCSI_MAC_INFO
{
58 typedef struct _ISCSI_DEVICE_LIST
{
60 ISCSI_MAC_INFO MacInfo
[1];
65 typedef struct _ISCSI_CONFIG_FORM_ENTRY
{
67 EFI_HANDLE Controller
;
69 STRING_REF PortTitleToken
;
70 STRING_REF PortTitleHelpToken
;
72 ISCSI_SESSION_CONFIG_NVDATA SessionConfigData
;
73 ISCSI_CHAP_AUTH_CONFIG_NVDATA AuthConfigData
;
74 } ISCSI_CONFIG_FORM_ENTRY
;
76 typedef struct _ISCSI_FORM_CALLBACK_INFO
{
78 EFI_HANDLE CallbackHandle
;
79 EFI_FORM_CALLBACK_PROTOCOL FormCallback
;
82 EFI_HII_HANDLE RegisteredHandle
;
83 EFI_HII_PROTOCOL
*Hii
;
84 ISCSI_CONFIG_FORM_ENTRY
*Current
;
85 } ISCSI_FORM_CALLBACK_INFO
;
88 IScsiConfigUpdateForm (
89 IN EFI_HANDLE DriverBindingHandle
,
90 IN EFI_HANDLE Controller
,
96 IN EFI_HANDLE DriverBindingHandle
100 IScsiConfigFormUnload (
101 IN EFI_HANDLE DriverBindingHandle