]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/iScsi/IScsiConfig.h
e5c528e08cc0a96dc0ab0f34ac9c6c2015299ce5
[mirror_edk2.git] / MdeModulePkg / Universal / iScsi / IScsiConfig.h
1 /*++
2
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
10 Intel Corporation.
11
12 Module Name:
13
14 IScsiConfig.h
15
16 Abstract:
17
18
19 --*/
20
21 #ifndef _ISCSI_CONFIG_H_
22 #define _ISCSI_CONFIG_H_
23
24 //#include "Tiano.h"
25 //#include "EfiDriverLib.h"
26 //#include "Base.h"
27 #include <Library/FrameworkHiiLib.h>
28 #include <Protocol/FrameworkFormBrowser.h>
29 #include <Protocol/FrameworkFormCallback.h>
30 #include <Library/FrameworkIfrSupportLib.h>
31 #include <Library/DebugLib.h>
32 #include <Library/BaseLib.h>
33 //#include "EfiPrintLib.h"
34 //#include EFI_PROTOCOL_DEFINITION (Hii)
35 //#include EFI_PROTOCOL_DEFINITION (FormBrowser)
36 //#include EFI_PROTOCOL_DEFINITION (FormCallback)
37
38 #include <Library/NetLib.h>
39 #include "IScsiConfigNVDataStruc.h"
40
41 extern UINT8 IScsiConfigDxeBin[];
42 extern UINT8 iSCSIStrings[];
43
44 #define ISCSI_INITATOR_NAME_VAR_NAME L"I_NAME"
45
46 #define ISCSI_CONFIG_VAR_ATTR (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE)
47
48 #define ISCSI_FORM_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('I', 'f', 'c', 'i')
49
50 #define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \
51 CR ( \
52 Callback, \
53 ISCSI_FORM_CALLBACK_INFO, \
54 FormCallback, \
55 ISCSI_FORM_CALLBACK_INFO_SIGNATURE \
56 )
57
58 #pragma pack(1)
59
60 typedef struct _ISCSI_MAC_INFO {
61 EFI_MAC_ADDRESS Mac;
62 UINT8 Len;
63 } ISCSI_MAC_INFO;
64
65 typedef struct _ISCSI_DEVICE_LIST {
66 UINT8 NumDevice;
67 ISCSI_MAC_INFO MacInfo[1];
68 } ISCSI_DEVICE_LIST;
69
70 #pragma pack()
71
72 typedef struct _ISCSI_CONFIG_FORM_ENTRY {
73 NET_LIST_ENTRY Link;
74 EFI_HANDLE Controller;
75 CHAR16 MacString[95];
76 STRING_REF PortTitleToken;
77 STRING_REF PortTitleHelpToken;
78
79 ISCSI_SESSION_CONFIG_NVDATA SessionConfigData;
80 ISCSI_CHAP_AUTH_CONFIG_NVDATA AuthConfigData;
81 } ISCSI_CONFIG_FORM_ENTRY;
82
83 typedef struct _ISCSI_FORM_CALLBACK_INFO {
84 UINTN Signature;
85 EFI_HANDLE CallbackHandle;
86 EFI_FORM_CALLBACK_PROTOCOL FormCallback;
87 UINT16 *KeyList;
88 VOID *FormBuffer;
89 EFI_HII_HANDLE RegisteredHandle;
90 EFI_HII_PROTOCOL *Hii;
91 ISCSI_CONFIG_FORM_ENTRY *Current;
92 } ISCSI_FORM_CALLBACK_INFO;
93
94 EFI_STATUS
95 IScsiConfigUpdateForm (
96 IN EFI_HANDLE DriverBindingHandle,
97 IN EFI_HANDLE Controller,
98 IN BOOLEAN AddForm
99 );
100
101 EFI_STATUS
102 IScsiConfigFormInit (
103 IN EFI_HANDLE DriverBindingHandle
104 );
105
106 EFI_STATUS
107 IScsiConfigFormUnload (
108 IN EFI_HANDLE DriverBindingHandle
109 );
110
111 #endif