]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AuthenticationInfo.h
Partial checkin fixing Beagle references
[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
af2dc6a7 6Copyright (c) 2006 - 2010, 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
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
69 /// Network Access Server Secret Length in bytes (OPTIONAL)\r
70 ///\r
d1f95000 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
LG
78 /// \r
79 /// CHAP Initiator Secret length in bytes on offset NasSecret + NasSecretLength.\r
f1004231 80 ///\r
bd86cb02 81 /// UINT16 ChapSecretLength;\r
f1004231
LG
82 ///\r
83 /// CHAP Initiator Secret\r
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
LG
90 ///\r
91 /// CHAP Initiator Name\r
92 ///\r
bd86cb02
LG
93 /// UINT8 ChapName[];\r
94 ///\r
d1f95000 95} CHAP_RADIUS_AUTH_NODE;\r
96\r
97typedef struct {\r
98 AUTH_NODE_HEADER Header;\r
f1004231
LG
99\r
100 ///\r
af2dc6a7 101 /// Reserved for future use.\r
f1004231 102 ///\r
d1f95000 103 UINT16 Reserved;\r
f1004231
LG
104\r
105 ///\r
af2dc6a7 106 /// User Secret Length in bytes.\r
f1004231 107 ///\r
d1f95000 108 UINT16 UserSecretLength;\r
f1004231
LG
109\r
110 ///\r
af2dc6a7 111 /// User Secret.\r
f1004231 112 ///\r
bd86cb02 113 UINT8 UserSecret[1];\r
f1004231
LG
114\r
115 ///\r
af2dc6a7 116 /// User Name Length in bytes on offset UserSecret + UserSecretLength.\r
f1004231 117 ///\r
bd86cb02 118 /// UINT16 UserNameLength;\r
f1004231
LG
119 ///\r
120 /// User Name\r
121 ///\r
bd86cb02 122 /// UINT8 *UserName;\r
f1004231 123 ///\r
bd86cb02 124 /// CHAP Initiator Secret length in bytes on offset UserName + UserNameLength\r
f1004231 125 ///\r
bd86cb02 126 /// UINT16 ChapSecretLength;\r
f1004231
LG
127 ///\r
128 /// CHAP Initiator Secret\r
129 ///\r
bd86cb02 130 /// UINT8 *ChapSecret;\r
f1004231 131 ///\r
bd86cb02 132 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength\r
f1004231 133 ///\r
bd86cb02 134 /// UINT16 ChapNameLength;\r
f1004231
LG
135 ///\r
136 /// CHAP Initiator Name\r
137 ///\r
bd86cb02
LG
138 /// UINT8 *ChapName;\r
139 ///\r
d1f95000 140} CHAP_LOCAL_AUTH_NODE;\r
bd86cb02 141#pragma pack()\r
d1f95000 142\r
143/**\r
630b4187 144 Retrieves the authentication information associated with a particular controller handle.\r
d1f95000 145\r
af2dc6a7 146 @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.\r
147 @param[in] ControllerHandle The handle to the Controller.\r
148 @param[out] Buffer The pointer to the authentication information.\r
d1f95000 149\r
af2dc6a7 150 @retval EFI_SUCCESS Successfully retrieved authentication information \r
151 for the given ControllerHandle.\r
152 @retval EFI_INVALID_PARAMETER No matching authentication information found for \r
153 the given ControllerHandle.\r
154 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved \r
155 due to a hardware error.\r
d1f95000 156\r
157**/\r
158typedef\r
159EFI_STATUS\r
8b13229b 160(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET)(\r
d1f95000 161 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
162 IN EFI_HANDLE *ControllerHandle,\r
163 OUT VOID *Buffer\r
bd86cb02 164 );\r
d1f95000 165\r
166/**\r
630b4187 167 Set the authentication information for a given controller handle.\r
d1f95000 168\r
af2dc6a7 169 @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.\r
170 @param[in] ControllerHandle The handle to the Controller.\r
171 @param[in] Buffer The pointer to the authentication information.\r
d1f95000 172 \r
af2dc6a7 173 @retval EFI_SUCCESS Successfully set authentication information for the \r
174 given ControllerHandle.\r
175 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of \r
176 the authentication information.\r
177 @retval EFI_DEVICE_ERROR The authentication information could not be configured \r
178 due to a hardware error.\r
d1f95000 179 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r
180\r
181**/\r
182typedef\r
183EFI_STATUS\r
8b13229b 184(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET)(\r
d1f95000 185 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
186 IN EFI_HANDLE *ControllerHandle,\r
187 IN VOID *Buffer\r
ed66e1bc 188 ); \r
d1f95000 189\r
44717a39 190///\r
191/// This protocol is used on any device handle to obtain authentication \r
192/// information associated with the physical or logical device.\r
193///\r
d1f95000 194struct _EFI_AUTHENTICATION_INFO_PROTOCOL {\r
195 EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;\r
196 EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;\r
197};\r
198\r
199extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;\r
200extern EFI_GUID gEfiAuthenticationChapRadiusGuid;\r
201extern EFI_GUID gEfiAuthenticationChapLocalGuid;\r
202\r
203#endif\r