]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/AuthenticationInfo.h
Import Pal.h and Sal.h.
[mirror_edk2.git] / MdePkg / Include / Protocol / AuthenticationInfo.h
1 /** @file
2 EFI_AUTHENTICATION_INFO_PROTOCOL as defined in UEFI 2.0.
3 This protocol is used on any device handle to obtain authentication information
4 associated with the physical or logical device.
5
6 Copyright (c) 2006, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 Module Name: AuthenticationInfo.h
16
17 **/
18
19 #ifndef __AUTHENTICATION_INFO_H__
20 #define __AUTHENTICATION_INFO_H__
21
22 #define EFI_AUTHENTICATION_INFO_PROTOCOL_GUID \
23 { \
24 0x7671d9d0, 0x53db, 0x4173, {0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } \
25 }
26
27 #define EFI_AUTHENTICATION_CHAP_RADIUS_GUID \
28 { \
29 0xd6062b50, 0x15ca, 0x11da, {0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
30 }
31
32 #define EFI_AUTHENTICATION_CHAP_LOCAL_GUID \
33 { \
34 0xc280c73e, 0x15ca, 0x11da, {0xb0, 0xca, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
35 }
36
37 typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL EFI_AUTHENTICATION_INFO_PROTOCOL;
38
39 typedef struct {
40 EFI_GUID Guid;
41 UINT16 Length;
42 } AUTH_NODE_HEADER;
43
44 typedef struct {
45 AUTH_NODE_HEADER Header;
46 EFI_IPv6_ADDRESS RadiusIpAddr; // IPv4 or IPv6 address
47 UINT16 Reserved;
48 EFI_IPv6_ADDRESS NasIpAddr; // IPv4 or IPv6 address
49 UINT16 NasSecretLength;
50 UINT8 *NasSecret;
51 UINT16 ChapSecretLength;
52 UINT8 *ChapSecret;
53 UINT16 ChapNameLength;
54 UINT8 *ChapName;
55 } CHAP_RADIUS_AUTH_NODE;
56
57 typedef struct {
58 AUTH_NODE_HEADER Header;
59 UINT16 Reserved;
60 UINT16 UserSecretLength;
61 UINT8 *UserSecret;
62 UINT16 UserNameLength;
63 UINT8 *UserName;
64 UINT16 ChapSecretLength;
65 UINT8 *ChapSecret;
66 UINT16 ChapNameLength;
67 UINT8 *ChapName;
68 } CHAP_LOCAL_AUTH_NODE;
69
70 /**
71 Retrieves the Authentication information associated with a particular controller handle.
72
73 @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
74 @param ControllerHandle Handle to the Controller
75 @param Buffer Pointer to the authentication information.
76
77 @retval EFI_SUCCESS Successfully retrieved Authentication information for the given ControllerHandle
78 @retval EFI_INVALID_PARAMETER No matching Authentication information found for the given ControllerHandle
79 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved due to a
80 hardware error.
81
82 **/
83 typedef
84 EFI_STATUS
85 (EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET) (
86 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
87 IN EFI_HANDLE *ControllerHandle,
88 OUT VOID *Buffer
89 )
90 ;
91
92 /**
93 Set the Authentication information for a given controller handle.
94
95 @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
96 @param ControllerHandle Handle to the Controller
97 @param Buffer Pointer to the authentication information.
98
99 @retval EFI_SUCCESS Successfully set Authentication information for the given ControllerHandle
100 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of the Authentication
101 information.
102 @retval EFI_DEVICE_ERROR The authentication information could not be configured due to a
103 hardware error.
104 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
105
106 **/
107 typedef
108 EFI_STATUS
109 (EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET) (
110 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
111 IN EFI_HANDLE *ControllerHandle,
112 IN VOID *Buffer
113 )
114 ;
115
116 struct _EFI_AUTHENTICATION_INFO_PROTOCOL {
117 EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;
118 EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;
119 };
120
121 extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;
122 extern EFI_GUID gEfiAuthenticationChapRadiusGuid;
123 extern EFI_GUID gEfiAuthenticationChapLocalGuid;
124
125 #endif