]>
Commit | Line | Data |
---|---|---|
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 |
9344f092 | 10 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
badd7e61 | 11 | \r |
9095d37b | 12 | @par Revision Reference:\r |
5899caf0 | 13 | This Protocol is introduced in UEFI Specification 2.2\r |
14 | \r | |
badd7e61 | 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 | |
27 | typedef 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 | |
9095d37b LG |
40 | typedef struct _EFI_EAPOL_PORT_INFO {\r |
41 | ///\r | |
42 | /// The identification number assigned to the Port by the System in\r | |
badd7e61 | 43 | /// which the Port resides.\r |
9095d37b | 44 | ///\r |
badd7e61 | 45 | EFI_PORT_HANDLE PortNumber;\r |
9095d37b LG |
46 | ///\r |
47 | /// The protocol version number of the EAPOL implementation\r | |
48 | /// supported by the Port.\r | |
49 | ///\r | |
badd7e61 | 50 | UINT8 ProtocolVersion;\r |
9095d37b LG |
51 | ///\r |
52 | /// The capabilities of the PAE associated with the Port. This field\r | |
53 | /// indicates whether Authenticator functionality, Supplicant\r | |
badd7e61 | 54 | /// functionality, both, or neither, is supported by the Port's PAE.\r |
9095d37b | 55 | ///\r |
badd7e61 | 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 | |
62 | typedef 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 | |
9095d37b | 74 | /// Definitions for ValidFieldMask\r |
badd7e61 | 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 | |
86 | typedef struct _EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION {\r | |
9095d37b | 87 | ///\r |
badd7e61 | 88 | /// Indicates which of the following fields are valid.\r |
9095d37b LG |
89 | ///\r |
90 | UINT8 ValidFieldMask;\r | |
badd7e61 | 91 | ///\r |
92 | /// The initial value for the authWhile timer. Its default value is 30s.\r | |
93 | ///\r | |
9095d37b LG |
94 | UINTN AuthPeriod;\r |
95 | ///\r | |
96 | /// The initial value for the heldWhile timer. Its default value is 60s.\r | |
badd7e61 | 97 | ///\r |
9095d37b | 98 | UINTN HeldPeriod;\r |
badd7e61 | 99 | ///\r |
9095d37b | 100 | /// The initial value for the startWhen timer. Its default value is 30s.\r |
badd7e61 | 101 | ///\r |
9095d37b | 102 | UINTN StartPeriod;\r |
badd7e61 | 103 | ///\r |
9095d37b LG |
104 | /// The maximum number of successive EAPOL-Start messages will\r |
105 | /// be sent before the Supplicant assumes that there is no\r | |
badd7e61 | 106 | /// Authenticator present. Its default value is 3.\r |
9095d37b | 107 | ///\r |
badd7e61 | 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 | |
114 | typedef 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 | |
9095d37b | 117 | ///\r |
badd7e61 | 118 | UINTN EapolFramesReceived;\r |
119 | ///\r | |
9095d37b | 120 | /// The number of EAPOL frames of any type that have been transmitted by this Supplicant.\r |
badd7e61 | 121 | ///\r |
122 | UINTN EapolFramesTransmitted;\r | |
9095d37b LG |
123 | ///\r |
124 | /// The number of EAPOL Start frames that have been transmitted by this Supplicant.\r | |
125 | ///\r | |
badd7e61 | 126 | UINTN EapolStartFramesTransmitted;\r |
9095d37b | 127 | ///\r |
badd7e61 | 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 | |
9095d37b LG |
135 | ///\r |
136 | /// The number of valid EAP Response frames (other than Resp/Id frames) that have been\r | |
badd7e61 | 137 | /// transmitted by this Supplicant.\r |
138 | ///\r | |
139 | UINTN EapResponseFramesTransmitted;\r | |
9095d37b | 140 | ///\r |
badd7e61 | 141 | /// The number of EAP Req/Id frames that have been received by this Supplicant.\r |
9095d37b | 142 | ///\r |
badd7e61 | 143 | UINTN EapReqIdFramesReceived;\r |
144 | ///\r | |
9095d37b | 145 | /// The number of EAP Request frames (other than Rq/Id frames) that have been received\r |
badd7e61 | 146 | /// by this Supplicant.\r |
147 | ///\r | |
148 | UINTN EapRequestFramesReceived;\r | |
149 | ///\r | |
9095d37b | 150 | /// The number of EAPOL frames that have been received by this Supplicant in which the\r |
badd7e61 | 151 | /// frame type is not recognized.\r |
152 | ///\r | |
153 | UINTN InvalidEapolFramesReceived;\r | |
9095d37b LG |
154 | ///\r |
155 | /// The number of EAPOL frames that have been received by this Supplicant in which the\r | |
badd7e61 | 156 | /// Packet Body Length field (7.5.5) is invalid.\r |
9095d37b | 157 | ///\r |
badd7e61 | 158 | UINTN EapLengthErrorFramesReceived;\r |
9095d37b | 159 | ///\r |
badd7e61 | 160 | /// The protocol version number carried in the most recently received EAPOL frame.\r |
9095d37b | 161 | ///\r |
badd7e61 | 162 | UINTN LastEapolFrameVersion;\r |
9095d37b | 163 | ///\r |
badd7e61 | 164 | /// The source MAC address carried in the most recently received EAPOL frame.\r |
9095d37b | 165 | ///\r |
badd7e61 | 166 | UINTN LastEapolFrameSource;\r |
167 | } EFI_EAPOL_SUPPLICANT_PAE_STATISTICS;\r | |
168 | \r | |
169 | /**\r | |
9095d37b | 170 | Read the system configuration information associated with the Port.\r |
badd7e61 | 171 | \r |
172 | The GetSystemConfiguration() function reads the system configuration\r | |
9095d37b | 173 | information associated with the Port, including the value of the\r |
badd7e61 | 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 | |
9095d37b | 176 | The Port's information is optional.\r |
badd7e61 | 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 | |
9095d37b | 184 | parameter of the System.\r |
badd7e61 | 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 | |
196 | typedef\r | |
197 | EFI_STATUS\r | |
198 | (EFIAPI *EFI_EAP_GET_SYSTEM_CONFIGURATION)(\r | |
9095d37b LG |
199 | IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r |
200 | OUT BOOLEAN *SystemAuthControl,\r | |
badd7e61 | 201 | OUT EFI_EAPOL_PORT_INFO *PortInfo OPTIONAL\r |
202 | );\r | |
203 | \r | |
204 | /**\r | |
9095d37b | 205 | Set the system configuration information associated with the Port.\r |
badd7e61 | 206 | \r |
9095d37b | 207 | The SetSystemConfiguration() function sets the value of the SystemAuthControl\r |
badd7e61 | 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 | |
9095d37b LG |
212 | @param[in] SystemAuthControl The desired value of the SystemAuthControl\r |
213 | parameter of the System.\r | |
badd7e61 | 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 | |
220 | typedef\r | |
221 | EFI_STATUS\r | |
222 | (EFIAPI *EFI_EAP_SET_SYSTEM_CONFIGURATION)(\r | |
9095d37b | 223 | IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r |
badd7e61 | 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 | |
238 | typedef\r | |
239 | EFI_STATUS\r | |
240 | (EFIAPI *EFI_EAP_INITIALIZE_PORT)(\r | |
ea6898b9 | 241 | IN EFI_EAP_MANAGEMENT_PROTOCOL *This\r |
badd7e61 | 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 | |
256 | typedef\r | |
257 | EFI_STATUS\r | |
258 | (EFIAPI *EFI_EAP_USER_LOGON)(\r | |
ea6898b9 | 259 | IN EFI_EAP_MANAGEMENT_PROTOCOL *This\r |
badd7e61 | 260 | );\r |
261 | \r | |
262 | /**\r | |
9095d37b | 263 | Notify the EAPOL state machines for the Port that the user of the System has\r |
badd7e61 | 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 | |
274 | typedef\r | |
275 | EFI_STATUS\r | |
276 | (EFIAPI *EFI_EAP_USER_LOGOFF)(\r | |
ea6898b9 | 277 | IN EFI_EAP_MANAGEMENT_PROTOCOL *This\r |
badd7e61 | 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 | |
9095d37b LG |
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 | |
badd7e61 | 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 | |
9095d37b LG |
300 | NULL to ignore reading the configuration.\r |
301 | On input, Configuration.ValidFieldMask specifies the\r | |
badd7e61 | 302 | operational parameters to be read.\r |
303 | On output, Configuration returns the configuration\r | |
9095d37b | 304 | of the required operational parameters.\r |
badd7e61 | 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 | |
312 | typedef\r | |
313 | EFI_STATUS\r | |
314 | (EFIAPI *EFI_EAP_GET_SUPPLICANT_STATUS)(\r | |
9095d37b LG |
315 | IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r |
316 | OUT EFI_EAPOL_SUPPLICANT_PAE_STATE *CurrentState,\r | |
badd7e61 | 317 | IN OUT EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION *Configuration OPTIONAL\r |
318 | );\r | |
319 | \r | |
320 | /**\r | |
9095d37b | 321 | Set the configuration of the operational parameter of the Supplicant PAE\r |
badd7e61 | 322 | state machine for the Port.\r |
323 | \r | |
9095d37b | 324 | The SetSupplicantConfiguration() function sets the configuration of the\r |
badd7e61 | 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 | |
9095d37b | 333 | @param[in] Configuration The desired configuration of the operational\r |
badd7e61 | 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 | |
343 | typedef\r | |
344 | EFI_STATUS\r | |
345 | (EFIAPI *EFI_EAP_SET_SUPPLICANT_CONFIGURATION)(\r | |
9095d37b | 346 | IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r |
badd7e61 | 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 | |
9095d37b | 352 | associated with the Port.\r |
badd7e61 | 353 | \r |
9095d37b | 354 | The GetSupplicantStatistics() function reads the statistical information\r |
badd7e61 | 355 | Statistics regarding the operation of the Supplicant associated with the Port.\r |
9095d37b | 356 | \r |
badd7e61 | 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 | |
9095d37b LG |
361 | @param[out] Statistics Returns the statistical information regarding the\r |
362 | operation of the Supplicant for the Port.\r | |
badd7e61 | 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 | |
369 | typedef\r | |
370 | EFI_STATUS\r | |
371 | (EFIAPI *EFI_EAP_GET_SUPPLICANT_STATISTICS)(\r | |
9095d37b | 372 | IN EFI_EAP_MANAGEMENT_PROTOCOL *This,\r |
badd7e61 | 373 | OUT EFI_EAPOL_SUPPLICANT_PAE_STATISTICS *Statistics\r |
374 | );\r | |
375 | \r | |
376 | ///\r | |
9095d37b | 377 | /// EFI_EAP_MANAGEMENT_PROTOCOL\r |
badd7e61 | 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 | |
9095d37b | 380 | /// a Port means a NIC. For the details of EAPOL, please refer to\r |
badd7e61 | 381 | /// IEEE 802.1x specification.\r |
382 | ///\r | |
383 | struct _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 | |
394 | extern EFI_GUID gEfiEapManagementProtocolGuid;\r | |
395 | \r | |
396 | #endif\r | |
397 | \r |