]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Added definitions of EFI EAP Protocol, EFI EAP Management Protocol and EFI FTPv4...
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Aug 2009 09:15:18 +0000 (09:15 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Aug 2009 09:15:18 +0000 (09:15 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9200 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Protocol/Eap.h [new file with mode: 0644]
MdePkg/Include/Protocol/EapManagement.h [new file with mode: 0644]
MdePkg/Include/Protocol/Ftp4.h [new file with mode: 0644]
MdePkg/MdePkg.dec

diff --git a/MdePkg/Include/Protocol/Eap.h b/MdePkg/Include/Protocol/Eap.h
new file mode 100644 (file)
index 0000000..99c2b86
--- /dev/null
@@ -0,0 +1,151 @@
+/** @file\r
+  EFI EAP(Extended Authenticaton Protocol) Protocol Definition\r
+  The EFI EAP Protocol is used to abstract the ability to configure and extend the\r
+  EAP framework. \r
+  The definitions in this file are defined in UEFI Specification 2.3, which have\r
+  not been verified by one implementation yet.\r
+\r
+  Copyright (c) 2009, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  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
+\r
+**/\r
+\r
+#ifndef __EFI_EAP_PROTOCOL_H__\r
+#define __EFI_EAP_PROTOCOL_H__\r
+\r
+\r
+#define EFI_EAP_PROTOCOL_GUID \\r
+  { \\r
+    0x5d9f96db, 0xe731, 0x4caa, {0xa0, 0xd, 0x72, 0xe1, 0x87, 0xcd, 0x77, 0x62 } \\r
+  }\r
+\r
+typedef struct _EFI_EAP_PROTOCOL EFI_EAP_PROTOCOL;\r
+\r
+///\r
+/// Type for the identification number assigned to the Port by the  \r
+/// System in which the Port resides.\r
+///\r
+typedef VOID *  EFI_PORT_HANDLE;\r
+\r
+///\r
+/// EAP Authentication Method Type (RFC 2284 Section 3)\r
+///@{\r
+#define EFI_EAP_TYPE_MD5                0x4   ///< REQUIRED\r
+#define EFI_EAP_TYPE_OTP                0x5   ///< OPTIONAL\r
+#define EFI_EAP_TYPE_TOKEN_CARD         0x6   ///< OPTIONAL\r
+///@}\r
+\r
+\r
+/**\r
+  One user provided EAP authentication method.\r
+\r
+  Build EAP response packet in response to the EAP request packet specified by\r
+  (RequestBuffer, RequestSize).\r
+\r
+  @param[in]      PortNumber     Specified the Port where the EAP request packet comes.\r
+  @param[in]      RequestBuffer  Pointer to the most recently received EAP- Request packet.\r
+  @param[in]      RequestSize    Packet size in bytes for the most recently received\r
+                                 EAP-Request packet.\r
+  @param[in]      Buffer         Pointer to the buffer to hold the built packet.\r
+  @param[in, out] BufferSize     Pointer to the buffer size in bytes. \r
+                                 On input, it is the buffer size provided by the caller.\r
+                                 On output, it is the buffer size in fact needed to contain\r
+                                 the packet.\r
+\r
+  @retval EFI_SUCCESS            The required EAP response packet is built successfully.\r
+  @retval others                 Failures are encountered during the packet building process.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_BUILD_RESPONSE_PACKET)(\r
+  IN EFI_PORT_HANDLE        PortNumber,\r
+  IN UINT8                  *RequestBuffer, \r
+  IN UINTN                  RequestSize, \r
+  IN UINT8                  *Buffer, \r
+  IN OUT UINTN              *BufferSize\r
+  );\r
+\r
+/**\r
+  Set the desired EAP authentication method for the Port.\r
+\r
+  The SetDesiredAuthMethod() function sets the desired EAP authentication method indicated \r
+  by EapAuthType for the Port.\r
+  \r
+  If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is \r
+  returned.\r
+  If the EAP authentication method of EapAuthType is unsupported by the Ports, then this\r
+  function will return EFI_UNSUPPORTED.\r
+\r
+  @param[in] This                A pointer to the EFI_EAP_PROTOCOL instance that indicates \r
+                                 the calling context.\r
+  @param[in] EapAuthType         The type of the EAP authentication method to register. It should \r
+                                 be the type value defined by RFC. See RFC 2284 for details.\r
+  @param[in] Handler             The handler of the EAP authentication method to register.\r
+\r
+  @retval EFI_SUCCESS            The EAP authentication method of EapAuthType is \r
+                                 registered successfully.\r
+  @retval EFI_INVALID_PARAMETER  EapAuthType is an invalid EAP authentication type.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough system memory to perform the registration.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD)(\r
+  IN struct _EFI_EAP_PROTOCOL    *This, \r
+  IN UINT8                       EapAuthType\r
+  );\r
+\r
+/**\r
+  Register an EAP authentication method. \r
+\r
+  The RegisterAuthMethod() function registers the user provided EAP authentication method, \r
+  the type of which is EapAuthType and the handler of which is Handler. \r
+  \r
+  If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is \r
+  returned.\r
+  If there is not enough system memory to perform the registration, then \r
+  EFI_OUT_OF_RESOURCES is returned.\r
+\r
+  @param[in] This                A pointer to the EFI_EAP_PROTOCOL instance that indicates \r
+                                 the calling context.\r
+  @param[in] EapAuthType         The type of the EAP authentication method to register. It should \r
+                                 be the type value defined by RFC. See RFC 2284 for details.\r
+  @param[in] Handler             The handler of the EAP authentication method to register.\r
+\r
+  @retval EFI_SUCCESS            The EAP authentication method of EapAuthType is \r
+                                 registered successfully.\r
+  @retval EFI_INVALID_PARAMETER  EapAuthType is an invalid EAP authentication type.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough system memory to perform the registration.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_REGISTER_AUTHENTICATION_METHOD)(\r
+  IN struct _EFI_EAP_PROTOCOL             *This, \r
+  IN UINT8                                EapAuthType, \r
+  IN EFI_EAP_BUILD_RESPONSE_PACKET        Handler\r
+  );\r
+\r
+///\r
+/// EFI_EAP_PROTOCOL \r
+/// is used to configure the desired EAP authentication method for the EAP \r
+/// framework and extend the EAP framework by registering new EAP authentication\r
+/// method on a Port. The EAP framework is built on a per-Port basis. Herein, a\r
+/// Port means a NIC. For the details of EAP protocol, please refer to RFC 2284. \r
+///\r
+struct _EFI_EAP_PROTOCOL {\r
+  EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD   SetDesiredAuthMethod;\r
+  EFI_EAP_REGISTER_AUTHENTICATION_METHOD      RegisterAuthMethod;\r
+};\r
+\r
+extern EFI_GUID gEfiEapProtocolGuid;\r
+\r
+#endif\r
+\r
diff --git a/MdePkg/Include/Protocol/EapManagement.h b/MdePkg/Include/Protocol/EapManagement.h
new file mode 100644 (file)
index 0000000..fc67a15
--- /dev/null
@@ -0,0 +1,400 @@
+/** @file\r
+  EFI EAP Management Protocol Definition\r
+  The EFI EAP Management Protocol is designed to provide ease of management and\r
+  ease of test for EAPOL state machine. It is intended for the supplicant side. \r
+  It conforms to IEEE 802.1x specification. \r
+  The definitions in this file are defined in UEFI Specification 2.3, which have\r
+  not been verified by one implementation yet.\r
+\r
+  Copyright (c) 2009, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  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
+\r
+**/\r
+\r
+#ifndef __EFI_EAP_MANAGEMENT_PROTOCOL_H__\r
+#define __EFI_EAP_MANAGEMENT_PROTOCOL_H__\r
+\r
+#include <Protocol/Eap.h>\r
+\r
+#define EFI_EAP_MANAGEMENT_PROTOCOL_GUID \\r
+  { \\r
+    0xbb62e663, 0x625d, 0x40b2, {0xa0, 0x88, 0xbb, 0xe8, 0x36, 0x23, 0xa2, 0x45 } \\r
+  }\r
+\r
+typedef struct _EFI_EAP_MANAGEMENT_PROTOCOL EFI_EAP_MANAGEMENT_PROTOCOL;\r
+\r
+///\r
+/// PAE Capabilities\r
+///\r
+///@{\r
+#define PAE_SUPPORT_AUTHENTICATOR       0x01\r
+#define PAE_SUPPORT_SUPPLICANT          0x02\r
+///@}\r
+\r
+///\r
+/// EFI_EAPOL_PORT_INFO\r
+///\r
+typedef struct _EFI_EAPOL_PORT_INFO {      \r
+  /// \r
+  /// The identification number assigned to the Port by the System in \r
+  /// which the Port resides.\r
+  /// \r
+  EFI_PORT_HANDLE     PortNumber;\r
+  /// \r
+  /// The protocol version number of the EAPOL implementation \r
+  /// supported by the Port. \r
+  /// \r
+  UINT8               ProtocolVersion;\r
+  /// \r
+  /// The capabilities of the PAE associated with the Port. This field \r
+  /// indicates whether Authenticator functionality, Supplicant \r
+  /// functionality, both, or neither, is supported by the Port's PAE.\r
+  /// \r
+  UINT8               PaeCapabilities;\r
+} EFI_EAPOL_PORT_INFO;\r
+\r
+///\r
+/// Supplicant PAE state machine (IEEE Std 802.1X Section 8.5.10)\r
+///\r
+typedef enum _EFI_EAPOL_SUPPLICANT_PAE_STATE {\r
+  Logoff,\r
+  Disconnected,\r
+  Connecting,\r
+  Acquired,\r
+  Authenticating,\r
+  Held,\r
+  Authenticated,\r
+  MaxSupplicantPaeState\r
+} EFI_EAPOL_SUPPLICANT_PAE_STATE;\r
+\r
+///\r
+/// Definitions for ValidFieldMask \r
+///\r
+///@{\r
+#define AUTH_PERIOD_FIELD_VALID       0x01\r
+#define HELD_PERIOD_FIELD_VALID       0x02\r
+#define START_PERIOD_FIELD_VALID      0x04\r
+#define MAX_START_FIELD_VALID         0x08\r
+///@}\r
+\r
+///\r
+/// EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION\r
+///\r
+typedef struct _EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION {\r
+  /// \r
+  /// Indicates which of the following fields are valid.\r
+  /// \r
+  UINT8       ValidFieldMask;  \r
+  ///\r
+  /// The initial value for the authWhile timer. Its default value is 30s.\r
+  ///\r
+  UINTN       AuthPeriod;   \r
+  ///\r
+  /// The initial value for the heldWhile timer. Its default value is 60s. \r
+  ///\r
+  UINTN       HeldPeriod;    \r
+  ///\r
+  /// The initial value for the startWhen timer. Its default value is 30s. \r
+  ///\r
+  UINTN       StartPeriod;    \r
+  ///   \r
+  /// The maximum number of successive EAPOL-Start messages will \r
+  /// be sent before the Supplicant assumes that there is no \r
+  /// Authenticator present. Its default value is 3.\r
+  /// \r
+  UINTN       MaxStart;\r
+} EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION;\r
+\r
+///\r
+/// Supplicant Statistics (IEEE Std 802.1X Section 9.5.2)\r
+///\r
+typedef struct _EFI_EAPOL_SUPPLICANT_PAE_STATISTICS {\r
+  ///\r
+  /// The number of EAPOL frames of any type that have been received by this Supplican.\r
+  /// \r
+  UINTN     EapolFramesReceived;\r
+  ///\r
+  /// The number of EAPOL frames of any type that have been transmitted by this Supplicant. \r
+  ///\r
+  UINTN     EapolFramesTransmitted;\r
+  /// \r
+  /// The number of EAPOL Start frames that have been transmitted by this Supplicant. \r
+  /// \r
+  UINTN     EapolStartFramesTransmitted;\r
+  /// \r
+  /// The number of EAPOL Logoff frames that have been transmitted by this Supplicant.\r
+  ///\r
+  UINTN     EapolLogoffFramesTransmitted;\r
+  ///\r
+  /// The number of EAP Resp/Id frames that have been transmitted by this Supplicant.\r
+  ///\r
+  UINTN     EapRespIdFramesTransmitted;\r
+  ///   \r
+  /// The number of valid EAP Response frames (other than Resp/Id frames) that have been \r
+  /// transmitted by this Supplicant.\r
+  ///\r
+  UINTN     EapResponseFramesTransmitted;\r
+  /// \r
+  /// The number of EAP Req/Id frames that have been received by this Supplicant.\r
+  /// \r
+  UINTN     EapReqIdFramesReceived;\r
+  ///\r
+  /// The number of EAP Request frames (other than Rq/Id frames) that have been received \r
+  /// by this Supplicant.\r
+  ///\r
+  UINTN     EapRequestFramesReceived;\r
+  ///\r
+  /// The number of EAPOL frames that have been received by this Supplicant in which the \r
+  /// frame type is not recognized.\r
+  ///\r
+  UINTN     InvalidEapolFramesReceived;\r
+  /// \r
+  /// The number of EAPOL frames that have been received by this Supplicant in which the \r
+  /// Packet Body Length field (7.5.5) is invalid.\r
+  /// \r
+  UINTN     EapLengthErrorFramesReceived;\r
+  /// \r
+  /// The protocol version number carried in the most recently received EAPOL frame.\r
+  /// \r
+  UINTN     LastEapolFrameVersion;\r
+  /// \r
+  /// The source MAC address carried in the most recently received EAPOL frame.\r
+  /// \r
+  UINTN     LastEapolFrameSource;\r
+} EFI_EAPOL_SUPPLICANT_PAE_STATISTICS;\r
+\r
+/**\r
+  Read the system configuration information associated with the Port. \r
+\r
+  The GetSystemConfiguration() function reads the system configuration\r
+  information associated with the Port, including the value of the \r
+  SystemAuthControl parameter of the System is returned in SystemAuthControl\r
+  and the Port's information is returned in the buffer pointed to by PortInfo.\r
+  The Port's information is optional. \r
+  If PortInfo is NULL, then reading the Port's information is ignored.\r
+\r
+  If SystemAuthControl is NULL, then EFI_INVALID_PARAMETER is returned.\r
+\r
+  @param[in]  This               A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
+                                 instance that indicates the calling context.\r
+  @param[out] SystemAuthControl  Returns the value of the SystemAuthControl\r
+                                 parameter of the System. \r
+                                 TRUE means Enabled. FALSE means Disabled.\r
+  @param[out] PortInfo           Returns EFI_EAPOL_PORT_INFO structure to describe\r
+                                 the Port's information. This parameter can be NULL\r
+                                 to ignore reading the Port's information.\r
+\r
+  @retval EFI_SUCCESS            The system configuration information of the\r
+                                 Port is read successfully.\r
+  @retval EFI_INVALID_PARAMETER  SystemAuthControl is NULL.\r
+\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_GET_SYSTEM_CONFIGURATION)(\r
+  IN struct _EFI_EAP_MANAGEMENT_PROTOCOL  *This, \r
+  OUT BOOLEAN                             *SystemAuthControl, \r
+  OUT EFI_EAPOL_PORT_INFO                 *PortInfo OPTIONAL\r
+  );\r
+\r
+/**\r
+  Set the system configuration information associated with the Port. \r
+\r
+  The SetSystemConfiguration() function sets the value of the SystemAuthControl \r
+  parameter of the System to SystemAuthControl.\r
+\r
+  @param[in] This                A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
+                                 instance that indicates the calling context.\r
+  @param[in] SystemAuthControl   The desired value of the SystemAuthControl \r
+                                 parameter of the System. \r
+                                 TRUE means Enabled. FALSE means Disabled.\r
+\r
+  @retval EFI_SUCCESS            The system configuration information of the\r
+                                 Port is set successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_SET_SYSTEM_CONFIGURATION)(\r
+  IN struct _EFI_EAP_MANAGEMENT_PROTOCOL  *This, \r
+  IN BOOLEAN                              SystemAuthControl\r
+  );\r
+\r
+/**\r
+  Cause the EAPOL state machines for the Port to be initialized.\r
+\r
+  The InitializePort() function causes the EAPOL state machines for the Port.\r
+\r
+  @param[in] This                A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
+                                 instance that indicates the calling context.\r
+\r
+  @retval EFI_SUCCESS            The Port is initialized successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_INITIALIZE_PORT)(\r
+  IN struct _EFI_EAP_MANAGEMENT_PROTOCOL  *This\r
+  );\r
+\r
+/**\r
+  Notify the EAPOL state machines for the Port that the user of the System has\r
+  logged on.\r
+\r
+  The UserLogon() function notifies the EAPOL state machines for the Port.\r
+\r
+  @param[in] This                A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
+                                 instance that indicates the calling context.\r
+\r
+  @retval EFI_SUCCESS            The Port is notified successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_USER_LOGON)(\r
+  IN struct _EFI_EAP_MANAGEMENT_PROTOCOL  *This\r
+  );\r
+\r
+/**\r
+  Notify the EAPOL state machines for the Port that the user of the System has \r
+  logged off.\r
+\r
+  The UserLogoff() function notifies the EAPOL state machines for the Port.\r
+\r
+  @param[in] This                A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
+                                 instance that indicates the calling context.\r
+\r
+  @retval EFI_SUCCESS            The Port is notified successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_USER_LOGOFF)(\r
+  IN struct _EFI_EAP_MANAGEMENT_PROTOCOL  *This\r
+  );\r
+\r
+/**\r
+  Read the status of the Supplicant PAE state machine for the Port, including the\r
+  current state and the configuration of the operational parameters.\r
+\r
+  The GetSupplicantStatus() function reads the status of the Supplicant PAE state\r
+  machine for the Port, including the current state CurrentState  and the configuration\r
+  of the operational parameters Configuration. The configuration of the operational\r
+  parameters is optional. If Configuration is NULL, then reading the configuration \r
+  is ignored. The operational parameters in Configuration to be read can also be \r
+  specified by Configuration.ValidFieldMask.\r
+\r
+  If CurrentState is NULL, then EFI_INVALID_PARAMETER is returned.\r
+\r
+  @param[in]      This           A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
+                                 instance that indicates the calling context.\r
+  @param[out]     CurrentState   Returns the current state of the Supplicant PAE\r
+                                 state machine for the Port.\r
+  @param[in, out] Configuration  Returns the configuration of the operational\r
+                                 parameters of the Supplicant PAE state machine\r
+                                 for the Port as required. This parameter can be\r
+                                 NULL to ignore reading the configuration. \r
+                                 On input, Configuration.ValidFieldMask specifies the \r
+                                 operational parameters to be read.\r
+                                 On output, Configuration returns the configuration\r
+                                 of the required operational parameters. \r
+\r
+  @retval EFI_SUCCESS            The configuration of the operational parameter\r
+                                 of the Supplicant PAE state machine for the Port\r
+                                 is set successfully.\r
+  @retval EFI_INVALID_PARAMETER  CurrentState is NULL.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_GET_SUPPLICANT_STATUS)(\r
+  IN struct _EFI_EAP_MANAGEMENT_PROTOCOL          *This, \r
+  OUT EFI_EAPOL_SUPPLICANT_PAE_STATE              *CurrentState, \r
+  IN OUT EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION   *Configuration  OPTIONAL\r
+  );\r
+\r
+/**\r
+  Set the configuration of the operational parameter of the Supplicant PAE \r
+  state machine for the Port.\r
+\r
+  The SetSupplicantConfiguration() function sets the configuration of the \r
+  operational Parameter of the Supplicant PAE state machine for the Port to\r
+  Configuration. The operational parameters in Configuration to be set can be\r
+  specified by Configuration.ValidFieldMask.\r
+\r
+  If Configuration is NULL, then EFI_INVALID_PARAMETER is returned.\r
+\r
+  @param[in] This                A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
+                                 instance that indicates the calling context.\r
+  @param[in] Configuration       The desired configuration of the operational \r
+                                 parameters of the Supplicant PAE state machine\r
+                                 for the Port as required.\r
+\r
+  @retval EFI_SUCCESS            The configuration of the operational parameter\r
+                                 of the Supplicant PAE state machine for the Port\r
+                                 is set successfully.\r
+  @retval EFI_INVALID_PARAMETER  Configuration is NULL.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_SET_SUPPLICANT_CONFIGURATION)(\r
+  IN struct _EFI_EAP_MANAGEMENT_PROTOCOL      *This, \r
+  IN EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION   *Configuration\r
+  );\r
+\r
+/**\r
+  Read the statistical information regarding the operation of the Supplicant\r
+  associated with the Port. \r
+\r
+  The GetSupplicantStatistics() function reads the statistical information \r
+  Statistics regarding the operation of the Supplicant associated with the Port.\r
+  \r
+  If Statistics is NULL, then EFI_INVALID_PARAMETER is returned.\r
+\r
+  @param[in]  This               A pointer to the EFI_EAP_MANAGEMENT_PROTOCOL\r
+                                 instance that indicates the calling context.\r
+  @param[out] Statistics         Returns the statistical information regarding the \r
+                                 operation of the Supplicant for the Port. \r
+\r
+  @retval EFI_SUCCESS            The statistical information regarding the operation\r
+                                 of the Supplicant for the Port is read successfully.\r
+  @retval EFI_INVALID_PARAMETER  Statistics is NULL.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_GET_SUPPLICANT_STATISTICS)(\r
+  IN struct _EFI_EAP_MANAGEMENT_PROTOCOL      *This, \r
+  OUT EFI_EAPOL_SUPPLICANT_PAE_STATISTICS     *Statistics\r
+  );\r
+\r
+///\r
+/// EFI_EAP_MANAGEMENT_PROTOCOL \r
+/// is used to control, configure and monitor EAPOL state machine on\r
+/// a Port. EAPOL state machine is built on a per-Port basis. Herein,\r
+/// a Port means a NIC. For the details of EAPOL, please refer to \r
+/// IEEE 802.1x specification.\r
+///\r
+struct _EFI_EAP_MANAGEMENT_PROTOCOL {\r
+  EFI_EAP_GET_SYSTEM_CONFIGURATION        GetSystemConfiguration;\r
+  EFI_EAP_SET_SYSTEM_CONFIGURATION        SetSystemConfiguration;\r
+  EFI_EAP_INITIALIZE_PORT                 InitializePort;\r
+  EFI_EAP_USER_LOGON                      UserLogon;\r
+  EFI_EAP_USER_LOGOFF                     UserLogoff;\r
+  EFI_EAP_GET_SUPPLICANT_STATUS           GetSupplicantStatus;\r
+  EFI_EAP_SET_SUPPLICANT_CONFIGURATION    SetSupplicantConfiguration;\r
+  EFI_EAP_GET_SUPPLICANT_STATISTICS       GetSupplicantStatistics;\r
+};\r
+\r
+extern EFI_GUID gEfiEapManagementProtocolGuid;\r
+\r
+#endif\r
+\r
diff --git a/MdePkg/Include/Protocol/Ftp4.h b/MdePkg/Include/Protocol/Ftp4.h
new file mode 100644 (file)
index 0000000..26e158c
--- /dev/null
@@ -0,0 +1,521 @@
+/** @file\r
+  EFI FTPv4 (File Transfer Protocol version 4) Protocol Definition\r
+  The EFI FTPv4 Protocol is used to locate communication devices that are \r
+  supported by an EFI FTPv4 Protocol driver and to create and destroy instances\r
+  of the EFI FTPv4 Protocol child protocol driver that can use the underlying\r
+  communication device.\r
+  The definitions in this file are defined in UEFI Specification 2.3, which have\r
+  not been verified by one implementation yet.\r
+\r
+  Copyright (c) 2009, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  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
+\r
+**/\r
+\r
+#ifndef __EFI_FTP4_PROTOCOL_H__\r
+#define __EFI_FTP4_PROTOCOL_H__\r
+\r
+\r
+#define EFI_FTP4_SERVICE_BINDING_PROTOCOL_GUID \\r
+  { \\r
+    0xfaaecb1, 0x226e, 0x4782, {0xaa, 0xce, 0x7d, 0xb9, 0xbc, 0xbf, 0x4d, 0xaf } \\r
+  }\r
+\r
+#define EFI_FTP4_PROTOCOL_GUID \\r
+  { \\r
+    0xeb338826, 0x681b, 0x4295, {0xb3, 0x56, 0x2b, 0x36, 0x4c, 0x75, 0x7b, 0x9 } \\r
+  }\r
+\r
+typedef struct _EFI_FTP4_PROTOCOL EFI_FTP4_PROTOCOL;\r
+\r
+///\r
+/// EFI_FTP4_CONNECTION_TOKEN\r
+///\r
+typedef struct {\r
+  /// \r
+  /// The Event to signal after the connection is established and Status field is updated \r
+  /// by the EFI FTP v4 Protocol driver. The type of Event must be \r
+  /// EVENT_NOTIFY_SIGNAL, and its Task Priority Level (TPL) must be lower than or \r
+  /// equal to TPL_CALLBACK. If it is set to NULL, this function will not return  until the \r
+  /// function completes.\r
+  /// \r
+  EFI_EVENT                            Event; \r
+  ///\r
+  /// The variable to receive the result of the completed operation.\r
+  /// EFI_SUCCESS:              The FTP connection is established successfully\r
+  /// EFI_ACCESS_DENIED:        The FTP server denied the access the user's request to access it. \r
+  /// EFI_CONNECTION_RESET:     The connect fails because the connection is reset either by instance \r
+  ///                           itself or communication peer.\r
+  /// EFI_TIMEOUT:              The connection establishment timer expired and no more specific \r
+  ///                           information is available.\r
+  /// EFI_NETWORK_UNREACHABLE:  The active open fails because an ICMP network unreachable error is \r
+  ///                           received. \r
+  /// EFI_HOST_UNREACHABLE:     The active open fails because an ICMP host unreachable error is \r
+  ///                           received. \r
+  /// EFI_PROTOCOL_UNREACHABLE: The active open fails because an ICMP protocol unreachable error is \r
+  ///                           received.\r
+  /// EFI_PORT_UNREACHABLE:     The connection establishment timer times out and an ICMP port \r
+  ///                           unreachable error is received.\r
+  /// EFI_ICMP_ERROR:           The connection establishment timer timeout and some other ICMP \r
+  ///                           error is received.\r
+  /// EFI_DEVICE_ERROR:         An unexpected system or network error occurred.\r
+  /// \r
+  EFI_STATUS                           Status;\r
+} EFI_FTP4_CONNECTION_TOKEN;\r
+\r
+///\r
+/// EFI_FTP4_CONFIG_DATA \r
+///\r
+typedef struct {\r
+  /// \r
+  /// Pointer to a ASCII string that contains user name. The caller is \r
+  /// responsible for freeing Username after GetModeData() is called.\r
+  /// \r
+  UINT8                                *Username;\r
+  /// \r
+  /// Pointer to a ASCII string that contains password. The caller is \r
+  /// responsible for freeing Password after GetModeData() is called.\r
+  /// \r
+  UINT8                                *Password;\r
+  /// \r
+  /// Set it to TRUE to initiate an active data connection. Set it to \r
+  /// FALSE to initiate a passive data connection.\r
+  /// \r
+  BOOLEAN                              Active;\r
+  /// \r
+  /// Boolean value indicating if default network settting used.\r
+  /// \r
+  BOOLEAN                              UseDefaultSetting;\r
+  /// \r
+  /// IP address of station if UseDefaultSetting is FALSE.\r
+  /// \r
+  EFI_IPv4_ADDRESS                     StationIp;\r
+  /// \r
+  /// Subnet mask of station if UseDefaultSetting is FALSE.\r
+  /// \r
+  EFI_IPv4_ADDRESS                     SubnetMask;\r
+  /// \r
+  /// IP address of gateway if UseDefaultSetting is FALSE.\r
+  /// \r
+  EFI_IPv4_ADDRESS                     GatewayIp;\r
+  /// \r
+  /// IP address of FTPv4 server.\r
+  /// \r
+  EFI_IPv4_ADDRESS                     ServerIp;\r
+  /// \r
+  /// FTPv4 server port number of control connection, and the default \r
+  /// value is 21 as convention.\r
+  /// \r
+  UINT16                               ServerPort;\r
+  /// \r
+  /// FTPv4 server port number of data connection. If it is zero, use \r
+  /// (ServerPort - 1) by convention. \r
+  /// \r
+  UINT16                               AltDataPort;\r
+  /// \r
+  /// A byte indicate the representation type. The right 4 bit is used for \r
+  /// first parameter, the left 4 bit is use for second parameter\r
+  /// - For the first parameter, 0x0 = image, 0x1 = EBCDIC, 0x2 = ASCII, 0x3 = local\r
+  /// - For the second parameter, 0x0 = Non-print, 0x1 = Telnet format effectors, 0x2 = \r
+  ///   Carriage Control.\r
+  /// - If it is a local type, the second parameter is the local byte byte size.\r
+  /// - If it is a image type, the second parameter is undefined.\r
+  /// \r
+  UINT8                                RepType;\r
+  /// \r
+  /// Defines the file structure in FTP used. 0x00 = file, 0x01 = record, 0x02 = page.\r
+  /// \r
+  UINT8                                FileStruct;\r
+  /// \r
+  /// Defines the transifer mode used in FTP. 0x00 = stream, 0x01 = Block, 0x02 = Compressed.\r
+  /// \r
+  UINT8                                TransMode;\r
+} EFI_FTP4_CONFIG_DATA;\r
+\r
+typedef struct _EFI_FTP4_COMMAND_TOKEN EFI_FTP4_COMMAND_TOKEN;\r
+\r
+/**\r
+  Callback function when process inbound or outbound data.\r
+\r
+  If it is receiving function that leads to inbound data, the callback function\r
+  is called when data buffer is full. Then, old data in the data buffer should be\r
+  flushed and new data is stored from the beginning of data buffer.\r
+  If it is a transmit function that lead to outbound data and the size of \r
+  Data in daata buffer has been transmitted, this callback function is called to \r
+  supply additional data to be transmitted. \r
+\r
+  @param[in] This                Pointer to the EFI_FTP4_PROTOCOL instance.\r
+  @param[in] Token               Pointer to the token structure to provide the parameters that\r
+                                 are used in this operation.\r
+  @return  User defined Status.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS \r
+(EFIAPI *EFI_FTP4_DATA_CALLBACK)( \r
+  IN EFI_FTP4_PROTOCOL           *This,\r
+  IN EFI_FTP4_COMMAND_TOKEN      *Token\r
+  );\r
+\r
+///\r
+/// EFI_FTP4_COMMAND_TOKEN\r
+///\r
+struct _EFI_FTP4_COMMAND_TOKEN {\r
+  /// \r
+  /// The Event to signal after request is finished and Status field \r
+  /// is updated by the EFI FTP v4 Protocol driver. The type of Event \r
+  /// must be EVT_NOTIFY_SIGNAL, and its Task Priority Level \r
+  /// (TPL) must be lower than or equal to TPL_CALLBACK. If it is \r
+  /// set to NULL, related function must wait until the function \r
+  /// completes.\r
+  /// \r
+  EFI_EVENT                             Event; \r
+  /// \r
+  /// Pointer to an ASCIIZ path name string. \r
+  /// \r
+  UINT8                                 *Pathname;\r
+  /// \r
+  /// The size of data buffer in bytes.\r
+  /// \r
+  UINT64                                DataBufferSize;        \r
+  /// \r
+  /// Pointer to the data buffer. Data downloaded from FTP server \r
+  /// through connection is downloaded here.\r
+  /// \r
+  VOID                                  *DataBuffer;\r
+  /// \r
+  /// Pointer to a callback function. If it is receiving function that leads \r
+  /// to inbound data, the callback function is called when databuffer is \r
+  /// full. Then, old data in the data buffer should be flushed and new \r
+  /// data is stored from the beginning of data buffer. If it is a transmit \r
+  /// function that lead to outbound data and DataBufferSize of \r
+  /// Data in DataBuffer has been transmitted, this callback \r
+  /// function is called to supply additional data to be transmitted. The \r
+  /// size of additional data to be transmitted is indicated in \r
+  /// DataBufferSize, again. If there is no data remained, \r
+  /// DataBufferSize should be set to 0.\r
+  /// \r
+  EFI_FTP4_DATA_CALLBACK                *DataCallback;\r
+  /// \r
+  /// Pointer to the parameter for DataCallback.\r
+  /// \r
+  VOID                                  *Context;\r
+  /// \r
+  /// The variable to receive the result of the completed operation.\r
+  /// EFI_SUCCESS:              The FTP command is completed successfully.\r
+  /// EFI_ACCESS_DENIED:        The FTP server denied the access to the requested file.\r
+  /// EFI_CONNECTION_RESET:     The connect fails because the connection is reset either\r
+  ///                           by instance itself or communication peer.\r
+  /// EFI_TIMEOUT:              The connection establishment timer expired and no more \r
+  ///                           specific information is available.\r
+  /// EFI_NETWORK_UNREACHABLE:  The active open fails because an ICMP network unreachable\r
+  ///                           error is received. \r
+  /// EFI_HOST_UNREACHABLE:     The active open fails because an ICMP host unreachable\r
+  ///                           error is received. \r
+  /// EFI_PROTOCOL_UNREACHABLE: The active open fails because an ICMP protocol unreachable\r
+  ///                           error is received.\r
+  /// EFI_PORT_UNREACHABLE:     The connection establishment timer times out and an ICMP port\r
+  ///                           unreachable error is received.\r
+  /// EFI_ICMP_ERROR:           The connection establishment timer timeout and some other ICMP\r
+  ///                           error is received.\r
+  /// EFI_DEVICE_ERROR:         An unexpected system or network error occurred.\r
+  ///\r
+  EFI_STATUS                            Status;\r
+};\r
+\r
+/**\r
+  Gets the current operational settings.\r
+\r
+  The GetModeData() function reads the current operational settings of this\r
+  EFI FTPv4 Protocol driver instance. EFI_FTP4_CONFIG_DATA  is defined in the \r
+  EFI_FTP4_PROTOCOL.Configure.\r
+\r
+  @param[in]  This               Pointer to the EFI_FTP4_PROTOCOL instance.\r
+  @param[out] ModeData           Pointer to storage for the EFI FTPv4 Protocol driver \r
+                                 mode data. The string buffers for Username and Password\r
+                                 in EFI_FTP4_CONFIG_DATA are allocated by the function,\r
+                                 and the caller should take the responsibility to free the \r
+                                 buffer later.\r
+\r
+  @retval EFI_SUCCESS            This function is called successfully.\r
+  @retval EFI_INVALID_PARAMETER  One or more of the following are TRUE:\r
+                                 - This is NULL.\r
+                                 - ModeData is NULL.\r
+  @retval EFI_NOT_STARTED        The EFI FTPv4 Protocol driver has not been started\r
+  @retval EFI_OUT_OF_RESOURCES   Could not allocate enough resource to finish the operation.\r
+  @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS \r
+(EFIAPI *EFI_FTP4_GET_MODE_DATA)(\r
+  IN EFI_FTP4_PROTOCOL        *This,\r
+  OUT EFI_FTP4_CONFIG_DATA    *ModeData\r
+  );\r
+\r
+/**\r
+  Disconnecting a FTP connection gracefully.\r
+\r
+  The Connect() function will initiate a connection request to the remote FTP server\r
+  with the corresponding connection token. If this function returns EFI_SUCCESS, the \r
+  connection sequence is initiated successfully.  If the connection succeeds or faild\r
+  due to any error, the Token->Event will be signaled and Token->Status will be updated\r
+  accordingly.\r
+\r
+  @param[in] This                Pointer to the EFI_FTP4_PROTOCOL instance.\r
+  @param[in] Token               Pointer to the token used to establish control connection.\r
+\r
+  @retval EFI_SUCCESS            The connection sequence is successfully initiated.\r
+  @retval EFI_INVALID_PARAMETER  One or more of the following are TRUE:\r
+                                 - This is NULL.\r
+                                 - Token is NULL.\r
+                                 - Token->Event is NULL.\r
+  @retval EFI_NOT_STARTED        The EFI FTPv4 Protocol driver has not been started.\r
+  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, BOOTP, \r
+                                 RARP, etc.) is not finished yet.\r
+  @retval EFI_OUT_OF_RESOURCES   Could not allocate enough resource to finish the operation.\r
+  @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_FTP4_CONNECT)(\r
+  IN EFI_FTP4_PROTOCOL           *This,\r
+  IN EFI_FTP4_CONNECTION_TOKEN   *Token\r
+  );\r
+\r
+/**\r
+  Disconnecting a FTP connection gracefully.\r
+\r
+  The Close() function will initiate a close request to the remote FTP server with the\r
+  corresponding connection token. If this function returns EFI_SUCCESS, the control \r
+  connection with the remote FTP server is closed.\r
+\r
+  @param[in] This                Pointer to the EFI_FTP4_PROTOCOL instance.\r
+  @param[in] Token               Pointer to the token used to close control connection.\r
+\r
+  @retval EFI_SUCCESS            The close request is successfully initiated.\r
+  @retval EFI_INVALID_PARAMETER  One or more of the following are TRUE:\r
+                                 - This is NULL.\r
+                                 - Token is NULL.\r
+                                 - Token->Event is NULL.\r
+  @retval EFI_NOT_STARTED        The EFI FTPv4 Protocol driver has not been started.\r
+  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, BOOTP, \r
+                                 RARP, etc.) is not finished yet.\r
+  @retval EFI_OUT_OF_RESOURCES   Could not allocate enough resource to finish the operation.\r
+  @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_FTP4_CLOSE)(\r
+  IN EFI_FTP4_PROTOCOL             *This,\r
+  IN EFI_FTP4_CONNECTION_TOKEN     *Token\r
+  );\r
+\r
+/**\r
+  Sets or clears the operational parameters for the FTP child driver.\r
+\r
+  The Configure() function will configure the connected FTP session with the \r
+  configuration setting specified in  FtpConfigData. The configuration data can\r
+  be reset by calling Configure() with FtpConfigData set to NULL.\r
+\r
+  @param[in] This                Pointer to the EFI_FTP4_PROTOCOL instance.\r
+  @param[in] FtpConfigData       Pointer to configuration data that will be assigned to \r
+                                 the FTP child driver instance. If NULL, the FTP child\r
+                                 driver instance is reset to startup defaults and all \r
+                                 pending transmit and receive requests are flushed.\r
+\r
+  @retval EFI_SUCCESS            The FTPv4 driver was configured successfully.\r
+  @retval EFI_INVALID_PARAMETER  One or more following conditions are TRUE:\r
+                                 - This is NULL.\r
+                                 - FtpConfigData.RepType is invalid.\r
+                                 - FtpConfigData.FileStruct is invalid.\r
+                                 - FtpConfigData.TransMode is invalid.\r
+                                 - IP address in FtpConfigData is invalid.\r
+  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, BOOTP, \r
+                                 RARP, etc.) is not finished yet.\r
+  @retval EFI_UNSUPPORTED        One or more of the configuration parameters are not supported\r
+                                 by this implementation. \r
+  @retval EFI_OUT_OF_RESOURCES   The EFI FTPv4 Protocol driver instance data could not be \r
+                                 allocated.\r
+  @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred. The EFI FTPv4 \r
+                                 Protocol driver instance is not configured.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_FTP4_CONFIGURE)(\r
+  IN EFI_FTP4_PROTOCOL           *This,\r
+  IN EFI_FTP4_CONFIG_DATA        *FtpConfigData OPTIONAL\r
+  );\r
+\r
+\r
+/**\r
+  Downloads a file from an FTPv4 server. \r
+\r
+  The ReadFile() function is used to initialize and start an FTPv4 download process\r
+  and optionally wait for completion. When the download operation completes, whether\r
+  successfully or not, the Token.Status field is updated by the EFI FTPv4 Protocol \r
+  driver and then Token.Event is signaled (if it is not NULL).\r
+\r
+  Data will be downloaded from the FTPv4 server into Token.DataBuffer. If the file size\r
+  is larger than Token.DataBufferSize, Token.DataCallback will be called to allow for \r
+  processing data and then new data will be placed at the beginning of Token.DataBuffer.\r
+\r
+  @param[in] This                Pointer to the EFI_FTP4_PROTOCOL instance.\r
+  @param[in] Token               Pointer to the token structure to provide the parameters that\r
+                                 are used in this operation.\r
+\r
+  @retval EFI_SUCCESS            The data file is being downloaded successfully.\r
+  @retval EFI_INVALID_PARAMETER  One or more of the parameters is not valid.\r
+                                 - This is NULL.\r
+                                 - Token is NULL.\r
+                                 - Token.Pathname is NULL.\r
+                                 - Token. DataBuffer is NULL.\r
+                                 - Token. DataBufferSize is 0.\r
+  @retval EFI_NOT_STARTED        The EFI FTPv4 Protocol driver has not been started.\r
+  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, BOOTP, \r
+                                 RARP, etc.) is not finished yet.\r
+  @retval EFI_OUT_OF_RESOURCES   Required system resources could not be allocated.\r
+  @retval EFI_DEVICE_ERROR       An unexpected network error or system error occurred.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS \r
+(EFIAPI *EFI_FTP4_READ_FILE)(\r
+  IN EFI_FTP4_PROTOCOL         *This,\r
+  IN EFI_FTP4_COMMAND_TOKEN    *Token\r
+  );\r
+\r
+/**\r
+  Uploads a file from an FTPv4 server. \r
+\r
+  The WriteFile() function is used to initialize and start an FTPv4 upload process and\r
+  optionally wait for completion. When the upload operation completes, whether successfully\r
+  or not, the Token.Status field is updated by the EFI FTPv4 Protocol driver and then\r
+  Token.Event is signaled (if it is not NULL). Data to be  uploaded to server is stored\r
+  into Token.DataBuffer. Token.DataBufferSize is the number bytes to be transferred. \r
+  If the file size is larger than Token.DataBufferSize, Token.DataCallback will be called\r
+  to allow for processing data and then new data will be placed at the beginning of \r
+  Token.DataBuffer. Token.DataBufferSize is updated to reflect the actual number of bytes\r
+  to be transferred. Token.DataBufferSize is set to 0 by the call back to indicate the\r
+  completion of data transfer.\r
+\r
+  @param[in] This                Pointer to the EFI_FTP4_PROTOCOL instance.\r
+  @param[in] Token               Pointer to the token structure to provide the parameters that\r
+                                 are used in this operation.\r
+\r
+  @retval EFI_SUCCESS            TThe data file is being uploaded successfully.\r
+  @retval EFI_UNSUPPORTED        The operation is not supported by this implementation.\r
+  @retval EFI_INVALID_PARAMETER  One or more of the parameters is not valid.\r
+                                 - This is NULL.\r
+                                 - Token is NULL.\r
+                                 - Token.Pathname is NULL.\r
+                                 - Token. DataBuffer is NULL.\r
+                                 - Token. DataBufferSize is 0.\r
+  @retval EFI_NOT_STARTED        The EFI FTPv4 Protocol driver has not been started.\r
+  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, BOOTP, \r
+                                 RARP, etc.) is not finished yet.\r
+  @retval EFI_OUT_OF_RESOURCES   Required system resources could not be allocated.\r
+  @retval EFI_DEVICE_ERROR       An unexpected network error or system error occurred.\r
+\r
+**/\r
+typedef \r
+EFI_STATUS \r
+(EFIAPI *EFI_FTP4_WRITE_FILE)(\r
+  IN EFI_FTP4_PROTOCOL         *This,\r
+  IN EFI_FTP4_COMMAND_TOKEN    *Token\r
+  );\r
+\r
+/**\r
+  Download a data file "directory" from a FTPv4 server. May be unsupported in some EFI \r
+  implementations.\r
+\r
+  The ReadDirectory() function is used to return a list of files on the FTPv4 server that\r
+  logically (or operationally) related to Token.Pathname, and optionally wait for completion.\r
+  When the download operation completes, whether successfully or not, the Token.Status field \r
+  is updated by the EFI FTPv4 Protocol driver and then Token.Event is signaled (if it is not\r
+  NULL). Data will be downloaded from the FTPv4 server into Token.DataBuffer. If the file size\r
+  is larger than Token.DataBufferSize, Token.DataCallback will be called to allow for processing\r
+  data and then new data will be placed at the beginning of Token.DataBuffer. \r
+\r
+  @param[in] This                Pointer to the EFI_FTP4_PROTOCOL instance.\r
+  @param[in] Token               Pointer to the token structure to provide the parameters that\r
+                                 are used in this operation.\r
+\r
+  @retval EFI_SUCCESS            The file list information is being downloaded successfully.\r
+  @retval EFI_UNSUPPORTED        The operation is not supported by this implementation.\r
+  @retval EFI_INVALID_PARAMETER  One or more of the parameters is not valid.\r
+                                 - This is NULL.\r
+                                 - Token is NULL.\r
+                                 - Token. DataBuffer is NULL.\r
+                                 - Token. DataBufferSize is 0.\r
+  @retval EFI_NOT_STARTED        The EFI FTPv4 Protocol driver has not been started.\r
+  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, BOOTP, \r
+                                 RARP, etc.) is not finished yet.\r
+  @retval EFI_OUT_OF_RESOURCES   Required system resources could not be allocated.\r
+  @retval EFI_DEVICE_ERROR       An unexpected network error or system error occurred.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_FTP4_READ_DIRECTORY)(\r
+  IN EFI_FTP4_PROTOCOL           *This,\r
+  IN EFI_FTP4_COMMAND_TOKEN      *Token\r
+  );\r
+\r
+/**\r
+  Polls for incoming data packets and processes outgoing data packets. \r
+\r
+  The Poll() function can be used by network drivers and applications to increase the\r
+  rate that data packets are moved between the communications device and the transmit\r
+  and receive queues. In some systems, the periodic timer event in the managed network\r
+  driver may not poll the underlying communications device fast enough to transmit \r
+  and/or receive all data packets without missing incoming packets or dropping outgoing\r
+  packets. Drivers and applications that are experiencing packet loss should try calling\r
+  the Poll() function more often. \r
+\r
+  @param[in] This                Pointer to the EFI_FTP4_PROTOCOL instance.\r
+\r
+  @retval EFI_SUCCESS            Incoming or outgoing data was processed.\r
+  @retval EFI_NOT_STARTED        This EFI FTPv4 Protocol instance has not been started.\r
+  @retval EFI_INVALID_PARAMETER  This is NULL.\r
+  @retval EFI_DEVICE_ERROR       EapAuthType An unexpected system or network error occurred.\r
+  @retval EFI_TIMEOUT            Data was dropped out of the transmit and/or receive queue.\r
+                                 Consider increasing the polling rate.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_FTP4_POLL)(\r
+  IN EFI_FTP4_PROTOCOL        *This\r
+  );\r
+\r
+///\r
+/// EFI_FTP4_PROTOCOL \r
+/// provides basic services for client-side FTP (File Transfer Protocol) \r
+/// operations.\r
+///\r
+struct _EFI_FTP4_PROTOCOL {\r
+  EFI_FTP4_GET_MODE_DATA     GetModeData;\r
+  EFI_FTP4_CONNECT           Connect;\r
+  EFI_FTP4_CLOSE             Close;\r
+  EFI_FTP4_CONFIGURE         Configure;\r
+  EFI_FTP4_READ_FILE         ReadFile;\r
+  EFI_FTP4_WRITE_FILE        WriteFile;\r
+  EFI_FTP4_READ_DIRECTORY    ReadDirectory;\r
+  EFI_FTP4_POLL              Poll;\r
+};\r
+\r
+extern EFI_GUID gEfiFtp4ServiceBindingProtocolGuid;\r
+extern EFI_GUID gEfiFtp4ProtocolGuid;\r
+\r
+#endif\r
+\r
index 5bc04e6701d33b2c9df63d8201f44ae553192fe8..28cb07f0bf0d9ae63803b986230ee56c95aae2b2 100644 (file)
 \r
   ## Include/Protocol/VlanConfig.h\r
   gEfiVlanConfigProtocolGuid           = { 0x9e23d768, 0xd2f3, 0x4366, {0x9f, 0xc3, 0x3a, 0x7a, 0xba, 0x86, 0x43, 0x74 }}\r
+\r
+  ## Include/Protocol/Eap.h\r
+  gEfiEapProtocolGuid                  = { 0x5d9f96db, 0xe731, 0x4caa, {0xa0, 0xd, 0x72, 0xe1, 0x87, 0xcd, 0x77, 0x62 }}\r
+\r
+  ## Include/Protocol/EapManagement.h\r
+  gEfiEapManagementProtocolGuid        = { 0xbb62e663, 0x625d, 0x40b2, {0xa0, 0x88, 0xbb, 0xe8, 0x36, 0x23, 0xa2, 0x45 }}\r
+\r
+  ## Include/Protocol/Ftp4.h\r
+  gEfiFtp4ServiceBindingProtocolGuid   = { 0xfaaecb1, 0x226e, 0x4782, {0xaa, 0xce, 0x7d, 0xb9, 0xbc, 0xbf, 0x4d, 0xaf }}\r
+\r
+  ## Include/Protocol/Ftp4.h\r
+  gEfiFtp4ProtocolGuid                 = { 0xeb338826, 0x681b, 0x4295, {0xb3, 0x56, 0x2b, 0x36, 0x4c, 0x75, 0x7b, 0x9 }}\r
   \r
   ## Include/Protocol/DriverHealth.h\r
   gEfiDriverHealthProtocolGuid         = { 0x2a534210, 0x9280, 0x41d8, {0xae, 0x79, 0xca, 0xda, 0x1, 0xa2, 0xb1, 0x27 }}\r