]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Tcp4.h
1. Sync Tcp4 protocol definitions to match UEFI 2.1
[mirror_edk2.git] / MdePkg / Include / Protocol / Tcp4.h
index 87dea25e32004b0bc4380aeda68707cb3e111e40..e093388851655d11c2f628cb561e0df6741e7268 100644 (file)
@@ -1,25 +1,25 @@
 /** @file\r
   EFI TCPv4 Protocol Definition\r
   The EFI TCPv4 Service Binding Protocol is used to locate EFI TCPv4 Protocol drivers to create\r
-  and destroy child of the driver to communicate with other host using TCP protocol.      \r
-  The EFI TCPv4 Protocol provides services to send and receive data stream.     \r
+  and destroy child of the driver to communicate with other host using TCP protocol.\r
+  The EFI TCPv4 Protocol provides services to send and receive data stream.\r
 \r
-  Copyright (c) 2006, 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
+  Copyright (c) 2006, 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
-  Module Name:  Tcp4.h\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_TCP4_PROTOCOL_H__\r
 #define __EFI_TCP4_PROTOCOL_H__\r
 \r
+#include <Protocol/Ip4.h>\r
+\r
 #define EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID \\r
   { \\r
     0x00720665, 0x67EB, 0x4a99, {0xBA, 0xF7, 0xD3, 0xC3, 0x3A, 0x1C, 0x7C, 0xC9 } \\r
@@ -33,6 +33,7 @@
 typedef struct _EFI_TCP4_PROTOCOL EFI_TCP4_PROTOCOL;\r
 \r
 typedef struct {\r
+  EFI_HANDLE        InstanceHandle;\r
   EFI_IPv4_ADDRESS        LocalAddress;\r
   UINT16                  LocalPort;\r
   EFI_IPv4_ADDRESS        RemoteAddress;\r
@@ -41,7 +42,7 @@ typedef struct {
 \r
 typedef struct {\r
   EFI_HANDLE              DriverHandle;\r
-  UINT                  ServiceCount;\r
+  UINT32                  ServiceCount;\r
   EFI_TCP4_SERVICE_POINT  Services[1];\r
 } EFI_TCP4_VARIABLE_DATA;\r
 \r
@@ -56,16 +57,16 @@ typedef struct {
 } EFI_TCP4_ACCESS_POINT;\r
 \r
 typedef struct {\r
-  UINT                  ReceiveBufferSize;\r
-  UINT                  SendBufferSize;\r
-  UINT                  MaxSynBackLog;\r
-  UINT                  ConnectionTimeout;\r
-  UINT                  DataRetries;\r
-  UINT                  FinTimeout;\r
-  UINT                  TimeWaitTimeout;\r
-  UINT                  KeepAliveProbes;\r
-  UINT                  KeepAliveTime;\r
-  UINT                  KeepAliveInterval;\r
+  UINT32                  ReceiveBufferSize;\r
+  UINT32                  SendBufferSize;\r
+  UINT32                  MaxSynBackLog;\r
+  UINT32                  ConnectionTimeout;\r
+  UINT32                  DataRetries;\r
+  UINT32                  FinTimeout;\r
+  UINT32                  TimeWaitTimeout;\r
+  UINT32                  KeepAliveProbes;\r
+  UINT32                  KeepAliveTime;\r
+  UINT32                  KeepAliveInterval;\r
   BOOLEAN                 EnableNagle;\r
   BOOLEAN                 EnableTimeStamp;\r
   BOOLEAN                 EnableWindowScaling;\r
@@ -84,10 +85,10 @@ typedef struct {
   // Access Point\r
   //\r
   EFI_TCP4_ACCESS_POINT   AccessPoint;\r
-                          \r
-  //                      \r
-  // TCP Control Options  \r
-  //                      \r
+\r
+  //\r
+  // TCP Control Options\r
+  //\r
   EFI_TCP4_OPTION         *ControlOption;\r
 } EFI_TCP4_CONFIG_DATA;\r
 \r
@@ -120,22 +121,22 @@ typedef struct {
 } EFI_TCP4_LISTEN_TOKEN;\r
 \r
 typedef struct {\r
-  UINTN FragmentLength;\r
-  VOID  *FragmentBuffer;\r
+  UINT32 FragmentLength;\r
+  VOID   *FragmentBuffer;\r
 } EFI_TCP4_FRAGMENT_DATA;\r
 \r
 typedef struct {\r
   BOOLEAN                   UrgentFlag;\r
-  IN OUT UINTN              DataLength;\r
-  UINT                    FragmentCount;\r
+  UINT32                    DataLength;\r
+  UINT32                    FragmentCount;\r
   EFI_TCP4_FRAGMENT_DATA    FragmentTable[1];\r
-} EFI_TCP4_RECEIVE_DATA;    \r
+} EFI_TCP4_RECEIVE_DATA;\r
 \r
-typedef struct {            \r
+typedef struct {\r
   BOOLEAN                   Push;\r
   BOOLEAN                   Urgent;\r
-  UINT                    DataLength;\r
-  UINT                    FragmentCount;\r
+  UINT32                    DataLength;\r
+  UINT32                    FragmentCount;\r
   EFI_TCP4_FRAGMENT_DATA    FragmentTable[1];\r
 } EFI_TCP4_TRANSMIT_DATA;\r
 \r
@@ -171,22 +172,22 @@ typedef struct {
 \r
   @retval EFI_SUCCESS           The mode data was read.\r
   @retval EFI_INVALID_PARAMETER This is NULL.\r
-  @retval EFI_NOT_STARTED       No configuration data is available because this instance hasn¡¯t\r
+  @retval EFI_NOT_STARTED       No configuration data is available because this instance hasn't\r
                                  been started.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_TCP4_GET_MODE_DATA) (\r
-  IN  EFI_TCP4_PROTOCOL                  *This,\r
-  OUT EFI_TCP4_CONNECTION_STATE          *Tcp4State      OPTIONAL,\r
-  OUT EFI_TCP4_CONFIG_DATA               *Tcp4ConfigData OPTIONAL,\r
-  OUT EFI_IP4_MODE_DATA                  *Ip4ModeData    OPTIONAL,\r
-  OUT EFI_MANAGED_NETWORK_CONFIG_DATA    *MnpConfigData  OPTIONAL,\r
-  OUT EFI_SIMPLE_NETWORK_MODE            *SnpModeData    OPTIONAL\r
+  IN CONST  EFI_TCP4_PROTOCOL                  *This,\r
+  OUT       EFI_TCP4_CONNECTION_STATE          *Tcp4State      OPTIONAL,\r
+  OUT       EFI_TCP4_CONFIG_DATA               *Tcp4ConfigData OPTIONAL,\r
+  OUT       EFI_IP4_MODE_DATA                  *Ip4ModeData    OPTIONAL,\r
+  OUT       EFI_MANAGED_NETWORK_CONFIG_DATA    *MnpConfigData  OPTIONAL,\r
+  OUT       EFI_SIMPLE_NETWORK_MODE            *SnpModeData    OPTIONAL\r
   )\r
 ;\r
-  \r
+\r
 /**\r
   Initialize or brutally reset the operational parameters for this EFI TCPv4 instance.\r
 \r
@@ -214,7 +215,7 @@ EFI_STATUS
   IN EFI_TCP4_CONFIG_DATA                *TcpConfigData OPTIONAL\r
   )\r
 ;\r
-    \r
+\r
 \r
 /**\r
   Add or delete a route entry to the route table\r
@@ -258,7 +259,7 @@ EFI_STATUS
   IN EFI_IPv4_ADDRESS                    *SubnetMask,\r
   IN EFI_IPv4_ADDRESS                    *GatewayAddress\r
   )\r
-;  \r
+;\r
 \r
 /**\r
   Initiate a nonblocking TCP connection request for an active TCP instance.\r
@@ -266,7 +267,7 @@ EFI_STATUS
   @param  This                  Pointer to the EFI_TCP4_PROTOCOL instance.\r
   @param  ConnectionToken       Pointer to the connection token to return when the TCP three\r
                                 way handshake finishes.\r
-                                 \r
+\r
   @retval EFI_SUCCESS           The connection request is successfully initiated and the state\r
                                 - of this TCPv4 instance has been changed to\r
                                 - Tcp4StateSynSent.\r
@@ -278,7 +279,7 @@ EFI_STATUS
                                 - This is NULL.\r
                                 - ConnectionToken is NULL.\r
                                 - ConnectionToken->CompletionToken.Event is NULL.\r
-  @retval EFI_OUT_OF_RESOURCES  The driver can¡¯t allocate enough resource to initiate the activeopen.\r
+  @retval EFI_OUT_OF_RESOURCES  The driver can't allocate enough resource to initiate the activeopen.\r
   @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.\r
 \r
 **/\r
@@ -288,8 +289,8 @@ EFI_STATUS
   IN EFI_TCP4_PROTOCOL                   *This,\r
   IN EFI_TCP4_CONNECTION_TOKEN           *ConnectionToken\r
   )\r
-;  \r
-  \r
+;\r
+\r
 \r
 /**\r
   Listen on the passive instance to accept an incoming connection request. This is a nonblocking operation.\r
@@ -318,7 +319,7 @@ EFI_STATUS
   IN EFI_TCP4_PROTOCOL                   *This,\r
   IN EFI_TCP4_LISTEN_TOKEN               *ListenToken\r
   )\r
-;    \r
+;\r
 \r
 /**\r
   Queues outgoing data into the transmit queue.\r
@@ -357,7 +358,7 @@ EFI_STATUS
   IN EFI_TCP4_PROTOCOL                   *This,\r
   IN EFI_TCP4_IO_TOKEN                   *Token\r
   )\r
-;      \r
+;\r
 \r
 \r
 /**\r
@@ -401,11 +402,11 @@ EFI_STATUS
   IN EFI_TCP4_PROTOCOL                   *This,\r
   IN EFI_TCP4_IO_TOKEN                   *Token\r
   )\r
-;       \r
-   \r
+;\r
+\r
 /**\r
   Disconnecting a TCP connection gracefully or reset a TCP connection. This function is a\r
-  nonblocking operation.                                                                                                                                                                        \r
+  nonblocking operation.\r
 \r
   @param  This       Pointer to the EFI_TCP4_PROTOCOL instance.\r
   @param  CloseToken Pointer to the close token to return when operation finishes.\r
@@ -432,7 +433,7 @@ EFI_STATUS
   IN EFI_TCP4_PROTOCOL                   *This,\r
   IN EFI_TCP4_CLOSE_TOKEN                *CloseToken\r
   )\r
-;      \r
+;\r
 \r
 /**\r
   Abort an asynchronous connection, listen, transmission or receive request.\r
@@ -461,7 +462,7 @@ EFI_STATUS
   IN EFI_TCP4_PROTOCOL                   *This,\r
   IN EFI_TCP4_COMPLETION_TOKEN           *Token OPTIONAL\r
   )\r
-;      \r
+;\r
 \r
 \r
 /**\r
@@ -482,7 +483,7 @@ EFI_STATUS
 (EFIAPI *EFI_TCP4_POLL) (\r
   IN EFI_TCP4_PROTOCOL                   *This\r
   )\r
-;      \r
+;\r
 \r
 struct _EFI_TCP4_PROTOCOL {\r
   EFI_TCP4_GET_MODE_DATA                 GetModeData;\r