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