]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Protocol/EapManagement.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / Protocol / EapManagement.h
... / ...
CommitLineData
1/** @file\r
2 EFI EAP Management Protocol Definition\r
3 The EFI EAP Management Protocol is designed to provide ease of management and\r
4 ease of test for EAPOL state machine. It is intended for the supplicant side.\r
5 It conforms to IEEE 802.1x specification.\r
6 The definitions in this file are defined in UEFI Specification 2.2, which have\r
7 not been verified by one implementation yet.\r
8\r
9 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
10 SPDX-License-Identifier: BSD-2-Clause-Patent\r
11\r
12 @par Revision Reference:\r
13 This Protocol is introduced in UEFI Specification 2.2\r
14\r
15**/\r
16\r
17#ifndef __EFI_EAP_MANAGEMENT_PROTOCOL_H__\r
18#define __EFI_EAP_MANAGEMENT_PROTOCOL_H__\r
19\r
20#include <Protocol/Eap.h>\r
21\r
22#define EFI_EAP_MANAGEMENT_PROTOCOL_GUID \\r
23 { \\r
24 0xbb62e663, 0x625d, 0x40b2, {0xa0, 0x88, 0xbb, 0xe8, 0x36, 0x23, 0xa2, 0x45 } \\r
25 }\r
26\r
27typedef struct _EFI_EAP_MANAGEMENT_PROTOCOL EFI_EAP_MANAGEMENT_PROTOCOL;\r
28\r
29///\r
30/// PAE Capabilities\r
31///\r
32///@{\r
33#define PAE_SUPPORT_AUTHENTICATOR 0x01\r
34#define PAE_SUPPORT_SUPPLICANT 0x02\r
35///@}\r
36\r
37///\r
38/// EFI_EAPOL_PORT_INFO\r
39///\r
40typedef struct _EFI_EAPOL_PORT_INFO {\r
41 ///\r
42 /// The identification number assigned to the Port by the System in\r
43 /// which the Port resides.\r
44 ///\r
45 EFI_PORT_HANDLE PortNumber;\r
46 ///\r
47 /// The protocol version number of the EAPOL implementation\r
48 /// supported by the Port.\r
49 ///\r
50 UINT8 ProtocolVersion;\r
51 ///\r
52 /// The capabilities of the PAE associated with the Port. This field\r
53 /// indicates whether Authenticator functionality, Supplicant\r
54 /// functionality, both, or neither, is supported by the Port's PAE.\r
55 ///\r
56 UINT8 PaeCapabilities;\r
57} EFI_EAPOL_PORT_INFO;\r
58\r
59///\r
60/// Supplicant PAE state machine (IEEE Std 802.1X Section 8.5.10)\r
61///\r
62typedef enum _EFI_EAPOL_SUPPLICANT_PAE_STATE {\r
63 Logoff,\r
64 Disconnected,\r
65 Connecting,\r
66 Acquired,\r
67 Authenticating,\r
68 Held,\r
69 Authenticated,\r
70 MaxSupplicantPaeState\r
71} EFI_EAPOL_SUPPLICANT_PAE_STATE;\r
72\r
73///\r
74/// Definitions for ValidFieldMask\r
75///\r
76///@{\r
77#define AUTH_PERIOD_FIELD_VALID 0x01\r
78#define HELD_PERIOD_FIELD_VALID 0x02\r
79#define START_PERIOD_FIELD_VALID 0x04\r
80#define MAX_START_FIELD_VALID 0x08\r
81///@}\r
82\r
83///\r
84/// EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION\r
85///\r
86typedef struct _EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION {\r
87 ///\r
88 /// Indicates which of the following fields are valid.\r
89 ///\r
90 UINT8 ValidFieldMask;\r
91 ///\r
92 /// The initial value for the authWhile timer. Its default value is 30s.\r
93 ///\r
94 UINTN AuthPeriod;\r
95 ///\r
96 /// The initial value for the heldWhile timer. Its default value is 60s.\r
97 ///\r
98 UINTN HeldPeriod;\r
99 ///\r
100 /// The initial value for the startWhen timer. Its default value is 30s.\r
101 ///\r
102 UINTN StartPeriod;\r
103 ///\r
104 /// The maximum number of successive EAPOL-Start messages will\r
105 /// be sent before the Supplicant assumes that there is no\r
106 /// Authenticator present. Its default value is 3.\r
107 ///\r
108 UINTN MaxStart;\r
109} EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION;\r
110\r
111///\r
112/// Supplicant Statistics (IEEE Std 802.1X Section 9.5.2)\r
113///\r
114typedef struct _EFI_EAPOL_SUPPLICANT_PAE_STATISTICS {\r
115 ///\r
116 /// The number of EAPOL frames of any type that have been received by this Supplican.\r
117 ///\r
118 UINTN EapolFramesReceived;\r
119 ///\r
120 /// The number of EAPOL frames of any type that have been transmitted by this Supplicant.\r
121 ///\r
122 UINTN EapolFramesTransmitted;\r
123 ///\r
124 /// The number of EAPOL Start frames that have been transmitted by this Supplicant.\r
125 ///\r
126 UINTN EapolStartFramesTransmitted;\r
127 ///\r
128 /// The number of EAPOL Logoff frames that have been transmitted by this Supplicant.\r
129 ///\r
130 UINTN EapolLogoffFramesTransmitted;\r
131 ///\r
132 /// The number of EAP Resp/Id frames that have been transmitted by this Supplicant.\r
133 ///\r
134 UINTN EapRespIdFramesTransmitted;\r
135 ///\r
136 /// The number of valid EAP Response frames (other than Resp/Id frames) that have been\r
137 /// transmitted by this Supplicant.\r
138 ///\r
139 UINTN EapResponseFramesTransmitted;\r
140 ///\r
141 /// The number of EAP Req/Id frames that have been received by this Supplicant.\r
142 ///\r
143 UINTN EapReqIdFramesReceived;\r
144 ///\r
145 /// The number of EAP Request frames (other than Rq/Id frames) that have been received\r
146 /// by this Supplicant.\r
147 ///\r
148 UINTN EapRequestFramesReceived;\r
149 ///\r
150 /// The number of EAPOL frames that have been received by this Supplicant in which the\r
151 /// frame type is not recognized.\r
152 ///\r
153 UINTN InvalidEapolFramesReceived;\r
154 ///\r
155 /// The number of EAPOL frames that have been received by this Supplicant in which the\r
156 /// Packet Body Length field (7.5.5) is invalid.\r
157 ///\r
158 UINTN EapLengthErrorFramesReceived;\r
159 ///\r
160 /// The protocol version number carried in the most recently received EAPOL frame.\r
161 ///\r
162 UINTN LastEapolFrameVersion;\r
163 ///\r
164 /// The source MAC address carried in the most recently received EAPOL frame.\r
165 ///\r
166 UINTN LastEapolFrameSource;\r
167} EFI_EAPOL_SUPPLICANT_PAE_STATISTICS;\r
168\r
169/**\r
170 Read the system configuration information associated with the Port.\r
171\r
172 The GetSystemConfiguration() function reads the system configuration\r
173 information associated with the Port, including the value of the\r
174 SystemAuthControl parameter of the System is returned in SystemAuthControl\r
175 and the Port's information is returned in the buffer pointed to by PortInfo.\r
176 The Port's information is optional.\r
177 If PortInfo is NULL, then reading the Port's information is ignored.\r
178\r
179 If SystemAuthControl is NULL, then EFI_INVALID_PARAMETER is returned.\r
180\r
181 @param[in] This A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
182 instance that indicates the calling context.\r
183 @param[out] SystemAuthControl Returns the value of the SystemAuthControl\r
184 parameter of the System.\r
185 TRUE means Enabled. FALSE means Disabled.\r
186 @param[out] PortInfo Returns EFI_EAPOL_PORT_INFO structure to describe\r
187 the Port's information. This parameter can be NULL\r
188 to ignore reading the Port's information.\r
189\r
190 @retval EFI_SUCCESS The system configuration information of the\r
191 Port is read successfully.\r
192 @retval EFI_INVALID_PARAMETER SystemAuthControl is NULL.\r
193\r
194\r
195**/\r
196typedef\r
197EFI_STATUS\r
198(EFIAPI *EFI_EAP_GET_SYSTEM_CONFIGURATION)(\r
199 IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r
200 OUT BOOLEAN *SystemAuthControl,\r
201 OUT EFI_EAPOL_PORT_INFO *PortInfo OPTIONAL\r
202 );\r
203\r
204/**\r
205 Set the system configuration information associated with the Port.\r
206\r
207 The SetSystemConfiguration() function sets the value of the SystemAuthControl\r
208 parameter of the System to SystemAuthControl.\r
209\r
210 @param[in] This A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
211 instance that indicates the calling context.\r
212 @param[in] SystemAuthControl The desired value of the SystemAuthControl\r
213 parameter of the System.\r
214 TRUE means Enabled. FALSE means Disabled.\r
215\r
216 @retval EFI_SUCCESS The system configuration information of the\r
217 Port is set successfully.\r
218\r
219**/\r
220typedef\r
221EFI_STATUS\r
222(EFIAPI *EFI_EAP_SET_SYSTEM_CONFIGURATION)(\r
223 IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r
224 IN BOOLEAN SystemAuthControl\r
225 );\r
226\r
227/**\r
228 Cause the EAPOL state machines for the Port to be initialized.\r
229\r
230 The InitializePort() function causes the EAPOL state machines for the Port.\r
231\r
232 @param[in] This A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
233 instance that indicates the calling context.\r
234\r
235 @retval EFI_SUCCESS The Port is initialized successfully.\r
236\r
237**/\r
238typedef\r
239EFI_STATUS\r
240(EFIAPI *EFI_EAP_INITIALIZE_PORT)(\r
241 IN EFI_EAP_MANAGEMENT_PROTOCOL *This\r
242 );\r
243\r
244/**\r
245 Notify the EAPOL state machines for the Port that the user of the System has\r
246 logged on.\r
247\r
248 The UserLogon() function notifies the EAPOL state machines for the Port.\r
249\r
250 @param[in] This A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
251 instance that indicates the calling context.\r
252\r
253 @retval EFI_SUCCESS The Port is notified successfully.\r
254\r
255**/\r
256typedef\r
257EFI_STATUS\r
258(EFIAPI *EFI_EAP_USER_LOGON)(\r
259 IN EFI_EAP_MANAGEMENT_PROTOCOL *This\r
260 );\r
261\r
262/**\r
263 Notify the EAPOL state machines for the Port that the user of the System has\r
264 logged off.\r
265\r
266 The UserLogoff() function notifies the EAPOL state machines for the Port.\r
267\r
268 @param[in] This A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
269 instance that indicates the calling context.\r
270\r
271 @retval EFI_SUCCESS The Port is notified successfully.\r
272\r
273**/\r
274typedef\r
275EFI_STATUS\r
276(EFIAPI *EFI_EAP_USER_LOGOFF)(\r
277 IN EFI_EAP_MANAGEMENT_PROTOCOL *This\r
278 );\r
279\r
280/**\r
281 Read the status of the Supplicant PAE state machine for the Port, including the\r
282 current state and the configuration of the operational parameters.\r
283\r
284 The GetSupplicantStatus() function reads the status of the Supplicant PAE state\r
285 machine for the Port, including the current state CurrentState and the configuration\r
286 of the operational parameters Configuration. The configuration of the operational\r
287 parameters is optional. If Configuration is NULL, then reading the configuration\r
288 is ignored. The operational parameters in Configuration to be read can also be\r
289 specified by Configuration.ValidFieldMask.\r
290\r
291 If CurrentState is NULL, then EFI_INVALID_PARAMETER is returned.\r
292\r
293 @param[in] This A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
294 instance that indicates the calling context.\r
295 @param[out] CurrentState Returns the current state of the Supplicant PAE\r
296 state machine for the Port.\r
297 @param[in, out] Configuration Returns the configuration of the operational\r
298 parameters of the Supplicant PAE state machine\r
299 for the Port as required. This parameter can be\r
300 NULL to ignore reading the configuration.\r
301 On input, Configuration.ValidFieldMask specifies the\r
302 operational parameters to be read.\r
303 On output, Configuration returns the configuration\r
304 of the required operational parameters.\r
305\r
306 @retval EFI_SUCCESS The configuration of the operational parameter\r
307 of the Supplicant PAE state machine for the Port\r
308 is set successfully.\r
309 @retval EFI_INVALID_PARAMETER CurrentState is NULL.\r
310\r
311**/\r
312typedef\r
313EFI_STATUS\r
314(EFIAPI *EFI_EAP_GET_SUPPLICANT_STATUS)(\r
315 IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r
316 OUT EFI_EAPOL_SUPPLICANT_PAE_STATE *CurrentState,\r
317 IN OUT EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION *Configuration OPTIONAL\r
318 );\r
319\r
320/**\r
321 Set the configuration of the operational parameter of the Supplicant PAE\r
322 state machine for the Port.\r
323\r
324 The SetSupplicantConfiguration() function sets the configuration of the\r
325 operational Parameter of the Supplicant PAE state machine for the Port to\r
326 Configuration. The operational parameters in Configuration to be set can be\r
327 specified by Configuration.ValidFieldMask.\r
328\r
329 If Configuration is NULL, then EFI_INVALID_PARAMETER is returned.\r
330\r
331 @param[in] This A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
332 instance that indicates the calling context.\r
333 @param[in] Configuration The desired configuration of the operational\r
334 parameters of the Supplicant PAE state machine\r
335 for the Port as required.\r
336\r
337 @retval EFI_SUCCESS The configuration of the operational parameter\r
338 of the Supplicant PAE state machine for the Port\r
339 is set successfully.\r
340 @retval EFI_INVALID_PARAMETER Configuration is NULL.\r
341\r
342**/\r
343typedef\r
344EFI_STATUS\r
345(EFIAPI *EFI_EAP_SET_SUPPLICANT_CONFIGURATION)(\r
346 IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r
347 IN EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION *Configuration\r
348 );\r
349\r
350/**\r
351 Read the statistical information regarding the operation of the Supplicant\r
352 associated with the Port.\r
353\r
354 The GetSupplicantStatistics() function reads the statistical information\r
355 Statistics regarding the operation of the Supplicant associated with the Port.\r
356\r
357 If Statistics is NULL, then EFI_INVALID_PARAMETER is returned.\r
358\r
359 @param[in] This A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
360 instance that indicates the calling context.\r
361 @param[out] Statistics Returns the statistical information regarding the\r
362 operation of the Supplicant for the Port.\r
363\r
364 @retval EFI_SUCCESS The statistical information regarding the operation\r
365 of the Supplicant for the Port is read successfully.\r
366 @retval EFI_INVALID_PARAMETER Statistics is NULL.\r
367\r
368**/\r
369typedef\r
370EFI_STATUS\r
371(EFIAPI *EFI_EAP_GET_SUPPLICANT_STATISTICS)(\r
372 IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r
373 OUT EFI_EAPOL_SUPPLICANT_PAE_STATISTICS *Statistics\r
374 );\r
375\r
376///\r
377/// EFI_EAP_MANAGEMENT_PROTOCOL\r
378/// is used to control, configure and monitor EAPOL state machine on\r
379/// a Port. EAPOL state machine is built on a per-Port basis. Herein,\r
380/// a Port means a NIC. For the details of EAPOL, please refer to\r
381/// IEEE 802.1x specification.\r
382///\r
383struct _EFI_EAP_MANAGEMENT_PROTOCOL {\r
384 EFI_EAP_GET_SYSTEM_CONFIGURATION GetSystemConfiguration;\r
385 EFI_EAP_SET_SYSTEM_CONFIGURATION SetSystemConfiguration;\r
386 EFI_EAP_INITIALIZE_PORT InitializePort;\r
387 EFI_EAP_USER_LOGON UserLogon;\r
388 EFI_EAP_USER_LOGOFF UserLogoff;\r
389 EFI_EAP_GET_SUPPLICANT_STATUS GetSupplicantStatus;\r
390 EFI_EAP_SET_SUPPLICANT_CONFIGURATION SetSupplicantConfiguration;\r
391 EFI_EAP_GET_SUPPLICANT_STATISTICS GetSupplicantStatistics;\r
392};\r
393\r
394extern EFI_GUID gEfiEapManagementProtocolGuid;\r
395\r
396#endif\r