]>
Commit | Line | Data |
---|---|---|
badd7e61 | 1 | /** @file\r |
2 | EFI EAP(Extended Authenticaton Protocol) Protocol Definition\r | |
3 | The EFI EAP Protocol is used to abstract the ability to configure and extend the\r | |
4 | EAP framework. \r | |
5 | The definitions in this file are defined in UEFI Specification 2.3, which have\r | |
6 | not been verified by one implementation yet.\r | |
7 | \r | |
8 | Copyright (c) 2009, Intel Corporation\r | |
9 | All rights reserved. This program and the accompanying materials\r | |
10 | are licensed and made available under the terms and conditions of the BSD License\r | |
11 | which accompanies this distribution. The full text of the license may be found at\r | |
12 | http://opensource.org/licenses/bsd-license.php\r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef __EFI_EAP_PROTOCOL_H__\r | |
20 | #define __EFI_EAP_PROTOCOL_H__\r | |
21 | \r | |
22 | \r | |
23 | #define EFI_EAP_PROTOCOL_GUID \\r | |
24 | { \\r | |
25 | 0x5d9f96db, 0xe731, 0x4caa, {0xa0, 0xd, 0x72, 0xe1, 0x87, 0xcd, 0x77, 0x62 } \\r | |
26 | }\r | |
27 | \r | |
28 | typedef struct _EFI_EAP_PROTOCOL EFI_EAP_PROTOCOL;\r | |
29 | \r | |
30 | ///\r | |
31 | /// Type for the identification number assigned to the Port by the \r | |
32 | /// System in which the Port resides.\r | |
33 | ///\r | |
34 | typedef VOID * EFI_PORT_HANDLE;\r | |
35 | \r | |
36 | ///\r | |
37 | /// EAP Authentication Method Type (RFC 2284 Section 3)\r | |
38 | ///@{\r | |
39 | #define EFI_EAP_TYPE_MD5 0x4 ///< REQUIRED\r | |
40 | #define EFI_EAP_TYPE_OTP 0x5 ///< OPTIONAL\r | |
41 | #define EFI_EAP_TYPE_TOKEN_CARD 0x6 ///< OPTIONAL\r | |
42 | ///@}\r | |
43 | \r | |
44 | \r | |
45 | /**\r | |
46 | One user provided EAP authentication method.\r | |
47 | \r | |
48 | Build EAP response packet in response to the EAP request packet specified by\r | |
49 | (RequestBuffer, RequestSize).\r | |
50 | \r | |
51 | @param[in] PortNumber Specified the Port where the EAP request packet comes.\r | |
52 | @param[in] RequestBuffer Pointer to the most recently received EAP- Request packet.\r | |
53 | @param[in] RequestSize Packet size in bytes for the most recently received\r | |
54 | EAP-Request packet.\r | |
55 | @param[in] Buffer Pointer to the buffer to hold the built packet.\r | |
56 | @param[in, out] BufferSize Pointer to the buffer size in bytes. \r | |
57 | On input, it is the buffer size provided by the caller.\r | |
58 | On output, it is the buffer size in fact needed to contain\r | |
59 | the packet.\r | |
60 | \r | |
61 | @retval EFI_SUCCESS The required EAP response packet is built successfully.\r | |
62 | @retval others Failures are encountered during the packet building process.\r | |
63 | \r | |
64 | **/\r | |
65 | typedef\r | |
66 | EFI_STATUS\r | |
67 | (EFIAPI *EFI_EAP_BUILD_RESPONSE_PACKET)(\r | |
68 | IN EFI_PORT_HANDLE PortNumber,\r | |
69 | IN UINT8 *RequestBuffer, \r | |
70 | IN UINTN RequestSize, \r | |
71 | IN UINT8 *Buffer, \r | |
72 | IN OUT UINTN *BufferSize\r | |
73 | );\r | |
74 | \r | |
75 | /**\r | |
76 | Set the desired EAP authentication method for the Port.\r | |
77 | \r | |
78 | The SetDesiredAuthMethod() function sets the desired EAP authentication method indicated \r | |
79 | by EapAuthType for the Port.\r | |
80 | \r | |
81 | If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is \r | |
82 | returned.\r | |
83 | If the EAP authentication method of EapAuthType is unsupported by the Ports, then this\r | |
84 | function will return EFI_UNSUPPORTED.\r | |
85 | \r | |
86 | @param[in] This A pointer to the EFI_EAP_PROTOCOL instance that indicates \r | |
87 | the calling context.\r | |
88 | @param[in] EapAuthType The type of the EAP authentication method to register. It should \r | |
89 | be the type value defined by RFC. See RFC 2284 for details.\r | |
90 | @param[in] Handler The handler of the EAP authentication method to register.\r | |
91 | \r | |
92 | @retval EFI_SUCCESS The EAP authentication method of EapAuthType is \r | |
93 | registered successfully.\r | |
94 | @retval EFI_INVALID_PARAMETER EapAuthType is an invalid EAP authentication type.\r | |
95 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to perform the registration.\r | |
96 | \r | |
97 | **/\r | |
98 | typedef\r | |
99 | EFI_STATUS\r | |
100 | (EFIAPI *EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD)(\r | |
101 | IN struct _EFI_EAP_PROTOCOL *This, \r | |
102 | IN UINT8 EapAuthType\r | |
103 | );\r | |
104 | \r | |
105 | /**\r | |
106 | Register an EAP authentication method. \r | |
107 | \r | |
108 | The RegisterAuthMethod() function registers the user provided EAP authentication method, \r | |
109 | the type of which is EapAuthType and the handler of which is Handler. \r | |
110 | \r | |
111 | If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is \r | |
112 | returned.\r | |
113 | If there is not enough system memory to perform the registration, then \r | |
114 | EFI_OUT_OF_RESOURCES is returned.\r | |
115 | \r | |
116 | @param[in] This A pointer to the EFI_EAP_PROTOCOL instance that indicates \r | |
117 | the calling context.\r | |
118 | @param[in] EapAuthType The type of the EAP authentication method to register. It should \r | |
119 | be the type value defined by RFC. See RFC 2284 for details.\r | |
120 | @param[in] Handler The handler of the EAP authentication method to register.\r | |
121 | \r | |
122 | @retval EFI_SUCCESS The EAP authentication method of EapAuthType is \r | |
123 | registered successfully.\r | |
124 | @retval EFI_INVALID_PARAMETER EapAuthType is an invalid EAP authentication type.\r | |
125 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to perform the registration.\r | |
126 | \r | |
127 | **/\r | |
128 | typedef\r | |
129 | EFI_STATUS\r | |
130 | (EFIAPI *EFI_EAP_REGISTER_AUTHENTICATION_METHOD)(\r | |
131 | IN struct _EFI_EAP_PROTOCOL *This, \r | |
132 | IN UINT8 EapAuthType, \r | |
133 | IN EFI_EAP_BUILD_RESPONSE_PACKET Handler\r | |
134 | );\r | |
135 | \r | |
136 | ///\r | |
137 | /// EFI_EAP_PROTOCOL \r | |
138 | /// is used to configure the desired EAP authentication method for the EAP \r | |
139 | /// framework and extend the EAP framework by registering new EAP authentication\r | |
140 | /// method on a Port. The EAP framework is built on a per-Port basis. Herein, a\r | |
141 | /// Port means a NIC. For the details of EAP protocol, please refer to RFC 2284. \r | |
142 | ///\r | |
143 | struct _EFI_EAP_PROTOCOL {\r | |
144 | EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD SetDesiredAuthMethod;\r | |
145 | EFI_EAP_REGISTER_AUTHENTICATION_METHOD RegisterAuthMethod;\r | |
146 | };\r | |
147 | \r | |
148 | extern EFI_GUID gEfiEapProtocolGuid;\r | |
149 | \r | |
150 | #endif\r | |
151 | \r |