X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FAuthenticationInfo.h;h=a69423fe5b266a80557a95ce0183fbed09153541;hb=fed5f4475948fd09cb71ba4c9f3918af1c3a7ba6;hp=f80dbf362b9b2fc62356af24ad669fb3372c5095;hpb=d1f950002362305fcd4c30f108ef7b76679f5843;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/AuthenticationInfo.h b/MdePkg/Include/Protocol/AuthenticationInfo.h index f80dbf362b..a69423fe5b 100644 --- a/MdePkg/Include/Protocol/AuthenticationInfo.h +++ b/MdePkg/Include/Protocol/AuthenticationInfo.h @@ -3,16 +3,14 @@ This protocol is used on any device handle to obtain authentication information associated with the physical or logical device. - Copyright (c) 2006, 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. - - Module Name: AuthenticationInfo.h +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. **/ @@ -36,86 +34,200 @@ typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL EFI_AUTHENTICATION_INFO_PROTOCOL; +#pragma pack(1) typedef struct { + /// + /// Authentication Type GUID. + /// EFI_GUID Guid; + + /// + /// Length of this structure in bytes. + /// UINT16 Length; } AUTH_NODE_HEADER; typedef struct { AUTH_NODE_HEADER Header; - EFI_IPv6_ADDRESS RadiusIpAddr; // IPv4 or IPv6 address + + /// + /// RADIUS Server IPv4 or IPv6 Address. + /// + UINT8 RadiusIpAddr[16]; ///< IPv4 or IPv6 address. + + /// + /// Reserved for future use. + /// UINT16 Reserved; - EFI_IPv6_ADDRESS NasIpAddr; // IPv4 or IPv6 address - UINT16 NasSecretLength; - UINT8 *NasSecret; - UINT16 ChapSecretLength; - UINT8 *ChapSecret; - UINT16 ChapNameLength; - UINT8 *ChapName; + + /// + /// Network Access Server IPv4 or IPv6 Address (OPTIONAL). + /// + UINT8 NasIpAddr[16]; ///< IPv4 or IPv6 address. + + /// + /// Network Access Server Secret Length in bytes (OPTIONAL). + /// + UINT16 NasSecretLength; + + /// + /// Network Access Server Secret (OPTIONAL). + /// + UINT8 NasSecret[1]; + + /// + /// CHAP Initiator Secret Length in bytes on offset NasSecret + NasSecretLength. + /// + /// UINT16 ChapSecretLength; + /// + /// CHAP Initiator Secret. + /// + /// UINT8 ChapSecret[]; + /// + /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength. + /// + /// UINT16 ChapNameLength; + /// + /// 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. + /// UINT16 Reserved; + + /// + /// User Secret Length in bytes. + /// UINT16 UserSecretLength; - UINT8 *UserSecret; - UINT16 UserNameLength; - UINT8 *UserName; - UINT16 ChapSecretLength; - UINT8 *ChapSecret; - UINT16 ChapNameLength; - UINT8 *ChapName; + + /// + /// User Secret. + /// + UINT8 UserSecret[1]; + + /// + /// User Name Length in bytes on offset UserSecret + UserSecretLength. + /// + /// UINT16 UserNameLength; + /// + /// User Name. + /// + /// UINT8 UserName[]; + /// + /// CHAP Initiator Secret Length in bytes on offset UserName + UserNameLength. + /// + /// UINT16 ChapSecretLength; + /// + /// CHAP Initiator Secret. + /// + /// UINT8 ChapSecret[]; + /// + /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength. + /// + /// UINT16 ChapNameLength; + /// + /// 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 ReverseChapSecret[]; + /// } CHAP_LOCAL_AUTH_NODE; +#pragma pack() /** - Retrieves the Authentication information associated with a particular controller handle. + Retrieves the authentication information associated with a particular controller handle. - @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL - @param ControllerHandle Handle to the Controller - @param 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. + Set the authentication information for a given controller handle. - @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL - @param ControllerHandle Handle to the Controller - @param 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 - ) -; + ); +/// +/// This protocol is used on any device handle to obtain authentication +/// 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;