]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AuthenticationInfo.h
Reviewed the code comments in the Include/Protocol directory for typos, grammar issue...
[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
4ca9b6c4 6 Copyright (c) 2006 - 2008, Intel Corporation \r
d1f95000 7 All rights reserved. This program and the accompanying materials \r
8 are licensed and made available under the terms and conditions of the BSD License \r
9 which accompanies this distribution. The full text of the license may be found at \r
10 http://opensource.org/licenses/bsd-license.php \r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
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
37typedef struct {\r
f1004231
LG
38 ///\r
39 /// Authentication Type GUID.\r
40 ///\r
d1f95000 41 EFI_GUID Guid;\r
f1004231
LG
42\r
43 ///\r
44 /// Length of this structure in bytes.\r
45 ///\r
d1f95000 46 UINT16 Length;\r
47} AUTH_NODE_HEADER;\r
48\r
49typedef struct {\r
50 AUTH_NODE_HEADER Header;\r
f1004231
LG
51\r
52 ///\r
53 /// RADIUS Server IPv4 or IPv6 Address\r
54 ///\r
107ffdc9 55 EFI_IPv6_ADDRESS RadiusIpAddr; ///< IPv4 or IPv6 address\r
f1004231
LG
56\r
57 ///\r
58 /// Reserved for future use\r
59 ///\r
d1f95000 60 UINT16 Reserved;\r
f1004231
LG
61\r
62 ///\r
63 /// Network Access Server IPv4 or IPv6 Address (OPTIONAL)\r
64 ///\r
107ffdc9 65 EFI_IPv6_ADDRESS NasIpAddr; ///< IPv4 or IPv6 address\r
f1004231
LG
66\r
67 ///\r
68 /// Network Access Server Secret Length in bytes (OPTIONAL)\r
69 ///\r
d1f95000 70 UINT16 NasSecretLength; \r
f1004231
LG
71\r
72 ///\r
73 /// Network Access Server secret (OPTIONAL)\r
74 ///\r
d1f95000 75 UINT8 *NasSecret; \r
f1004231
LG
76\r
77 ///\r
78 /// CHAP Initiator Secret length in bytes\r
79 ///\r
d1f95000 80 UINT16 ChapSecretLength;\r
f1004231
LG
81\r
82 ///\r
83 /// CHAP Initiator Secret\r
84 ///\r
d1f95000 85 UINT8 *ChapSecret;\r
f1004231
LG
86\r
87 ///\r
88 /// CHAP Initiator Name Length in bytes\r
89 ///\r
d1f95000 90 UINT16 ChapNameLength;\r
f1004231
LG
91\r
92 ///\r
93 /// CHAP Initiator Name\r
94 ///\r
d1f95000 95 UINT8 *ChapName;\r
96} CHAP_RADIUS_AUTH_NODE;\r
97\r
98typedef struct {\r
99 AUTH_NODE_HEADER Header;\r
f1004231
LG
100\r
101 ///\r
102 /// Reserved for future use\r
103 ///\r
d1f95000 104 UINT16 Reserved;\r
f1004231
LG
105\r
106 ///\r
107 /// User Secret Length in bytes\r
108 ///\r
d1f95000 109 UINT16 UserSecretLength;\r
f1004231
LG
110\r
111 ///\r
112 /// User Secret\r
113 ///\r
d1f95000 114 UINT8 *UserSecret; \r
f1004231
LG
115\r
116 ///\r
117 /// User Name Length in bytes\r
118 ///\r
d1f95000 119 UINT16 UserNameLength;\r
f1004231
LG
120\r
121 ///\r
122 /// User Name\r
123 ///\r
d1f95000 124 UINT8 *UserName;\r
f1004231
LG
125\r
126 ///\r
127 /// CHAP Initiator Secret length in bytes\r
128 ///\r
d1f95000 129 UINT16 ChapSecretLength;\r
f1004231
LG
130\r
131 ///\r
132 /// CHAP Initiator Secret\r
133 ///\r
d1f95000 134 UINT8 *ChapSecret;\r
f1004231
LG
135\r
136 ///\r
137 /// CHAP Initiator Name Length in bytes\r
138 ///\r
d1f95000 139 UINT16 ChapNameLength;\r
f1004231
LG
140\r
141 ///\r
142 /// CHAP Initiator Name\r
143 ///\r
d1f95000 144 UINT8 *ChapName;\r
145} CHAP_LOCAL_AUTH_NODE;\r
146\r
147/**\r
630b4187 148 Retrieves the authentication information associated with a particular controller handle.\r
d1f95000 149\r
4ca9b6c4
LG
150 @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL\r
151 @param ControllerHandle Handle to the Controller\r
152 @param Buffer Pointer to the authentication information.\r
d1f95000 153\r
630b4187 154 @retval EFI_SUCCESS Successfully retrieved authentication information for the given ControllerHandle\r
155 @retval EFI_INVALID_PARAMETER No matching authentication information found for the given ControllerHandle\r
d1f95000 156 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved due to a\r
157 hardware error.\r
158\r
159**/\r
160typedef\r
161EFI_STATUS\r
8b13229b 162(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET)(\r
d1f95000 163 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
164 IN EFI_HANDLE *ControllerHandle,\r
165 OUT VOID *Buffer\r
ed66e1bc 166 ); \r
d1f95000 167\r
168/**\r
630b4187 169 Set the authentication information for a given controller handle.\r
d1f95000 170\r
4ca9b6c4
LG
171 @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL\r
172 @param ControllerHandle Handle to the Controller\r
173 @param Buffer Pointer to the authentication information.\r
d1f95000 174 \r
630b4187 175 @retval EFI_SUCCESS Successfully set authentication information for the given ControllerHandle\r
176 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of the authentication\r
d1f95000 177 information.\r
178 @retval EFI_DEVICE_ERROR The authentication information could not be configured due to a\r
179 hardware error.\r
180 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r
181\r
182**/\r
183typedef\r
184EFI_STATUS\r
8b13229b 185(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET)(\r
d1f95000 186 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
187 IN EFI_HANDLE *ControllerHandle,\r
188 IN VOID *Buffer\r
ed66e1bc 189 ); \r
d1f95000 190\r
44717a39 191///\r
192/// This protocol is used on any device handle to obtain authentication \r
193/// information associated with the physical or logical device.\r
194///\r
d1f95000 195struct _EFI_AUTHENTICATION_INFO_PROTOCOL {\r
196 EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;\r
197 EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;\r
198};\r
199\r
200extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;\r
201extern EFI_GUID gEfiAuthenticationChapRadiusGuid;\r
202extern EFI_GUID gEfiAuthenticationChapLocalGuid;\r
203\r
204#endif\r