]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/EapManagement.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[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
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
9df063a0
HT
9 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
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
5899caf0 18 @par Revision Reference: \r
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
46typedef struct _EFI_EAPOL_PORT_INFO { \r
47 /// \r
48 /// The identification number assigned to the Port by the System in \r
49 /// which the Port resides.\r
50 /// \r
51 EFI_PORT_HANDLE PortNumber;\r
52 /// \r
53 /// The protocol version number of the EAPOL implementation \r
54 /// supported by the Port. \r
55 /// \r
56 UINT8 ProtocolVersion;\r
57 /// \r
58 /// The capabilities of the PAE associated with the Port. This field \r
59 /// indicates whether Authenticator functionality, Supplicant \r
60 /// functionality, both, or neither, is supported by the Port's PAE.\r
61 /// \r
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
80/// Definitions for ValidFieldMask \r
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
93 /// \r
94 /// Indicates which of the following fields are valid.\r
95 /// \r
96 UINT8 ValidFieldMask; \r
97 ///\r
98 /// The initial value for the authWhile timer. Its default value is 30s.\r
99 ///\r
100 UINTN AuthPeriod; \r
101 ///\r
102 /// The initial value for the heldWhile timer. Its default value is 60s. \r
103 ///\r
104 UINTN HeldPeriod; \r
105 ///\r
106 /// The initial value for the startWhen timer. Its default value is 30s. \r
107 ///\r
108 UINTN StartPeriod; \r
109 /// \r
110 /// The maximum number of successive EAPOL-Start messages will \r
111 /// be sent before the Supplicant assumes that there is no \r
112 /// Authenticator present. Its default value is 3.\r
113 /// \r
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
123 /// \r
124 UINTN EapolFramesReceived;\r
125 ///\r
126 /// The number of EAPOL frames of any type that have been transmitted by this Supplicant. \r
127 ///\r
128 UINTN EapolFramesTransmitted;\r
129 /// \r
130 /// The number of EAPOL Start frames that have been transmitted by this Supplicant. \r
131 /// \r
132 UINTN EapolStartFramesTransmitted;\r
133 /// \r
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
141 /// \r
142 /// The number of valid EAP Response frames (other than Resp/Id frames) that have been \r
143 /// transmitted by this Supplicant.\r
144 ///\r
145 UINTN EapResponseFramesTransmitted;\r
146 /// \r
147 /// The number of EAP Req/Id frames that have been received by this Supplicant.\r
148 /// \r
149 UINTN EapReqIdFramesReceived;\r
150 ///\r
151 /// The number of EAP Request frames (other than Rq/Id frames) that have been received \r
152 /// by this Supplicant.\r
153 ///\r
154 UINTN EapRequestFramesReceived;\r
155 ///\r
156 /// The number of EAPOL frames that have been received by this Supplicant in which the \r
157 /// frame type is not recognized.\r
158 ///\r
159 UINTN InvalidEapolFramesReceived;\r
160 /// \r
161 /// The number of EAPOL frames that have been received by this Supplicant in which the \r
162 /// Packet Body Length field (7.5.5) is invalid.\r
163 /// \r
164 UINTN EapLengthErrorFramesReceived;\r
165 /// \r
166 /// The protocol version number carried in the most recently received EAPOL frame.\r
167 /// \r
168 UINTN LastEapolFrameVersion;\r
169 /// \r
170 /// The source MAC address carried in the most recently received EAPOL frame.\r
171 /// \r
172 UINTN LastEapolFrameSource;\r
173} EFI_EAPOL_SUPPLICANT_PAE_STATISTICS;\r
174\r
175/**\r
176 Read the system configuration information associated with the Port. \r
177\r
178 The GetSystemConfiguration() function reads the system configuration\r
179 information associated with the Port, including the value of the \r
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
182 The Port's information is optional. \r
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
190 parameter of the System. \r
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
ea6898b9 205 IN EFI_EAP_MANAGEMENT_PROTOCOL *This, \r
badd7e61 206 OUT BOOLEAN *SystemAuthControl, \r
207 OUT EFI_EAPOL_PORT_INFO *PortInfo OPTIONAL\r
208 );\r
209\r
210/**\r
211 Set the system configuration information associated with the Port. \r
212\r
213 The SetSystemConfiguration() function sets the value of the SystemAuthControl \r
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
218 @param[in] SystemAuthControl The desired value of the SystemAuthControl \r
219 parameter of the System. \r
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
ea6898b9 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
269 Notify the EAPOL state machines for the Port that the user of the System has \r
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
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
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
306 NULL to ignore reading the configuration. \r
307 On input, Configuration.ValidFieldMask specifies the \r
308 operational parameters to be read.\r
309 On output, Configuration returns the configuration\r
310 of the required operational parameters. \r
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
ea6898b9 321 IN EFI_EAP_MANAGEMENT_PROTOCOL *This, \r
badd7e61 322 OUT EFI_EAPOL_SUPPLICANT_PAE_STATE *CurrentState, \r
323 IN OUT EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION *Configuration OPTIONAL\r
324 );\r
325\r
326/**\r
327 Set the configuration of the operational parameter of the Supplicant PAE \r
328 state machine for the Port.\r
329\r
330 The SetSupplicantConfiguration() function sets the configuration of the \r
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
339 @param[in] Configuration The desired configuration of the operational \r
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
ea6898b9 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
358 associated with the Port. \r
359\r
360 The GetSupplicantStatistics() function reads the statistical information \r
361 Statistics regarding the operation of the Supplicant associated with the Port.\r
362 \r
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
367 @param[out] Statistics Returns the statistical information regarding the \r
368 operation of the Supplicant for the Port. \r
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
ea6898b9 378 IN EFI_EAP_MANAGEMENT_PROTOCOL *This, \r
badd7e61 379 OUT EFI_EAPOL_SUPPLICANT_PAE_STATISTICS *Statistics\r
380 );\r
381\r
382///\r
383/// EFI_EAP_MANAGEMENT_PROTOCOL \r
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
386/// a Port means a NIC. For the details of EAPOL, please refer to \r
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