summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h
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.h
parentd16fc3dbb3461dab1cb8a8df21b9e3c2e09723e6 (diff)
downloadedk2-platforms-12618416ec7a468bc7e47d9739cf973a0bb418fc.tar.xz
[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.h')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h81
1 files changed, 78 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h
index 2a70a6bd40..f46e8df8b3 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h
@@ -1,4 +1,5 @@
-/*++
+/**
+ IScsi Tcp4 IO related definitions.
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -15,9 +16,9 @@ Module Name:
Abstract:
- iSCSI Tcp4 IO related definitions.
+ IScsi Tcp4 IO related definitions.
---*/
+**/
#ifndef _ISCSI_TCP4_IO_H_
#define _ISCSI_TCP4_IO_H_
@@ -52,6 +53,22 @@ typedef struct _TCP4_IO {
BOOLEAN IsCloseDone;
} TCP4_IO;
+/**
+ Create a TCP socket with the specified configuration data.
+
+ @param Image[in] The handle of the driver image.
+
+ @param Controller[in] The handle of the controller.
+
+ @param ConfigData[in] The Tcp4 configuration data.
+
+ @param Tcp4Io[in] The Tcp4Io.
+
+ @retval EFI_SUCCESS The TCP socket is created and configured.
+
+ @retval Other Failed to create the TCP socket or configure it.
+
+**/
EFI_STATUS
Tcp4IoCreateSocket (
IN EFI_HANDLE Image,
@@ -60,28 +77,86 @@ Tcp4IoCreateSocket (
IN TCP4_IO *Tcp4Io
);
+/**
+ Destroy the socket.
+
+ @param[in] Tcp4Io The Tcp4Io which wraps the socket to be destroyeds.
+
+ @retval None.
+
+**/
VOID
Tcp4IoDestroySocket (
IN TCP4_IO *Tcp4Io
);
+/**
+ Connect to the other endpoint of the TCP socket.
+
+ @param Tcp4Io[in] The Tcp4Io wrapping the TCP socket.
+
+ @param Timeout[in] The time to wait for connection done.
+
+ @retval None.
+
+**/
EFI_STATUS
Tcp4IoConnect (
IN TCP4_IO *Tcp4Io,
IN EFI_EVENT Timeout
);
+/**
+ Reset the socket.
+
+ @param Tcp4Io[in] The Tcp4Io wrapping the TCP socket.
+
+ @retval None.
+
+**/
VOID
Tcp4IoReset (
IN TCP4_IO *Tcp4Io
);
+/**
+ Transmit the Packet to the other endpoint of the socket.
+
+ @param Tcp4Io[in] The Tcp4Io wrapping the TCP socket.
+
+ @param Packet[in] The packet to transmit
+
+ @retval EFI_SUCCESS The packet is trasmitted.
+
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
+
+**/
EFI_STATUS
Tcp4IoTransmit (
IN TCP4_IO *Tcp4Io,
IN NET_BUF *Packet
);
+/**
+ Receive data from the socket.
+
+ @param Tcp4Io[in] The Tcp4Io which wraps the socket to be destroyeds.
+
+ @param Packet[in] The buffer to hold the data copy from the soket rx buffer.
+
+ @param AsyncMode[in] Is this receive asyncronous or not.
+
+ @param Timeout[in] The time to wait for receiving the amount of data the Packet
+ can hold.
+
+ @retval EFI_SUCCESS The required amount of data is received from the socket.
+
+ @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,