summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-17 08:28:51 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-17 08:28:51 +0000
commit12618416ec7a468bc7e47d9739cf973a0bb418fc (patch)
tree1a23c7d46665240f08b061aaa13832da602162d3 /MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c
parentd16fc3dbb3461dab1cb8a8df21b9e3c2e09723e6 (diff)
downloadedk2-12618416ec7a468bc7e47d9739cf973a0bb418fc.zip
edk2-12618416ec7a468bc7e47d9739cf973a0bb418fc.tar.gz
edk2-12618416ec7a468bc7e47d9739cf973a0bb418fc.tar.bz2
[Description]
change the old code style to comply with Doxgen format [Impaction] add comments for every function [Reference Info] add comments to achieve the highest standard of code quality matrix git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5079 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c202
1 files changed, 84 insertions, 118 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c
index 06caf72..02f561e 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c
@@ -1,4 +1,5 @@
-/*++
+/** @file
+ The wrap of TCP/IP Socket interface
Copyright (c) 2004 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -14,37 +15,48 @@ Module Name:
IScsiTcp4Io.c
Abstract:
+ The wrap of TCP/IP Socket interface
---*/
+**/
#include "IScsiImpl.h"
+/**
+ The common notify function associated with various Tcp4Io events.
+
+ @param Event[in] The event signaled.
+
+ @param Contect[in] The context.
+
+ @retval None.
+
+**/
VOID
EFIAPI
Tcp4IoCommonNotify (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
+{
+ *((BOOLEAN *) Context) = TRUE;
+}
- The common notify function associated with various Tcp4Io events.
+/**
+ Create a TCP socket with the specified configuration data.
-Arguments:
+ @param Image[in] The handle of the driver image.
- Event - The event signaled.
- Contect - The context.
+ @param Controller[in] The handle of the controller.
-Returns:
+ @param ConfigData[in] The Tcp4 configuration data.
- None.
+ @param Tcp4Io[in] The Tcp4Io.
+
+ @retval EFI_SUCCESS The TCP socket is created and configured.
---*/
-{
- *((BOOLEAN *) Context) = TRUE;
-}
+ @retval Other Failed to create the TCP socket or configure it.
+**/
EFI_STATUS
Tcp4IoCreateSocket (
IN EFI_HANDLE Image,
@@ -52,25 +64,6 @@ Tcp4IoCreateSocket (
IN TCP4_IO_CONFIG_DATA *ConfigData,
IN TCP4_IO *Tcp4Io
)
-/*++
-
-Routine Description:
-
- Create a TCP socket with the specified configuration data.
-
-Arguments:
-
- Image - The handle of the driver image.
- Controller - The handle of the controller.
- ConfigData - The Tcp4 configuration data.
- Tcp4Io - The Tcp4Io.
-
-Returns:
-
- EFI_SUCCESS - The TCP socket is created and configured.
- other - Failed to create the TCP socket or configure it.
-
---*/
{
EFI_STATUS Status;
EFI_TCP4_PROTOCOL *Tcp4;
@@ -252,25 +245,18 @@ ON_ERROR:
return Status;
}
-VOID
-Tcp4IoDestroySocket (
- IN TCP4_IO *Tcp4Io
- )
-/*++
-
-Routine Description:
-
+/**
Destroy the socket.
-Arguments:
+ @param[in] Tcp4Io The Tcp4Io which wraps the socket to be destroyeds.
- Tcp4Io - The Tcp4Io which wraps the socket to be destroyeds.
+ @retval None.
-Returns:
-
- None.
-
---*/
+**/
+VOID
+Tcp4IoDestroySocket (
+ IN TCP4_IO *Tcp4Io
+ )
{
EFI_TCP4_PROTOCOL *Tcp4;
@@ -297,27 +283,21 @@ Returns:
);
}
-EFI_STATUS
-Tcp4IoConnect (
- IN TCP4_IO *Tcp4Io,
- IN EFI_EVENT Timeout
- )
-/*++
-
-Routine Description:
-
+/**
Connect to the other endpoint of the TCP socket.
-Arguments:
-
- Tcp4Io - The Tcp4Io wrapping the TCP socket.
- Timeout - The time to wait for connection done.
+ @param Tcp4Io[in] The Tcp4Io wrapping the TCP socket.
-Returns:
+ @param Timeout[in] The time to wait for connection done.
- None.
+ @retval None.
---*/
+**/
+EFI_STATUS
+Tcp4IoConnect (
+ IN TCP4_IO *Tcp4Io,
+ IN EFI_EVENT Timeout
+ )
{
EFI_TCP4_PROTOCOL *Tcp4;
EFI_STATUS Status;
@@ -342,25 +322,18 @@ Returns:
return Status;
}
-VOID
-Tcp4IoReset (
- IN TCP4_IO *Tcp4Io
- )
-/*++
-
-Routine Description:
-
+/**
Reset the socket.
-Arguments:
-
- Tcp4Io - The Tcp4Io wrapping the TCP socket.
-
-Returns:
+ @param Tcp4Io[in] The Tcp4Io wrapping the TCP socket.
- None.
+ @retval None.
---*/
+**/
+VOID
+Tcp4IoReset (
+ IN TCP4_IO *Tcp4Io
+ )
{
EFI_STATUS Status;
EFI_TCP4_PROTOCOL *Tcp4;
@@ -379,28 +352,23 @@ Returns:
}
}
-EFI_STATUS
-Tcp4IoTransmit (
- IN TCP4_IO *Tcp4Io,
- IN NET_BUF *Packet
- )
-/*++
-
-Routine Description:
-
+/**
Transmit the Packet to the other endpoint of the socket.
-Arguments:
+ @param Tcp4Io[in] The Tcp4Io wrapping the TCP socket.
- Tcp4Io - The Tcp4Io wrapping the TCP socket.
- Packet - The packet to transmit
+ @param Packet[in] The packet to transmit
-Returns:
+ @retval EFI_SUCCESS The packet is trasmitted.
- EFI_SUCCESS - The packet is trasmitted.
- EFI_OUT_OF_RESOURCES - Failed to allocate memory.
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
---*/
+**/
+EFI_STATUS
+Tcp4IoTransmit (
+ IN TCP4_IO *Tcp4Io,
+ IN NET_BUF *Packet
+ )
{
EFI_TCP4_TRANSMIT_DATA *TxData;
EFI_TCP4_PROTOCOL *Tcp4;
@@ -447,35 +415,33 @@ ON_EXIT:
return Status;
}
-EFI_STATUS
-Tcp4IoReceive (
- IN TCP4_IO *Tcp4Io,
- IN NET_BUF *Packet,
- IN BOOLEAN AsyncMode,
- IN EFI_EVENT Timeout
- )
-/*++
+/**
+ Receive data from the socket.
-Routine Description:
+ @param Tcp4Io[in] The Tcp4Io which wraps the socket to be destroyeds.
- Receive data from the socket.
+ @param Packet[in] The buffer to hold the data copy from the soket rx buffer.
-Arguments:
+ @param AsyncMode[in] Is this receive asyncronous or not.
- Tcp4Io - The Tcp4Io which wraps the socket to be destroyeds.
- Packet - The buffer to hold the data copy from the soket rx buffer.
- AsyncMode - Is this receive asyncronous or not.
- Timeout - The time to wait for receiving the amount of data the Packet
- can hold.
+ @param Timeout[in] The time to wait for receiving the amount of data the Packet
+ can hold.
-Returns:
+ @retval EFI_SUCCESS The required amount of data is received from the socket.
- EFI_SUCCESS - The required amount of data is received from the socket.
- EFI_OUT_OF_RESOURCES - Failed to allocate momery.
- EFI_TIMEOUT - Failed to receive the required amount of data in the
- specified time period.
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate momery.
---*/
+ @retval EFI_TIMEOUT Failed to receive the required amount of data in the
+ specified time period.
+
+**/
+EFI_STATUS
+Tcp4IoReceive (
+ IN TCP4_IO *Tcp4Io,
+ IN NET_BUF *Packet,
+ IN BOOLEAN AsyncMode,
+ IN EFI_EVENT Timeout
+ )
{
EFI_TCP4_PROTOCOL *Tcp4;
EFI_TCP4_RECEIVE_DATA RxData;