]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/EapConfiguration.h
MdePkg: Add definition for new warning code EFI_WARN_FILE_SYSTEM.
[mirror_edk2.git] / MdePkg / Include / Protocol / EapConfiguration.h
CommitLineData
d3dc58e9
HW
1/** @file\r
2 This file defines the EFI EAP Configuration protocol.\r
3\r
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 @par Revision Reference:\r
14 This Protocol is introduced in UEFI Specification 2.5\r
15\r
16**/\r
17\r
18#ifndef __EFI_EAP_CONFIGURATION_PROTOCOL_H__\r
19#define __EFI_EAP_CONFIGURATION_PROTOCOL_H__\r
20\r
21///\r
22/// EFI EAP Configuration protocol provides a way to set and get EAP configuration.\r
23///\r
24#define EFI_EAP_CONFIGURATION_PROTOCOL_GUID \\r
25 { \\r
26 0xe5b58dbb, 0x7688, 0x44b4, {0x97, 0xbf, 0x5f, 0x1d, 0x4b, 0x7c, 0xc8, 0xdb } \\r
27 }\r
28\r
29typedef struct _EFI_EAP_CONFIGURATION_PROTOCOL EFI_EAP_CONFIGURATION_PROTOCOL;\r
30\r
31///\r
32/// Make sure it not conflict with any real EapTypeXXX\r
33///\r
34#define EFI_EAP_TYPE_ATTRIBUTE 0\r
35\r
36typedef enum {\r
37 ///\r
38 /// EFI_EAP_TYPE_ATTRIBUTE\r
39 ///\r
40 EfiEapConfigEapAuthMethod,\r
41 EfiEapConfigEapSupportedAuthMethod,\r
42 ///\r
43 /// EapTypeIdentity\r
44 ///\r
45 EfiEapConfigIdentityString,\r
46 ///\r
47 /// EapTypeEAPTLS/EapTypePEAP\r
48 ///\r
49 EfiEapConfigEapTlsCACert,\r
50 EfiEapConfigEapTlsClientCert,\r
51 EfiEapConfigEapTlsClientPrivateKeyFile,\r
52 EfiEapConfigEapTlsClientPrivateKeyFilePassword, // ASCII format, Volatile\r
53 EfiEapConfigEapTlsCipherSuite,\r
54 EfiEapConfigEapTlsSupportedCipherSuite,\r
55 ///\r
56 /// EapTypeMSChapV2\r
57 ///\r
58 EfiEapConfigEapMSChapV2Password, // UNICODE format, Volatile\r
59 ///\r
60 /// EapTypePEAP\r
61 ///\r
62 EfiEapConfigEap2ndAuthMethod,\r
63 ///\r
64 /// More...\r
65 ///\r
66} EFI_EAP_CONFIG_DATA_TYPE;\r
67\r
68///\r
69/// EFI_EAP_TYPE\r
70///\r
71typedef UINT8 EFI_EAP_TYPE;\r
72#define EFI_EAP_TYPE_ATTRIBUTE 0\r
73#define EFI_EAP_TYPE_IDENTITY 1\r
74#define EFI_EAP_TYPE_NOTIFICATION 2\r
75#define EFI_EAP_TYPE_NAK 3\r
76#define EFI_EAP_TYPE_MD5CHALLENGE 4\r
77#define EFI_EAP_TYPE_OTP 5\r
78#define EFI_EAP_TYPE_GTC 6\r
79#define EFI_EAP_TYPE_EAPTLS 13\r
80#define EFI_EAP_TYPE_EAPSIM 18\r
81#define EFI_EAP_TYPE_TTLS 21\r
82#define EFI_EAP_TYPE_PEAP 25\r
83#define EFI_EAP_TYPE_MSCHAPV2 26\r
84#define EFI_EAP_TYPE_EAP_EXTENSION 33\r
85\r
86/**\r
87 Set EAP configuration data.\r
88\r
89 The SetData() function sets EAP configuration to non-volatile storage or volatile\r
90 storage.\r
91\r
92 @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.\r
93 @param[in] EapType EAP type.\r
94 @param[in] DataType Configuration data type.\r
95 @param[in] Data Pointer to configuration data.\r
96 @param[in] DataSize Total size of configuration data.\r
97\r
98 @retval EFI_SUCCESS The EAP configuration data is set successfully.\r
99 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
100 Data is NULL.\r
101 DataSize is 0.\r
102 @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.\r
103 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
104**/\r
105typedef\r
106EFI_STATUS\r
107(EFIAPI *EFI_EAP_CONFIGURATION_SET_DATA) (\r
108 IN EFI_EAP_CONFIGURATION_PROTOCOL *This,\r
109 IN EFI_EAP_TYPE EapType,\r
110 IN EFI_EAP_CONFIG_DATA_TYPE DataType,\r
111 IN VOID *Data,\r
112 IN UINTN DataSize\r
113 );\r
114\r
115/**\r
116 Get EAP configuration data.\r
117\r
118 The GetData() function gets EAP configuration.\r
119\r
120 @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.\r
121 @param[in] EapType EAP type.\r
122 @param[in] DataType Configuration data type.\r
123 @param[in, out] Data Pointer to configuration data.\r
124 @param[in, out] DataSize Total size of configuration data. On input, it means\r
125 the size of Data buffer. On output, it means the size\r
126 of copied Data buffer if EFI_SUCCESS, and means the\r
127 size of desired Data buffer if EFI_BUFFER_TOO_SMALL.\r
128\r
129 @retval EFI_SUCCESS The EAP configuration data is got successfully.\r
130 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
131 Data is NULL.\r
132 DataSize is NULL.\r
133 @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.\r
134 @retval EFI_NOT_FOUND The EAP configuration data is not found.\r
135 @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.\r
136**/\r
137typedef\r
138EFI_STATUS\r
139(EFIAPI *EFI_EAP_CONFIGURATION_GET_DATA) (\r
140 IN EFI_EAP_CONFIGURATION_PROTOCOL *This,\r
141 IN EFI_EAP_TYPE EapType,\r
142 IN EFI_EAP_CONFIG_DATA_TYPE DataType,\r
143 IN OUT VOID *Data,\r
144 IN OUT UINTN *DataSize\r
145 );\r
146\r
147///\r
148/// The EFI_EAP_CONFIGURATION_PROTOCOL\r
149/// is designed to provide a way to set and get EAP configuration, such as Certificate,\r
150/// private key file.\r
151///\r
152struct _EFI_EAP_CONFIGURATION_PROTOCOL {\r
153 EFI_EAP_CONFIGURATION_SET_DATA SetData;\r
154 EFI_EAP_CONFIGURATION_GET_DATA GetData;\r
155};\r
156\r
157extern EFI_GUID gEfiEapConfigurationProtocolGuid;\r
158\r
159#endif