]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Protocol/AuthenticationInfo.h
Comments checked with spec.
[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
6 Copyright (c) 2006 - 2008, Intel Corporation \r
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
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
38 ///\r
39 /// Authentication Type GUID.\r
40 ///\r
41 EFI_GUID Guid;\r
42\r
43 ///\r
44 /// Length of this structure in bytes.\r
45 ///\r
46 UINT16 Length;\r
47} AUTH_NODE_HEADER;\r
48\r
49typedef struct {\r
50 AUTH_NODE_HEADER Header;\r
51\r
52 ///\r
53 /// RADIUS Server IPv4 or IPv6 Address\r
54 ///\r
55 EFI_IPv6_ADDRESS RadiusIpAddr; ///< IPv4 or IPv6 address\r
56\r
57 ///\r
58 /// Reserved for future use\r
59 ///\r
60 UINT16 Reserved;\r
61\r
62 ///\r
63 /// Network Access Server IPv4 or IPv6 Address (OPTIONAL)\r
64 ///\r
65 EFI_IPv6_ADDRESS NasIpAddr; ///< IPv4 or IPv6 address\r
66\r
67 ///\r
68 /// Network Access Server Secret Length in bytes (OPTIONAL)\r
69 ///\r
70 UINT16 NasSecretLength; \r
71\r
72 ///\r
73 /// Network Access Server secret (OPTIONAL)\r
74 ///\r
75 UINT8 *NasSecret; \r
76\r
77 ///\r
78 /// CHAP Initiator Secret length in bytes\r
79 ///\r
80 UINT16 ChapSecretLength;\r
81\r
82 ///\r
83 /// CHAP Initiator Secret\r
84 ///\r
85 UINT8 *ChapSecret;\r
86\r
87 ///\r
88 /// CHAP Initiator Name Length in bytes\r
89 ///\r
90 UINT16 ChapNameLength;\r
91\r
92 ///\r
93 /// CHAP Initiator Name\r
94 ///\r
95 UINT8 *ChapName;\r
96} CHAP_RADIUS_AUTH_NODE;\r
97\r
98typedef struct {\r
99 AUTH_NODE_HEADER Header;\r
100\r
101 ///\r
102 /// Reserved for future use\r
103 ///\r
104 UINT16 Reserved;\r
105\r
106 ///\r
107 /// User Secret Length in bytes\r
108 ///\r
109 UINT16 UserSecretLength;\r
110\r
111 ///\r
112 /// User Secret\r
113 ///\r
114 UINT8 *UserSecret; \r
115\r
116 ///\r
117 /// User Name Length in bytes\r
118 ///\r
119 UINT16 UserNameLength;\r
120\r
121 ///\r
122 /// User Name\r
123 ///\r
124 UINT8 *UserName;\r
125\r
126 ///\r
127 /// CHAP Initiator Secret length in bytes\r
128 ///\r
129 UINT16 ChapSecretLength;\r
130\r
131 ///\r
132 /// CHAP Initiator Secret\r
133 ///\r
134 UINT8 *ChapSecret;\r
135\r
136 ///\r
137 /// CHAP Initiator Name Length in bytes\r
138 ///\r
139 UINT16 ChapNameLength;\r
140\r
141 ///\r
142 /// CHAP Initiator Name\r
143 ///\r
144 UINT8 *ChapName;\r
145} CHAP_LOCAL_AUTH_NODE;\r
146\r
147/**\r
148 Retrieves the Authentication information associated with a particular controller handle.\r
149\r
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
153\r
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
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
162(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET)(\r
163 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
164 IN EFI_HANDLE *ControllerHandle,\r
165 OUT VOID *Buffer\r
166 ); \r
167\r
168/**\r
169 Set the Authentication information for a given controller handle.\r
170\r
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
174 \r
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
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
185(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET)(\r
186 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
187 IN EFI_HANDLE *ControllerHandle,\r
188 IN VOID *Buffer\r
189 ); \r
190\r
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
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