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 FILE_SECBOOT ( PERMITTED );
17 
18 ///
19 /// EFI EAP Configuration protocol provides a way to set and get EAP configuration.
20 ///
21 #define EFI_EAP_CONFIGURATION_PROTOCOL_GUID \
22  { \
23  0xe5b58dbb, 0x7688, 0x44b4, {0x97, 0xbf, 0x5f, 0x1d, 0x4b, 0x7c, 0xc8, 0xdb } \
24  }
25 
27 
28 ///
29 /// Make sure it not conflict with any real EapTypeXXX
30 ///
31 #define EFI_EAP_TYPE_ATTRIBUTE 0
32 
33 typedef enum {
34  ///
35  /// EFI_EAP_TYPE_ATTRIBUTE
36  ///
39  ///
40  /// EapTypeIdentity
41  ///
43  ///
44  /// EapTypeEAPTLS/EapTypePEAP
45  ///
52  ///
53  /// EapTypeMSChapV2
54  ///
55  EfiEapConfigEapMSChapV2Password, // UNICODE format, Volatile
56  ///
57  /// EapTypePEAP
58  ///
60  ///
61  /// More...
62  ///
64 
65 ///
66 /// EFI_EAP_TYPE
67 ///
69 #define EFI_EAP_TYPE_ATTRIBUTE 0
70 #define EFI_EAP_TYPE_IDENTITY 1
71 #define EFI_EAP_TYPE_NOTIFICATION 2
72 #define EFI_EAP_TYPE_NAK 3
73 #define EFI_EAP_TYPE_MD5CHALLENGE 4
74 #define EFI_EAP_TYPE_OTP 5
75 #define EFI_EAP_TYPE_GTC 6
76 #define EFI_EAP_TYPE_EAPTLS 13
77 #define EFI_EAP_TYPE_EAPSIM 18
78 #define EFI_EAP_TYPE_TTLS 21
79 #define EFI_EAP_TYPE_PEAP 25
80 #define EFI_EAP_TYPE_MSCHAPV2 26
81 #define EFI_EAP_TYPE_EAP_EXTENSION 33
82 
83 /**
84  Set EAP configuration data.
85 
86  The SetData() function sets EAP configuration to non-volatile storage or volatile
87  storage.
88 
89  @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
90  @param[in] EapType EAP type.
91  @param[in] DataType Configuration data type.
92  @param[in] Data Pointer to configuration data.
93  @param[in] DataSize Total size of configuration data.
94 
95  @retval EFI_SUCCESS The EAP configuration data is set successfully.
96  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
97  Data is NULL.
98  DataSize is 0.
99  @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
100  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
101 **/
102 typedef
106  IN EFI_EAP_TYPE EapType,
107  IN EFI_EAP_CONFIG_DATA_TYPE DataType,
108  IN VOID *Data,
109  IN UINTN DataSize
110  );
111 
112 /**
113  Get EAP configuration data.
114 
115  The GetData() function gets EAP configuration.
116 
117  @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
118  @param[in] EapType EAP type.
119  @param[in] DataType Configuration data type.
120  @param[in, out] Data Pointer to configuration data.
121  @param[in, out] DataSize Total size of configuration data. On input, it means
122  the size of Data buffer. On output, it means the size
123  of copied Data buffer if EFI_SUCCESS, and means the
124  size of desired Data buffer if EFI_BUFFER_TOO_SMALL.
125 
126  @retval EFI_SUCCESS The EAP configuration data is got successfully.
127  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
128  Data is NULL.
129  DataSize is NULL.
130  @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
131  @retval EFI_NOT_FOUND The EAP configuration data is not found.
132  @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
133 **/
134 typedef
138  IN EFI_EAP_TYPE EapType,
139  IN EFI_EAP_CONFIG_DATA_TYPE DataType,
140  IN OUT VOID *Data,
141  IN OUT UINTN *DataSize
142  );
143 
144 ///
145 /// The EFI_EAP_CONFIGURATION_PROTOCOL
146 /// is designed to provide a way to set and get EAP configuration, such as Certificate,
147 /// private key file.
148 ///
152 };
153 
155 
156 #endif
128 bit buffer containing a unique identifier value.
Definition: Base.h:216
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:272
#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:32
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
FILE_SECBOOT(PERMITTED)
EFI_EAP_CONFIG_DATA_TYPE