]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h
sync comments, fix function header, rename variable name to follow coding style.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiTcp4Io.h
index 2a70a6bd407acd5916f7f55e7486ae0ca88a591a..f46e8df8b33f16edd6d9c4ff64dcf4751661ced0 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/**\r
+  IScsi Tcp4 IO related definitions.\r
 \r
 Copyright (c) 2004 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -15,9 +16,9 @@ Module Name:
 \r
 Abstract:\r
 \r
-  iSCSI Tcp4 IO related definitions.\r
+  IScsi Tcp4 IO related definitions.\r
 \r
---*/\r
+**/\r
 \r
 #ifndef _ISCSI_TCP4_IO_H_\r
 #define _ISCSI_TCP4_IO_H_\r
@@ -52,6 +53,22 @@ typedef struct _TCP4_IO {
   BOOLEAN                   IsCloseDone;\r
 } TCP4_IO;\r
 \r
+/**\r
+  Create a TCP socket with the specified configuration data. \r
+\r
+  @param  Image[in]      The handle of the driver image.\r
+\r
+  @param  Controller[in] The handle of the controller.\r
+\r
+  @param  ConfigData[in] The Tcp4 configuration data.\r
+\r
+  @param  Tcp4Io[in]     The Tcp4Io.\r
+  \r
+  @retval EFI_SUCCESS    The TCP socket is created and configured.\r
+\r
+  @retval Other          Failed to create the TCP socket or configure it.\r
+\r
+**/\r
 EFI_STATUS\r
 Tcp4IoCreateSocket (\r
   IN EFI_HANDLE           Image,\r
@@ -60,28 +77,86 @@ Tcp4IoCreateSocket (
   IN TCP4_IO              *Tcp4Io\r
   );\r
 \r
+/**\r
+  Destroy the socket. \r
+\r
+  @param[in]  Tcp4Io The Tcp4Io which wraps the socket to be destroyeds.\r
+\r
+  @retval     None.\r
+\r
+**/\r
 VOID\r
 Tcp4IoDestroySocket (\r
   IN TCP4_IO  *Tcp4Io\r
   );\r
 \r
+/**\r
+  Connect to the other endpoint of the TCP socket.\r
+\r
+  @param  Tcp4Io[in]  The Tcp4Io wrapping the TCP socket.\r
+\r
+  @param  Timeout[in] The time to wait for connection done.\r
+\r
+  @retval None.\r
+\r
+**/\r
 EFI_STATUS\r
 Tcp4IoConnect (\r
   IN TCP4_IO    *Tcp4Io,\r
   IN EFI_EVENT  Timeout\r
   );\r
 \r
+/**\r
+  Reset the socket.\r
+\r
+  @param  Tcp4Io[in] The Tcp4Io wrapping the TCP socket.\r
+\r
+  @retval None.\r
+\r
+**/\r
 VOID\r
 Tcp4IoReset (\r
   IN TCP4_IO  *Tcp4Io\r
   );\r
 \r
+/**\r
+  Transmit the Packet to the other endpoint of the socket.\r
+\r
+  @param  Tcp4Io[in]           The Tcp4Io wrapping the TCP socket.\r
+\r
+  @param  Packet[in]           The packet to transmit\r
+\r
+  @retval EFI_SUCCESS          The packet is trasmitted.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
+\r
+**/\r
 EFI_STATUS\r
 Tcp4IoTransmit (\r
   IN TCP4_IO  *Tcp4Io,\r
   IN NET_BUF  *Packet\r
   );\r
 \r
+/**\r
+  Receive data from the socket.\r
+\r
+  @param  Tcp4Io[in]           The Tcp4Io which wraps the socket to be destroyeds.\r
+\r
+  @param  Packet[in]           The buffer to hold the data copy from the soket rx buffer.\r
+\r
+  @param  AsyncMode[in]        Is this receive asyncronous or not.\r
+\r
+  @param  Timeout[in]          The time to wait for receiving the amount of data the Packet\r
+                               can hold.\r
+\r
+  @retval EFI_SUCCESS          The required amount of data is received from the socket.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES Failed to allocate momery.\r
+\r
+  @retval EFI_TIMEOUT          Failed to receive the required amount of data in the\r
+                               specified time period.\r
+\r
+**/\r
 EFI_STATUS\r
 Tcp4IoReceive (\r
   IN TCP4_IO    *Tcp4Io,\r