]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Protocol/AuthenticationInfo.h
Change the type of NotifyHandle from EFI_HANDLE to VOID * for SimpleTextInEx protocol.
[mirror_edk2.git] / MdePkg / Include / Protocol / AuthenticationInfo.h
... / ...
CommitLineData
1/** @file\r
2 EFI_AUTHENTICATION_INFO_PROTOCOL as defined in UEFI 2.0.\r
3 This protocol is used on any device handle to obtain authentication information \r
4 associated with the physical or logical device.\r
5\r
6Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
7This program and the accompanying materials are licensed and made available under \r
8the terms and conditions of the BSD License that accompanies this distribution. \r
9The full text of the license may be found at\r
10http://opensource.org/licenses/bsd-license.php. \r
11 \r
12THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
13WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
14\r
15**/\r
16\r
17#ifndef __AUTHENTICATION_INFO_H__\r
18#define __AUTHENTICATION_INFO_H__\r
19\r
20#define EFI_AUTHENTICATION_INFO_PROTOCOL_GUID \\r
21 { \\r
22 0x7671d9d0, 0x53db, 0x4173, {0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } \\r
23 }\r
24 \r
25#define EFI_AUTHENTICATION_CHAP_RADIUS_GUID \\r
26 { \\r
27 0xd6062b50, 0x15ca, 0x11da, {0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \\r
28 }\r
29\r
30#define EFI_AUTHENTICATION_CHAP_LOCAL_GUID \\r
31 { \\r
32 0xc280c73e, 0x15ca, 0x11da, {0xb0, 0xca, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \\r
33 }\r
34\r
35typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL EFI_AUTHENTICATION_INFO_PROTOCOL;\r
36\r
37#pragma pack(1)\r
38typedef struct {\r
39 ///\r
40 /// Authentication Type GUID.\r
41 ///\r
42 EFI_GUID Guid;\r
43\r
44 ///\r
45 /// Length of this structure in bytes.\r
46 ///\r
47 UINT16 Length;\r
48} AUTH_NODE_HEADER;\r
49\r
50typedef struct {\r
51 AUTH_NODE_HEADER Header;\r
52\r
53 ///\r
54 /// RADIUS Server IPv4 or IPv6 Address.\r
55 ///\r
56 UINT8 RadiusIpAddr[16]; ///< IPv4 or IPv6 address.\r
57\r
58 ///\r
59 /// Reserved for future use.\r
60 ///\r
61 UINT16 Reserved;\r
62\r
63 ///\r
64 /// Network Access Server IPv4 or IPv6 Address (OPTIONAL).\r
65 ///\r
66 UINT8 NasIpAddr[16]; ///< IPv4 or IPv6 address.\r
67\r
68 ///\r
69 /// Network Access Server Secret Length in bytes (OPTIONAL).\r
70 ///\r
71 UINT16 NasSecretLength;\r
72\r
73 ///\r
74 /// Network Access Server Secret (OPTIONAL).\r
75 ///\r
76 UINT8 NasSecret[1];\r
77\r
78 /// \r
79 /// CHAP Initiator Secret Length in bytes on offset NasSecret + NasSecretLength.\r
80 ///\r
81 /// UINT16 ChapSecretLength;\r
82 ///\r
83 /// CHAP Initiator Secret.\r
84 ///\r
85 /// UINT8 ChapSecret[];\r
86 ///\r
87 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength.\r
88 ///\r
89 /// UINT16 ChapNameLength;\r
90 ///\r
91 /// CHAP Initiator Name.\r
92 ///\r
93 /// UINT8 ChapName[];\r
94 ///\r
95 /// Reverse CHAP Name Length in bytes on offset ChapName + ChapNameLength.\r
96 ///\r
97 /// UINT16 ReverseChapNameLength;\r
98 ///\r
99 /// Reverse CHAP Name.\r
100 ///\r
101 /// UINT8 ReverseChapName[];\r
102 ///\r
103 /// Reverse CHAP Secret Length in bytes on offseet ReverseChapName + ReverseChapNameLength.\r
104 ///\r
105 /// UINT16 ReverseChapSecretLength;\r
106 ///\r
107 /// Reverse CHAP Secret.\r
108 ///\r
109 /// UINT8 ReverseChapSecret[];\r
110 ///\r
111} CHAP_RADIUS_AUTH_NODE;\r
112\r
113typedef struct {\r
114 AUTH_NODE_HEADER Header;\r
115\r
116 ///\r
117 /// Reserved for future use.\r
118 ///\r
119 UINT16 Reserved;\r
120\r
121 ///\r
122 /// User Secret Length in bytes.\r
123 ///\r
124 UINT16 UserSecretLength;\r
125\r
126 ///\r
127 /// User Secret.\r
128 ///\r
129 UINT8 UserSecret[1];\r
130\r
131 ///\r
132 /// User Name Length in bytes on offset UserSecret + UserSecretLength.\r
133 ///\r
134 /// UINT16 UserNameLength;\r
135 ///\r
136 /// User Name.\r
137 ///\r
138 /// UINT8 UserName[];\r
139 ///\r
140 /// CHAP Initiator Secret Length in bytes on offset UserName + UserNameLength.\r
141 ///\r
142 /// UINT16 ChapSecretLength;\r
143 ///\r
144 /// CHAP Initiator Secret.\r
145 ///\r
146 /// UINT8 ChapSecret[];\r
147 ///\r
148 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength.\r
149 ///\r
150 /// UINT16 ChapNameLength;\r
151 ///\r
152 /// CHAP Initiator Name.\r
153 ///\r
154 /// UINT8 ChapName[];\r
155 ///\r
156 /// Reverse CHAP Name Length in bytes on offset ChapName + ChapNameLength.\r
157 ///\r
158 /// UINT16 ReverseChapNameLength;\r
159 ///\r
160 /// Reverse CHAP Name.\r
161 ///\r
162 /// UINT8 ReverseChapName[];\r
163 ///\r
164 /// Reverse CHAP Secret Length in bytes on offset ReverseChapName + ReverseChapNameLength.\r
165 ///\r
166 /// UINT16 ReverseChapSecretLength;\r
167 ///\r
168 /// Reverse CHAP Secret.\r
169 ///\r
170 /// UINT8 ReverseChapSecret[];\r
171 ///\r
172} CHAP_LOCAL_AUTH_NODE;\r
173#pragma pack()\r
174\r
175/**\r
176 Retrieves the authentication information associated with a particular controller handle.\r
177\r
178 @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.\r
179 @param[in] ControllerHandle The handle to the Controller.\r
180 @param[out] Buffer The pointer to the authentication information. This function is\r
181 responsible for allocating the buffer and it is the caller's\r
182 responsibility to free buffer when the caller is finished with buffer.\r
183\r
184 @retval EFI_SUCCESS Successfully retrieved authentication information \r
185 for the given ControllerHandle.\r
186 @retval EFI_INVALID_PARAMETER No matching authentication information found for \r
187 the given ControllerHandle.\r
188 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved \r
189 due to a hardware error.\r
190\r
191**/\r
192typedef\r
193EFI_STATUS\r
194(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_GET)(\r
195 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
196 IN EFI_HANDLE ControllerHandle,\r
197 OUT VOID **Buffer\r
198 );\r
199\r
200/**\r
201 Set the authentication information for a given controller handle.\r
202\r
203 @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.\r
204 @param[in] ControllerHandle The handle to the Controller.\r
205 @param[in] Buffer The pointer to the authentication information.\r
206 \r
207 @retval EFI_SUCCESS Successfully set authentication information for the \r
208 given ControllerHandle.\r
209 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of \r
210 the authentication information.\r
211 @retval EFI_DEVICE_ERROR The authentication information could not be configured \r
212 due to a hardware error.\r
213 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r
214\r
215**/\r
216typedef\r
217EFI_STATUS\r
218(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_SET)(\r
219 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
220 IN EFI_HANDLE ControllerHandle,\r
221 IN VOID *Buffer\r
222 ); \r
223\r
224///\r
225/// This protocol is used on any device handle to obtain authentication \r
226/// information associated with the physical or logical device.\r
227///\r
228struct _EFI_AUTHENTICATION_INFO_PROTOCOL {\r
229 EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get;\r
230 EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set;\r
231};\r
232\r
233extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;\r
234extern EFI_GUID gEfiAuthenticationChapRadiusGuid;\r
235extern EFI_GUID gEfiAuthenticationChapLocalGuid;\r
236\r
237#endif\r