X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FAuthenticationInfo.h;h=a69423fe5b266a80557a95ce0183fbed09153541;hb=fed5f4475948fd09cb71ba4c9f3918af1c3a7ba6;hp=a3c9b973771637a567ffde1c7cd91937939c5c2c;hpb=bd86cb029242314c4274242612cfd79964cfbf17;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/AuthenticationInfo.h b/MdePkg/Include/Protocol/AuthenticationInfo.h index a3c9b97377..a69423fe5b 100644 --- a/MdePkg/Include/Protocol/AuthenticationInfo.h +++ b/MdePkg/Include/Protocol/AuthenticationInfo.h @@ -3,14 +3,14 @@ This protocol is used on any device handle to obtain authentication information associated with the physical or logical device. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -51,91 +51,123 @@ typedef struct { AUTH_NODE_HEADER Header; /// - /// RADIUS Server IPv4 or IPv6 Address + /// RADIUS Server IPv4 or IPv6 Address. /// - UINT8 RadiusIpAddr[16]; ///< IPv4 or IPv6 address + UINT8 RadiusIpAddr[16]; ///< IPv4 or IPv6 address. /// - /// Reserved for future use + /// Reserved for future use. /// UINT16 Reserved; /// - /// Network Access Server IPv4 or IPv6 Address (OPTIONAL) + /// Network Access Server IPv4 or IPv6 Address (OPTIONAL). /// - UINT8 NasIpAddr[16]; ///< IPv4 or IPv6 address + UINT8 NasIpAddr[16]; ///< IPv4 or IPv6 address. /// - /// Network Access Server Secret Length in bytes (OPTIONAL) + /// Network Access Server Secret Length in bytes (OPTIONAL). /// - UINT16 NasSecretLength; + UINT16 NasSecretLength; /// - /// Network Access Server Secret (OPTIONAL) + /// Network Access Server Secret (OPTIONAL). /// UINT8 NasSecret[1]; /// - /// CHAP Initiator Secret length in bytes on offset NasSecret + NasSecretLength. + /// CHAP Initiator Secret Length in bytes on offset NasSecret + NasSecretLength. /// /// UINT16 ChapSecretLength; /// - /// CHAP Initiator Secret + /// CHAP Initiator Secret. /// /// UINT8 ChapSecret[]; /// - /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength + /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength. /// /// UINT16 ChapNameLength; /// - /// CHAP Initiator Name + /// CHAP Initiator Name. /// /// UINT8 ChapName[]; /// + /// Reverse CHAP Name Length in bytes on offset ChapName + ChapNameLength. + /// + /// UINT16 ReverseChapNameLength; + /// + /// Reverse CHAP Name. + /// + /// UINT8 ReverseChapName[]; + /// + /// Reverse CHAP Secret Length in bytes on offseet ReverseChapName + ReverseChapNameLength. + /// + /// UINT16 ReverseChapSecretLength; + /// + /// Reverse CHAP Secret. + /// + /// UINT8 ReverseChapSecret[]; + /// } CHAP_RADIUS_AUTH_NODE; typedef struct { AUTH_NODE_HEADER Header; /// - /// Reserved for future use + /// Reserved for future use. /// UINT16 Reserved; /// - /// User Secret Length in bytes + /// User Secret Length in bytes. /// UINT16 UserSecretLength; /// - /// User Secret + /// User Secret. /// UINT8 UserSecret[1]; /// - /// User Name Length in bytes on offset UserSecret + UserSecretLength + /// User Name Length in bytes on offset UserSecret + UserSecretLength. /// /// UINT16 UserNameLength; /// - /// User Name + /// User Name. /// - /// UINT8 *UserName; + /// UINT8 UserName[]; /// - /// CHAP Initiator Secret length in bytes on offset UserName + UserNameLength + /// CHAP Initiator Secret Length in bytes on offset UserName + UserNameLength. /// /// UINT16 ChapSecretLength; /// - /// CHAP Initiator Secret + /// CHAP Initiator Secret. /// - /// UINT8 *ChapSecret; + /// UINT8 ChapSecret[]; /// - /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength + /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength. /// /// UINT16 ChapNameLength; /// - /// CHAP Initiator Name + /// CHAP Initiator Name. + /// + /// UINT8 ChapName[]; + /// + /// Reverse CHAP Name Length in bytes on offset ChapName + ChapNameLength. + /// + /// UINT16 ReverseChapNameLength; + /// + /// Reverse CHAP Name. + /// + /// UINT8 ReverseChapName[]; + /// + /// Reverse CHAP Secret Length in bytes on offset ReverseChapName + ReverseChapNameLength. + /// + /// UINT16 ReverseChapSecretLength; + /// + /// Reverse CHAP Secret. /// - /// UINT8 *ChapName; + /// UINT8 ReverseChapSecret[]; /// } CHAP_LOCAL_AUTH_NODE; #pragma pack() @@ -143,44 +175,49 @@ typedef struct { /** Retrieves the authentication information associated with a particular controller handle. - @param[in] This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL - @param[in] ControllerHandle Handle to the Controller - @param[out] Buffer Pointer to the authentication information. + @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL. + @param[in] ControllerHandle The handle to the Controller. + @param[out] Buffer The pointer to the authentication information. This function is + responsible for allocating the buffer and it is the caller's + responsibility to free buffer when the caller is finished with buffer. - @retval EFI_SUCCESS Successfully retrieved authentication information for the given ControllerHandle - @retval EFI_INVALID_PARAMETER No matching authentication information found for the given ControllerHandle - @retval EFI_DEVICE_ERROR The authentication information could not be retrieved due to a - hardware error. + @retval EFI_SUCCESS Successfully retrieved authentication information + for the given ControllerHandle. + @retval EFI_INVALID_PARAMETER No matching authentication information found for + the given ControllerHandle. + @retval EFI_DEVICE_ERROR The authentication information could not be retrieved + due to a hardware error. **/ typedef EFI_STATUS -(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET)( +(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_GET)( IN EFI_AUTHENTICATION_INFO_PROTOCOL *This, - IN EFI_HANDLE *ControllerHandle, - OUT VOID *Buffer + IN EFI_HANDLE ControllerHandle, + OUT VOID **Buffer ); /** Set the authentication information for a given controller handle. - @param[in] This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL - @param[in] ControllerHandle Handle to the Controller - @param[in] Buffer Pointer to the authentication information. + @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL. + @param[in] ControllerHandle The handle to the Controller. + @param[in] Buffer The pointer to the authentication information. - @retval EFI_SUCCESS Successfully set authentication information for the given ControllerHandle - @retval EFI_UNSUPPORTED If the platform policies do not allow setting of the authentication - information. - @retval EFI_DEVICE_ERROR The authentication information could not be configured due to a - hardware error. + @retval EFI_SUCCESS Successfully set authentication information for the + given ControllerHandle. + @retval EFI_UNSUPPORTED If the platform policies do not allow setting of + the authentication information. + @retval EFI_DEVICE_ERROR The authentication information could not be configured + due to a hardware error. @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data. **/ typedef EFI_STATUS -(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET)( +(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_SET)( IN EFI_AUTHENTICATION_INFO_PROTOCOL *This, - IN EFI_HANDLE *ControllerHandle, + IN EFI_HANDLE ControllerHandle, IN VOID *Buffer ); @@ -189,8 +226,8 @@ EFI_STATUS /// information associated with the physical or logical device. /// struct _EFI_AUTHENTICATION_INFO_PROTOCOL { - EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get; - EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set; + EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get; + EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set; }; extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;