]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/AuthenticationInfo.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Protocol / AuthenticationInfo.h
index 538eb10534fb1e91642148f4ef530ad9cc60a343..47b8105134714d900d55e61439c295d496666e23 100644 (file)
@@ -1,16 +1,16 @@
 /** @file\r
   EFI_AUTHENTICATION_INFO_PROTOCOL as defined in UEFI 2.0.\r
-  This protocol is used on any device handle to obtain authentication information \r
+  This protocol is used on any device handle to obtain authentication information\r
   associated with the physical or logical device.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   { \\r
     0x7671d9d0, 0x53db, 0x4173, {0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } \\r
   }\r
-  \r
+\r
 #define EFI_AUTHENTICATION_CHAP_RADIUS_GUID \\r
   { \\r
     0xd6062b50, 0x15ca, 0x11da, {0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \\r
@@ -66,21 +66,21 @@ typedef struct {
   UINT8            NasIpAddr[16];            ///< IPv4 or IPv6 address.\r
 \r
   ///\r
-  /// Network Access Server Secret Length in bytes (OPTIONAL)\r
+  /// Network Access Server Secret Length in bytes (OPTIONAL).\r
   ///\r
-  UINT16           NasSecretLength; \r
+  UINT16           NasSecretLength;\r
 \r
   ///\r
   /// Network Access Server Secret (OPTIONAL).\r
   ///\r
   UINT8            NasSecret[1];\r
 \r
-  /// \r
-  /// CHAP Initiator Secret length in bytes on offset NasSecret + NasSecretLength.\r
+  ///\r
+  /// CHAP Initiator Secret Length in bytes on offset NasSecret + NasSecretLength.\r
   ///\r
   /// UINT16           ChapSecretLength;\r
   ///\r
-  /// CHAP Initiator Secret\r
+  /// CHAP Initiator Secret.\r
   ///\r
   /// UINT8            ChapSecret[];\r
   ///\r
@@ -88,10 +88,26 @@ typedef struct {
   ///\r
   /// UINT16           ChapNameLength;\r
   ///\r
-  /// CHAP Initiator Name\r
+  /// CHAP Initiator Name.\r
   ///\r
   /// UINT8            ChapName[];\r
   ///\r
+  /// Reverse CHAP Name Length in bytes on offset ChapName + ChapNameLength.\r
+  ///\r
+  /// UINT16           ReverseChapNameLength;\r
+  ///\r
+  /// Reverse CHAP Name.\r
+  ///\r
+  /// UINT8            ReverseChapName[];\r
+  ///\r
+  /// Reverse CHAP Secret Length in bytes on offseet ReverseChapName + ReverseChapNameLength.\r
+  ///\r
+  /// UINT16           ReverseChapSecretLength;\r
+  ///\r
+  /// Reverse CHAP Secret.\r
+  ///\r
+  /// UINT8            ReverseChapSecret[];\r
+  ///\r
 } CHAP_RADIUS_AUTH_NODE;\r
 \r
 typedef struct {\r
@@ -117,25 +133,41 @@ typedef struct {
   ///\r
   /// UINT16           UserNameLength;\r
   ///\r
-  /// User Name\r
+  /// User Name.\r
   ///\r
-  /// UINT8            *UserName;\r
+  /// UINT8            UserName[];\r
   ///\r
-  /// CHAP Initiator Secret length in bytes on offset UserName + UserNameLength\r
+  /// CHAP Initiator Secret Length in bytes on offset UserName + UserNameLength.\r
   ///\r
   /// UINT16           ChapSecretLength;\r
   ///\r
-  /// CHAP Initiator Secret\r
+  /// CHAP Initiator Secret.\r
   ///\r
-  /// UINT8            *ChapSecret;\r
+  /// UINT8            ChapSecret[];\r
   ///\r
-  /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength\r
+  /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength.\r
   ///\r
   /// UINT16           ChapNameLength;\r
   ///\r
-  /// CHAP Initiator Name\r
+  /// CHAP Initiator Name.\r
+  ///\r
+  /// UINT8            ChapName[];\r
+  ///\r
+  /// Reverse CHAP Name Length in bytes on offset ChapName + ChapNameLength.\r
+  ///\r
+  /// UINT16           ReverseChapNameLength;\r
+  ///\r
+  /// Reverse CHAP Name.\r
   ///\r
-  /// UINT8            *ChapName;\r
+  /// UINT8            ReverseChapName[];\r
+  ///\r
+  /// Reverse CHAP Secret Length in bytes on offset ReverseChapName + ReverseChapNameLength.\r
+  ///\r
+  /// UINT16           ReverseChapSecretLength;\r
+  ///\r
+  /// Reverse CHAP Secret.\r
+  ///\r
+  /// UINT8            ReverseChapSecret[];\r
   ///\r
 } CHAP_LOCAL_AUTH_NODE;\r
 #pragma pack()\r
@@ -145,22 +177,24 @@ typedef struct {
 \r
   @param[in]  This                  The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.\r
   @param[in]  ControllerHandle      The handle to the Controller.\r
-  @param[out] Buffer                The pointer to the authentication information.\r
+  @param[out] Buffer                The pointer to the authentication information. This function is\r
+                                    responsible for allocating the buffer and it is the caller's\r
+                                    responsibility to free buffer when the caller is finished with buffer.\r
 \r
-  @retval EFI_SUCCESS           Successfully retrieved authentication information \r
+  @retval EFI_SUCCESS           Successfully retrieved authentication information\r
                                 for the given ControllerHandle.\r
-  @retval EFI_INVALID_PARAMETER No matching authentication information found for \r
+  @retval EFI_INVALID_PARAMETER No matching authentication information found for\r
                                 the given ControllerHandle.\r
-  @retval EFI_DEVICE_ERROR      The authentication information could not be retrieved \r
+  @retval EFI_DEVICE_ERROR      The authentication information could not be retrieved\r
                                 due to a hardware error.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET)(\r
+(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_GET)(\r
   IN  EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
-  IN  EFI_HANDLE                       *ControllerHandle,\r
-  OUT VOID                             *Buffer\r
+  IN  EFI_HANDLE                       ControllerHandle,\r
+  OUT VOID                             **Buffer\r
   );\r
 \r
 /**\r
@@ -169,31 +203,31 @@ EFI_STATUS
   @param[in]  This                 The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.\r
   @param[in]  ControllerHandle     The handle to the Controller.\r
   @param[in]  Buffer               The pointer to the authentication information.\r
-                                \r
-  @retval EFI_SUCCESS          Successfully set authentication information for the \r
+\r
+  @retval EFI_SUCCESS          Successfully set authentication information for the\r
                                given ControllerHandle.\r
-  @retval EFI_UNSUPPORTED      If the platform policies do not allow setting of \r
+  @retval EFI_UNSUPPORTED      If the platform policies do not allow setting of\r
                                the authentication information.\r
-  @retval EFI_DEVICE_ERROR     The authentication information could not be configured \r
+  @retval EFI_DEVICE_ERROR     The authentication information could not be configured\r
                                due to a hardware error.\r
   @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET)(\r
+(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_SET)(\r
   IN EFI_AUTHENTICATION_INFO_PROTOCOL  *This,\r
-  IN EFI_HANDLE                        *ControllerHandle,\r
+  IN EFI_HANDLE                        ControllerHandle,\r
   IN VOID                              *Buffer\r
-  );  \r
+  );\r
 \r
 ///\r
-/// This protocol is used on any device handle to obtain authentication \r
+/// This protocol is used on any device handle to obtain authentication\r
 /// information associated with the physical or logical device.\r
 ///\r
 struct _EFI_AUTHENTICATION_INFO_PROTOCOL {\r
-  EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;\r
-  EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;\r
+  EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get;\r
+  EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set;\r
 };\r
 \r
 extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;\r