iPXE
EapConfiguration.h
Go to the documentation of this file.
1 /** @file
2  This file defines the EFI EAP Configuration protocol.
3 
4  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
5  SPDX-License-Identifier: BSD-2-Clause-Patent
6 
7  @par Revision Reference:
8  This Protocol is introduced in UEFI Specification 2.5
9 
10 **/
11 
12 #ifndef __EFI_EAP_CONFIGURATION_PROTOCOL_H__
13 #define __EFI_EAP_CONFIGURATION_PROTOCOL_H__
14 
15 FILE_LICENCE ( BSD2_PATENT );
16 
17 ///
18 /// EFI EAP Configuration protocol provides a way to set and get EAP configuration.
19 ///
20 #define EFI_EAP_CONFIGURATION_PROTOCOL_GUID \
21  { \
22  0xe5b58dbb, 0x7688, 0x44b4, {0x97, 0xbf, 0x5f, 0x1d, 0x4b, 0x7c, 0xc8, 0xdb } \
23  }
24 
26 
27 ///
28 /// Make sure it not conflict with any real EapTypeXXX
29 ///
30 #define EFI_EAP_TYPE_ATTRIBUTE 0
31 
32 typedef enum {
33  ///
34  /// EFI_EAP_TYPE_ATTRIBUTE
35  ///
38  ///
39  /// EapTypeIdentity
40  ///
42  ///
43  /// EapTypeEAPTLS/EapTypePEAP
44  ///
51  ///
52  /// EapTypeMSChapV2
53  ///
54  EfiEapConfigEapMSChapV2Password, // UNICODE format, Volatile
55  ///
56  /// EapTypePEAP
57  ///
59  ///
60  /// More...
61  ///
63 
64 ///
65 /// EFI_EAP_TYPE
66 ///
68 #define EFI_EAP_TYPE_ATTRIBUTE 0
69 #define EFI_EAP_TYPE_IDENTITY 1
70 #define EFI_EAP_TYPE_NOTIFICATION 2
71 #define EFI_EAP_TYPE_NAK 3
72 #define EFI_EAP_TYPE_MD5CHALLENGE 4
73 #define EFI_EAP_TYPE_OTP 5
74 #define EFI_EAP_TYPE_GTC 6
75 #define EFI_EAP_TYPE_EAPTLS 13
76 #define EFI_EAP_TYPE_EAPSIM 18
77 #define EFI_EAP_TYPE_TTLS 21
78 #define EFI_EAP_TYPE_PEAP 25
79 #define EFI_EAP_TYPE_MSCHAPV2 26
80 #define EFI_EAP_TYPE_EAP_EXTENSION 33
81 
82 /**
83  Set EAP configuration data.
84 
85  The SetData() function sets EAP configuration to non-volatile storage or volatile
86  storage.
87 
88  @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
89  @param[in] EapType EAP type.
90  @param[in] DataType Configuration data type.
91  @param[in] Data Pointer to configuration data.
92  @param[in] DataSize Total size of configuration data.
93 
94  @retval EFI_SUCCESS The EAP configuration data is set successfully.
95  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
96  Data is NULL.
97  DataSize is 0.
98  @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
99  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
100 **/
101 typedef
105  IN EFI_EAP_TYPE EapType,
106  IN EFI_EAP_CONFIG_DATA_TYPE DataType,
107  IN VOID *Data,
108  IN UINTN DataSize
109  );
110 
111 /**
112  Get EAP configuration data.
113 
114  The GetData() function gets EAP configuration.
115 
116  @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
117  @param[in] EapType EAP type.
118  @param[in] DataType Configuration data type.
119  @param[in, out] Data Pointer to configuration data.
120  @param[in, out] DataSize Total size of configuration data. On input, it means
121  the size of Data buffer. On output, it means the size
122  of copied Data buffer if EFI_SUCCESS, and means the
123  size of desired Data buffer if EFI_BUFFER_TOO_SMALL.
124 
125  @retval EFI_SUCCESS The EAP configuration data is got successfully.
126  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
127  Data is NULL.
128  DataSize is NULL.
129  @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
130  @retval EFI_NOT_FOUND The EAP configuration data is not found.
131  @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
132 **/
133 typedef
137  IN EFI_EAP_TYPE EapType,
138  IN EFI_EAP_CONFIG_DATA_TYPE DataType,
139  IN OUT VOID *Data,
140  IN OUT UINTN *DataSize
141  );
142 
143 ///
144 /// The EFI_EAP_CONFIGURATION_PROTOCOL
145 /// is designed to provide a way to set and get EAP configuration, such as Certificate,
146 /// private key file.
147 ///
151 };
152 
154 
155 #endif
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
EFI_EAP_TYPE_ATTRIBUTE.
FILE_LICENCE(BSD2_PATENT)
UINT8 EFI_EAP_TYPE
EFI_EAP_TYPE.
unsigned char UINT8
#define OUT
Definition: mlx_utils.h:29
#define EFIAPI
UINT64 UINTN
Unsigned value of native width.
#define VOID
Undeclared type.
Definition: Base.h:271
#define IN
Definition: mlx_utils.h:28
The EFI_EAP_CONFIGURATION_PROTOCOL is designed to provide a way to set and get EAP configuration,...
EFI_GUID gEfiEapConfigurationProtocolGuid
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_EAP_CONFIGURATION_GET_DATA GetData
EFI_STATUS(EFIAPI * EFI_EAP_CONFIGURATION_GET_DATA)(IN EFI_EAP_CONFIGURATION_PROTOCOL *This, IN EFI_EAP_TYPE EapType, IN EFI_EAP_CONFIG_DATA_TYPE DataType, IN OUT VOID *Data, IN OUT UINTN *DataSize)
Get EAP configuration data.
EapTypeEAPTLS/EapTypePEAP.
EFI_STATUS(EFIAPI * EFI_EAP_CONFIGURATION_SET_DATA)(IN EFI_EAP_CONFIGURATION_PROTOCOL *This, IN EFI_EAP_TYPE EapType, IN EFI_EAP_CONFIG_DATA_TYPE DataType, IN VOID *Data, IN UINTN DataSize)
Set EAP configuration data.
EFI_EAP_CONFIGURATION_SET_DATA SetData
EFI_EAP_CONFIG_DATA_TYPE