]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AuthenticationInfo.h
Update prototype name of Get()/Set() to EFI_AUTHENTICATION_INFO_PROTOCOL_GET/ EFI_AUT...
[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
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
8a18c8c2
SZ
148 @param[out] Buffer The pointer to the authentication information. This function is\r
149 responsible for allocating the buffer and it is the caller's\r
150 responsibility to free buffer when the caller is finished with buffer.\r
d1f95000 151\r
af2dc6a7 152 @retval EFI_SUCCESS Successfully retrieved authentication information \r
153 for the given ControllerHandle.\r
154 @retval EFI_INVALID_PARAMETER No matching authentication information found for \r
155 the given ControllerHandle.\r
156 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved \r
157 due to a hardware error.\r
d1f95000 158\r
159**/\r
160typedef\r
161EFI_STATUS\r
8a18c8c2 162(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_GET)(\r
d1f95000 163 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
8a18c8c2
SZ
164 IN EFI_HANDLE ControllerHandle,\r
165 OUT VOID **Buffer\r
bd86cb02 166 );\r
d1f95000 167\r
168/**\r
630b4187 169 Set the authentication information for a given controller handle.\r
d1f95000 170\r
af2dc6a7 171 @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.\r
172 @param[in] ControllerHandle The handle to the Controller.\r
173 @param[in] Buffer The pointer to the authentication information.\r
d1f95000 174 \r
af2dc6a7 175 @retval EFI_SUCCESS Successfully set authentication information for the \r
176 given ControllerHandle.\r
177 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of \r
178 the authentication information.\r
179 @retval EFI_DEVICE_ERROR The authentication information could not be configured \r
180 due to a hardware error.\r
d1f95000 181 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r
182\r
183**/\r
184typedef\r
185EFI_STATUS\r
8a18c8c2 186(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_SET)(\r
d1f95000 187 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
8a18c8c2 188 IN EFI_HANDLE ControllerHandle,\r
d1f95000 189 IN VOID *Buffer\r
ed66e1bc 190 ); \r
d1f95000 191\r
44717a39 192///\r
193/// This protocol is used on any device handle to obtain authentication \r
194/// information associated with the physical or logical device.\r
195///\r
d1f95000 196struct _EFI_AUTHENTICATION_INFO_PROTOCOL {\r
8a18c8c2
SZ
197 EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get;\r
198 EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set;\r
d1f95000 199};\r
200\r
201extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;\r
202extern EFI_GUID gEfiAuthenticationChapRadiusGuid;\r
203extern EFI_GUID gEfiAuthenticationChapLocalGuid;\r
204\r
205#endif\r