]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/IpIoLib.h
Committing changes to the comments, to improve code documentation.
[mirror_edk2.git] / MdeModulePkg / Include / Library / IpIoLib.h
index a4fbcfd1a37d09fc4c1d0b7e74c004f30a874365..daf8c308a1076ff55cef95c1748e844888702313 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
   Ihis library is only intended to be used by UEFI network stack modules.\r
-  It provides IpIo layer upon EFI IP4 Protocol.\r
+  It provides the IpIo layer on the EFI IP4 Protocol.\r
 \r
 Copyright (c) 2005 - 2008, Intel Corporation.<BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/NetLib.h>\r
 \r
 //\r
-// type and code define for ICMP protocol error got\r
+// type and code define for ICMP protocol error \r
 // from IP\r
 //\r
 #define ICMP_TYPE_UNREACH              3\r
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define ICMP_CODE_UNREACH_TOSHOST      12\r
 \r
 /**\r
-  Get the IP header length from EFI_IP4_HEADER struct. HeaderLength is\r
+  Get the IP header length from the struct EFI_IP4_HEADER. HeaderLength is\r
   Internet header length in 32-bit words, so HeaderLength<<2 is the real\r
   length of IP header.\r
   \r
@@ -98,7 +98,7 @@ typedef enum {
 } ICMP_ERROR;\r
 \r
 ///\r
-/// The helper struct for IpIoGetIcmpErrStatus(). It is internal-use only.\r
+/// The helper struct for IpIoGetIcmpErrStatus(). It is for internal use only.\r
 ///\r
 typedef struct {\r
   BOOLEAN     IsHard;\r
@@ -121,7 +121,7 @@ typedef struct _EFI_NET_SESSION_DATA {
   @param[in] IcmpErr       Valid when Status is EFI_ICMP_ERROR\r
   @param[in] NetSession    The IP session for the received packet\r
   @param[in] Pkt           Packet received\r
-  @param[in] Context       The data provided by user for the received packet when\r
+  @param[in] Context       The data provided by the user for the received packet when\r
                            the callback is registered in IP_IO_OPEN_DATA::RcvdContext.\r
   \r
 **/\r
@@ -155,7 +155,7 @@ VOID
   );\r
 \r
 ///\r
-/// The data structure wraps Ip4 instance. It is used by IpIo Library to do all\r
+/// This data structure wraps Ip4 instances. The IpIo Library uses it for all\r
 /// Ip4 operations.\r
 ///\r
 typedef struct _IP_IO {\r
@@ -203,7 +203,7 @@ typedef struct _IP_IO {
 } IP_IO;\r
 \r
 ///\r
-/// The struct is used for user to pass IP configuration and callbacks to IP_IO.\r
+/// The struct is for the user to pass IP configuration and callbacks to IP_IO.\r
 /// It is used by IpIoOpen().\r
 ///\r
 typedef struct _IP_IO_OPEN_DATA {\r
@@ -289,8 +289,8 @@ IpIoDestroy (
 /**\r
   Stop an IP_IO instance.\r
   \r
-  This function is paired with IpIoOpen(). The IP_IO will be unconfigured and all\r
-  the pending send/receive tokens will be canceled.\r
+  This function is paired with IpIoOpen(). The IP_IO will be unconfigured, and all\r
+  pending send/receive tokens will be canceled.\r
 \r
   @param[in, out]  IpIo            Pointer to the IP_IO instance that needs to stop.\r
 \r
@@ -334,14 +334,14 @@ IpIoOpen (
   Send out an IP packet.\r
   \r
   This function is called after IpIoOpen(). The data to be sent are wrapped in\r
-  Pkt. The IP instance wrapped in IpIo is used for sending by default but can be\r
-  overriden by Sender. Other sending configs, like source address and gateway\r
-  address etc., are specified in OverrideData.\r
+  Pkt. The IP instance wrapped in IpIo is used for sending by default, but can be\r
+  overriden by Sender. Other sending configurations, such as source address and gateway\r
+  address, are specified in OverrideData.\r
 \r
   @param[in, out]  IpIo                  Pointer to an IP_IO instance used for sending IP\r
                                          packet.\r
   @param[in, out]  Pkt                   Pointer to the IP packet to be sent.\r
-  @param[in]       Sender                The IP protocol instance used for sending.\r
+  @param[in]       Sender                Optional. The IP protocol instance used for sending.\r
   @param[in]       Context               Optional context data.\r
   @param[in]       NotifyData            Optional notify data.\r
   @param[in]       Dest                  The destination IP address to send this packet to.\r
@@ -386,8 +386,8 @@ IpIoCancelTxToken (
   can later use IpIoFindSender() to get the IP_IO and call IpIoSend() to send\r
   data.\r
 \r
-  @param[in, out]  IpIo               Pointer to a IP_IO instance to add a new IP\r
-                                      instance for sending purpose.\r
+  @param[in, out]  IpIo               Pointer to an IP_IO instance to add a new IP\r
+                                      instance for sending purposes.\r
 \r
   @return Pointer to the created IP_IO_IP_INFO structure, NULL if failed.\r
 \r
@@ -404,14 +404,14 @@ IpIoAddIp (
 \r
   @param[in, out]  IpInfo          Pointer to the IP_IO_IP_INFO instance.\r
   @param[in, out]  Ip4ConfigData   The IP4 configure data used to configure the IP\r
-                                   instance, if NULL the IP instance is reset. If\r
+                                   instance. If NULL, the IP instance is reset. If\r
                                    UseDefaultAddress is set to TRUE, and the configure\r
                                    operation succeeds, the default address information\r
                                    is written back in this Ip4ConfigData.\r
 \r
-  @retval          EFI_SUCCESS     The IP instance of this IpInfo is configured successfully\r
-                                   or no need to reconfigure it.\r
-  @retval          Others          Configuration fails.\r
+  @retval          EFI_SUCCESS     The IP instance of this IpInfo is configured successfully,\r
+                                   or there is no need to reconfigure it.\r
+  @retval          Others          Configuration failed.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -442,7 +442,7 @@ IpIoRemoveIp (
 \r
 /**\r
   Find the first IP protocol maintained in IpIo whose local\r
-  address is the same with Src.\r
+  address is the same as Src.\r
   \r
   This function is called when the caller needs the IpIo to send data to the\r
   specified Src. The IpIo was added previously by IpIoAddIp().\r