]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/AuthenticationInfo.h
1. Add TCG MOR (Memory Overwrite request) definition from TCG Platform Reset Attack...
[mirror_edk2.git] / MdePkg / Include / Protocol / AuthenticationInfo.h
index 8f62bc99cf4143b565d0d4070ab804ddb67fedc9..a3c9b973771637a567ffde1c7cd91937939c5c2c 100644 (file)
@@ -34,6 +34,7 @@
 \r
 typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL EFI_AUTHENTICATION_INFO_PROTOCOL;\r
 \r
+#pragma pack(1)\r
 typedef struct {\r
   ///\r
   /// Authentication Type GUID.\r
@@ -52,7 +53,7 @@ typedef struct {
   ///\r
   /// RADIUS Server IPv4 or IPv6 Address\r
   ///\r
-  EFI_IPv6_ADDRESS RadiusIpAddr;             ///< IPv4 or IPv6 address\r
+  UINT8            RadiusIpAddr[16];         ///< IPv4 or IPv6 address\r
 \r
   ///\r
   /// Reserved for future use\r
@@ -62,7 +63,7 @@ typedef struct {
   ///\r
   /// Network Access Server IPv4 or IPv6 Address (OPTIONAL)\r
   ///\r
-  EFI_IPv6_ADDRESS NasIpAddr;                ///< IPv4 or IPv6 address\r
+  UINT8            NasIpAddr[16];            ///< IPv4 or IPv6 address\r
 \r
   ///\r
   /// Network Access Server Secret Length in bytes (OPTIONAL)\r
@@ -70,29 +71,27 @@ typedef struct {
   UINT16           NasSecretLength; \r
 \r
   ///\r
-  /// Network Access Server secret (OPTIONAL)\r
+  /// Network Access Server Secret (OPTIONAL)\r
   ///\r
-  UINT8            *NasSecret;      \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\r
-  ///\r
-  UINT16           ChapSecretLength;\r
-\r
+  /// UINT16           ChapSecretLength;\r
   ///\r
   /// CHAP Initiator Secret\r
   ///\r
-  UINT8            *ChapSecret;\r
-\r
+  /// UINT8            ChapSecret[];\r
   ///\r
-  /// CHAP Initiator Name Length in bytes\r
+  /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength\r
   ///\r
-  UINT16           ChapNameLength;\r
-\r
+  /// UINT16           ChapNameLength;\r
   ///\r
   /// CHAP Initiator Name\r
   ///\r
-  UINT8            *ChapName;\r
+  /// UINT8            ChapName[];\r
+  ///\r
 } CHAP_RADIUS_AUTH_NODE;\r
 \r
 typedef struct {\r
@@ -111,48 +110,45 @@ typedef struct {
   ///\r
   /// User Secret\r
   ///\r
-  UINT8            *UserSecret;     \r
+  UINT8            UserSecret[1];\r
 \r
   ///\r
-  /// User Name Length in bytes\r
+  /// User Name Length in bytes on offset UserSecret + UserSecretLength\r
   ///\r
-  UINT16           UserNameLength;\r
-\r
+  /// UINT16           UserNameLength;\r
   ///\r
   /// User Name\r
   ///\r
-  UINT8            *UserName;\r
-\r
+  /// UINT8            *UserName;\r
   ///\r
-  /// CHAP Initiator Secret length in bytes\r
+  /// CHAP Initiator Secret length in bytes on offset UserName + UserNameLength\r
   ///\r
-  UINT16           ChapSecretLength;\r
-\r
+  /// UINT16           ChapSecretLength;\r
   ///\r
   /// CHAP Initiator Secret\r
   ///\r
-  UINT8            *ChapSecret;\r
-\r
+  /// UINT8            *ChapSecret;\r
   ///\r
-  /// CHAP Initiator Name Length in bytes\r
+  /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength\r
   ///\r
-  UINT16           ChapNameLength;\r
-\r
+  /// UINT16           ChapNameLength;\r
   ///\r
   /// CHAP Initiator Name\r
   ///\r
-  UINT8            *ChapName;\r
+  /// UINT8            *ChapName;\r
+  ///\r
 } CHAP_LOCAL_AUTH_NODE;\r
+#pragma pack()\r
 \r
 /**\r
-  Retrieves the Authentication information associated with a particular controller handle.\r
+  Retrieves the authentication information associated with a particular controller handle.\r
 \r
-  @param  This                  Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL\r
-  @param  ControllerHandle      Handle to the Controller\r
-  @param  Buffer                Pointer to the authentication information.\r
+  @param[in]  This                  Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL\r
+  @param[in]  ControllerHandle      Handle to the Controller\r
+  @param[out] Buffer                Pointer to the authentication information.\r
 \r
-  @retval EFI_SUCCESS           Successfully retrieved Authentication information for the given ControllerHandle\r
-  @retval EFI_INVALID_PARAMETER No matching Authentication information found for the given ControllerHandle\r
+  @retval EFI_SUCCESS           Successfully retrieved authentication information for the given ControllerHandle\r
+  @retval EFI_INVALID_PARAMETER No matching authentication information found for the given ControllerHandle\r
   @retval EFI_DEVICE_ERROR      The authentication information could not be retrieved due to a\r
                                 hardware error.\r
 \r
@@ -163,17 +159,17 @@ EFI_STATUS
   IN  EFI_AUTHENTICATION_INFO_PROTOCOL *This,\r
   IN  EFI_HANDLE                       *ControllerHandle,\r
   OUT VOID                             *Buffer\r
-  );  \r
+  );\r
 \r
 /**\r
-  Set the Authentication information for a given controller handle.\r
+  Set the authentication information for a given controller handle.\r
 \r
-  @param  This                 Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL\r
-  @param  ControllerHandle     Handle to the Controller\r
-  @param  Buffer               Pointer to the authentication information.\r
+  @param[in]  This                 Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL\r
+  @param[in]  ControllerHandle     Handle to the Controller\r
+  @param[in]  Buffer               Pointer to the authentication information.\r
                                 \r
-  @retval EFI_SUCCESS          Successfully set Authentication information for the given ControllerHandle\r
-  @retval EFI_UNSUPPORTED      If the platform policies do not allow setting of the Authentication\r
+  @retval EFI_SUCCESS          Successfully set authentication information for the given ControllerHandle\r
+  @retval EFI_UNSUPPORTED      If the platform policies do not allow setting of the authentication\r
                                information.\r
   @retval EFI_DEVICE_ERROR     The authentication information could not be configured due to a\r
                                hardware error.\r