]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h
Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Driver.h
index 42303f3cf128cdfb7d72326e013f9182d91d2464..0a106a46fb9f355526781bcc6b63841635e657d4 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
+  Tcp driver function header.\r
 \r
-Copyright (c) 2005 - 2006, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+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<BR>\r
@@ -17,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/ServiceBinding.h>\r
 #include <Library/IpIoLib.h>\r
 \r
-#define TCP4_DRIVER_SIGNATURE   EFI_SIGNATURE_32 ('T', 'C', 'P', '4')\r
+#define TCP4_DRIVER_SIGNATURE   SIGNATURE_32 ('T', 'C', 'P', '4')\r
 \r
 #define TCP4_PORT_KNOWN         1024\r
 #define TCP4_PORT_USER_RESERVED 65535\r
@@ -29,12 +30,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   Tcp4ServiceBinding, \\r
   TCP4_DRIVER_SIGNATURE \\r
   )\r
-\r
+  \r
+///\r
+/// TCP heartbeat tick timer.\r
+///\r
 typedef struct _TCP4_HEARTBEAT_TIMER {\r
-  EFI_EVENT  TimerEvent;\r
-  INTN       RefCnt;\r
+  EFI_EVENT  TimerEvent;         ///< The event assoiated with the timer\r
+  INTN       RefCnt;             ///< Number of reference\r
 } TCP4_HEARTBEAT_TIMER;\r
 \r
+///\r
+/// TCP service data\r
+///\r
 typedef struct _TCP4_SERVICE_DATA {\r
   UINT32                        Signature;\r
   EFI_HANDLE                    ControllerHandle;\r
@@ -45,6 +52,13 @@ typedef struct _TCP4_SERVICE_DATA {
   LIST_ENTRY                    SocketList;\r
 } TCP4_SERVICE_DATA;\r
 \r
+///\r
+/// TCP protocol data\r
+///\r
+typedef struct _TCP4_PROTO_DATA {\r
+  TCP4_SERVICE_DATA *TcpService;\r
+  TCP_CB            *TcpPcb;\r
+} TCP4_PROTO_DATA;\r
 \r
 \r
 /**\r
@@ -62,9 +76,10 @@ typedef struct _TCP4_SERVICE_DATA {
 \r
 **/\r
 VOID\r
+EFIAPI\r
 Tcp4RxCallback (\r
   IN EFI_STATUS                       Status,\r
-  IN ICMP_ERROR                       IcmpErr,\r
+  IN UINT8                            IcmpErr,\r
   IN EFI_NET_SESSION_DATA             *NetSession,\r
   IN NET_BUF                          *Pkt,\r
   IN VOID                             *Context    OPTIONAL\r
@@ -108,14 +123,10 @@ TcpSendIpPacket (
 EFI_STATUS\r
 Tcp4Dispatcher (\r
   IN SOCKET                  *Sock,\r
-  IN SOCK_REQUEST            Request,\r
+  IN UINT8                   Request,\r
   IN VOID                    *Data    OPTIONAL\r
   );\r
 \r
-typedef struct _TCP4_PROTO_DATA {\r
-  TCP4_SERVICE_DATA *TcpService;\r
-  TCP_CB            *TcpPcb;\r
-} TCP4_PROTO_DATA;\r
 \r
 /**\r
   The entry point for Tcp4 driver, used to install Tcp4 driver on the ImageHandle.\r
@@ -299,8 +310,8 @@ Tcp4DestroySocketCallback (
 EFI_STATUS\r
 EFIAPI\r
 Tcp4ServiceBindingCreateChild (\r
-  IN EFI_SERVICE_BINDING_PROTOCOL  *This,\r
-  IN EFI_HANDLE                    *ChildHandle\r
+  IN     EFI_SERVICE_BINDING_PROTOCOL  *This,\r
+  IN OUT EFI_HANDLE                    *ChildHandle\r
   );\r
 \r
 /**\r
@@ -316,7 +327,7 @@ Tcp4ServiceBindingCreateChild (
   @retval EFI_SUCCES            The protocol was removed from ChildHandle.\r
   @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is \r
                                 being removed.\r
-  @retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.\r
+  @retval EFI_INVALID_PARAMETER Child handle is NULL.\r
   @retval EFI_ACCESS_DENIED     The protocol could not be removed from the ChildHandle\r
                                 because its services are being used.\r
   @retval other                 The child handle was not destroyed.\r