]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AuthenticationInfo.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[mirror_edk2.git] / MdePkg / Include / Protocol / AuthenticationInfo.h
CommitLineData
d1f95000 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
8a18c8c2 6Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
af2dc6a7 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
d1f95000 14\r
d1f95000 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
bd86cb02 37#pragma pack(1)\r
d1f95000 38typedef struct {\r
f1004231
LG
39 ///\r
40 /// Authentication Type GUID.\r
41 ///\r
d1f95000 42 EFI_GUID Guid;\r
f1004231
LG
43\r
44 ///\r
45 /// Length of this structure in bytes.\r
46 ///\r
d1f95000 47 UINT16 Length;\r
48} AUTH_NODE_HEADER;\r
49\r
50typedef struct {\r
51 AUTH_NODE_HEADER Header;\r
f1004231
LG
52\r
53 ///\r
af2dc6a7 54 /// RADIUS Server IPv4 or IPv6 Address.\r
f1004231 55 ///\r
af2dc6a7 56 UINT8 RadiusIpAddr[16]; ///< IPv4 or IPv6 address.\r
f1004231
LG
57\r
58 ///\r
af2dc6a7 59 /// Reserved for future use.\r
f1004231 60 ///\r
d1f95000 61 UINT16 Reserved;\r
f1004231
LG
62\r
63 ///\r
af2dc6a7 64 /// Network Access Server IPv4 or IPv6 Address (OPTIONAL).\r
f1004231 65 ///\r
af2dc6a7 66 UINT8 NasIpAddr[16]; ///< IPv4 or IPv6 address.\r
f1004231
LG
67\r
68 ///\r
9abd3166 69 /// Network Access Server Secret Length in bytes (OPTIONAL).\r
f1004231 70 ///\r
9abd3166 71 UINT16 NasSecretLength;\r
f1004231
LG
72\r
73 ///\r
af2dc6a7 74 /// Network Access Server Secret (OPTIONAL).\r
f1004231 75 ///\r
bd86cb02 76 UINT8 NasSecret[1];\r
f1004231 77\r
bd86cb02 78 /// \r
9abd3166 79 /// CHAP Initiator Secret Length in bytes on offset NasSecret + NasSecretLength.\r
f1004231 80 ///\r
bd86cb02 81 /// UINT16 ChapSecretLength;\r
f1004231 82 ///\r
9abd3166 83 /// CHAP Initiator Secret.\r
f1004231 84 ///\r
bd86cb02 85 /// UINT8 ChapSecret[];\r
f1004231 86 ///\r
af2dc6a7 87 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength.\r
f1004231 88 ///\r
bd86cb02 89 /// UINT16 ChapNameLength;\r
f1004231 90 ///\r
9abd3166 91 /// CHAP Initiator Name.\r
f1004231 92 ///\r
bd86cb02
LG
93 /// UINT8 ChapName[];\r
94 ///\r
9abd3166
RN
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
d1f95000 111} CHAP_RADIUS_AUTH_NODE;\r
112\r
113typedef struct {\r
114 AUTH_NODE_HEADER Header;\r
f1004231
LG
115\r
116 ///\r
af2dc6a7 117 /// Reserved for future use.\r
f1004231 118 ///\r
d1f95000 119 UINT16 Reserved;\r
f1004231
LG
120\r
121 ///\r
af2dc6a7 122 /// User Secret Length in bytes.\r
f1004231 123 ///\r
d1f95000 124 UINT16 UserSecretLength;\r
f1004231
LG
125\r
126 ///\r
af2dc6a7 127 /// User Secret.\r
f1004231 128 ///\r
bd86cb02 129 UINT8 UserSecret[1];\r
f1004231
LG
130\r
131 ///\r
af2dc6a7 132 /// User Name Length in bytes on offset UserSecret + UserSecretLength.\r
f1004231 133 ///\r
bd86cb02 134 /// UINT16 UserNameLength;\r
f1004231 135 ///\r
9abd3166 136 /// User Name.\r
f1004231 137 ///\r
9abd3166 138 /// UINT8 UserName[];\r
f1004231 139 ///\r
9abd3166 140 /// CHAP Initiator Secret Length in bytes on offset UserName + UserNameLength.\r
f1004231 141 ///\r
bd86cb02 142 /// UINT16 ChapSecretLength;\r
f1004231 143 ///\r
9abd3166 144 /// CHAP Initiator Secret.\r
f1004231 145 ///\r
9abd3166 146 /// UINT8 ChapSecret[];\r
f1004231 147 ///\r
9abd3166 148 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength.\r
f1004231 149 ///\r
bd86cb02 150 /// UINT16 ChapNameLength;\r
f1004231 151 ///\r
9abd3166
RN
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
f1004231 169 ///\r
9abd3166 170 /// UINT8 ReverseChapSecret[];\r
bd86cb02 171 ///\r
d1f95000 172} CHAP_LOCAL_AUTH_NODE;\r
bd86cb02 173#pragma pack()\r
d1f95000 174\r
175/**\r
630b4187 176 Retrieves the authentication information associated with a particular controller handle.\r
d1f95000 177\r
af2dc6a7 178 @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.\r
179 @param[in] ControllerHandle The handle to the Controller.\r
8a18c8c2
SZ
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
d1f95000 183\r
af2dc6a7 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
d1f95000 190\r
191**/\r
192typedef\r
193EFI_STATUS\r
8a18c8c2 194(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_GET)(\r
d1f95000 195 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
8a18c8c2
SZ
196 IN EFI_HANDLE ControllerHandle,\r
197 OUT VOID **Buffer\r
bd86cb02 198 );\r
d1f95000 199\r
200/**\r
630b4187 201 Set the authentication information for a given controller handle.\r
d1f95000 202\r
af2dc6a7 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
d1f95000 206 \r
af2dc6a7 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
d1f95000 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
8a18c8c2 218(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_SET)(\r
d1f95000 219 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
8a18c8c2 220 IN EFI_HANDLE ControllerHandle,\r
d1f95000 221 IN VOID *Buffer\r
ed66e1bc 222 ); \r
d1f95000 223\r
44717a39 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
d1f95000 228struct _EFI_AUTHENTICATION_INFO_PROTOCOL {\r
8a18c8c2
SZ
229 EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get;\r
230 EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set;\r
d1f95000 231};\r
232\r
233extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;\r
234extern EFI_GUID gEfiAuthenticationChapRadiusGuid;\r
235extern EFI_GUID gEfiAuthenticationChapLocalGuid;\r
236\r
237#endif\r