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