]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/iScsi/IScsiConfig.h
726b7a2f713d4d28fd8ff63fb5359635fa1ff772
[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 <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>
30
31 #include <Library/NetLib.h>
32 #include "IScsiConfigNVDataStruc.h"
33
34 extern UINT8 IScsiConfigDxeBin[];
35 extern UINT8 iSCSIStrings[];
36
37 #define ISCSI_INITATOR_NAME_VAR_NAME L"I_NAME"
38
39 #define ISCSI_CONFIG_VAR_ATTR (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE)
40
41 #define ISCSI_FORM_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('I', 'f', 'c', 'i')
42
43 #define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \
44 CR ( \
45 Callback, \
46 ISCSI_FORM_CALLBACK_INFO, \
47 FormCallback, \
48 ISCSI_FORM_CALLBACK_INFO_SIGNATURE \
49 )
50
51 #pragma pack(1)
52
53 typedef struct _ISCSI_MAC_INFO {
54 EFI_MAC_ADDRESS Mac;
55 UINT8 Len;
56 } ISCSI_MAC_INFO;
57
58 typedef struct _ISCSI_DEVICE_LIST {
59 UINT8 NumDevice;
60 ISCSI_MAC_INFO MacInfo[1];
61 } ISCSI_DEVICE_LIST;
62
63 #pragma pack()
64
65 typedef struct _ISCSI_CONFIG_FORM_ENTRY {
66 NET_LIST_ENTRY Link;
67 EFI_HANDLE Controller;
68 CHAR16 MacString[95];
69 STRING_REF PortTitleToken;
70 STRING_REF PortTitleHelpToken;
71
72 ISCSI_SESSION_CONFIG_NVDATA SessionConfigData;
73 ISCSI_CHAP_AUTH_CONFIG_NVDATA AuthConfigData;
74 } ISCSI_CONFIG_FORM_ENTRY;
75
76 typedef struct _ISCSI_FORM_CALLBACK_INFO {
77 UINTN Signature;
78 EFI_HANDLE CallbackHandle;
79 EFI_FORM_CALLBACK_PROTOCOL FormCallback;
80 UINT16 *KeyList;
81 VOID *FormBuffer;
82 EFI_HII_HANDLE RegisteredHandle;
83 EFI_HII_PROTOCOL *Hii;
84 ISCSI_CONFIG_FORM_ENTRY *Current;
85 } ISCSI_FORM_CALLBACK_INFO;
86
87 EFI_STATUS
88 IScsiConfigUpdateForm (
89 IN EFI_HANDLE DriverBindingHandle,
90 IN EFI_HANDLE Controller,
91 IN BOOLEAN AddForm
92 );
93
94 EFI_STATUS
95 IScsiConfigFormInit (
96 IN EFI_HANDLE DriverBindingHandle
97 );
98
99 EFI_STATUS
100 IScsiConfigFormUnload (
101 IN EFI_HANDLE DriverBindingHandle
102 );
103
104 #endif