X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=MdePkg%2FInclude%2FProtocol%2FAuthenticationInfo.h;h=538eb10534fb1e91642148f4ef530ad9cc60a343;hb=9df063a06aef048c042498e2f542fb693e93493a;hp=c491cba1eaed7ed6b5dae1c1c5c42e3fc8b3d439;hpb=842f5579c7e2a313f56c576e4c5150f7f4793079;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/AuthenticationInfo.h b/MdePkg/Include/Protocol/AuthenticationInfo.h index c491cba1ea..538eb10534 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, 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 - 2010, 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. **/ @@ -34,83 +34,163 @@ 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 + + /// + /// 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; - UINT8 *NasSecret; - UINT16 ChapSecretLength; - UINT8 *ChapSecret; - UINT16 ChapNameLength; - UINT8 *ChapName; + + /// + /// 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[]; + /// } 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; + /// } 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. - @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_PROTOCOL_INFO_GET)( IN EFI_AUTHENTICATION_INFO_PROTOCOL *This, 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_PROTOCOL_INFO_SET)( IN EFI_AUTHENTICATION_INFO_PROTOCOL *This, 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;