/** @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
#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
#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
} 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
@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
);\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
} 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
/**\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
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
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
\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
\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