summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Include/Library
diff options
context:
space:
mode:
authorWang Fan <fan.wang@intel.com>2018-01-10 11:09:28 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2018-01-16 11:10:05 +0800
commit2b2087478c861b967394f1ce31531d27ab541b02 (patch)
tree47c5d3815f7badfed3c800e911126e343a69064c /MdeModulePkg/Include/Library
parent0a1bd0a35dece044bee3b1ff580b58a3eeae7a4a (diff)
downloadedk2-2b2087478c861b967394f1ce31531d27ab541b02.tar.gz
edk2-2b2087478c861b967394f1ce31531d27ab541b02.tar.bz2
edk2-2b2087478c861b967394f1ce31531d27ab541b02.zip
MdeModulePkg: Did some code enhancement for DxeIpIoLib.
* In DxeIpIo, there are several places use ASSERT() to check input parameters without and descriptions or error handling. This patch fixed this issue. * Fixed some incorrect descriptions in code commence. * Remove unneeded Exit tag in function IpIoOpen and IpIoConfigIp. * Add EFIAPI tag for function IpIoRefreshNeighbor. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Diffstat (limited to 'MdeModulePkg/Include/Library')
-rw-r--r--MdeModulePkg/Include/Library/IpIoLib.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/MdeModulePkg/Include/Library/IpIoLib.h b/MdeModulePkg/Include/Library/IpIoLib.h
index 463bf95b49..61653b0418 100644
--- a/MdeModulePkg/Include/Library/IpIoLib.h
+++ b/MdeModulePkg/Include/Library/IpIoLib.h
@@ -310,6 +310,8 @@ typedef struct _IP_IO_IP_INFO {
/**
Create a new IP_IO instance.
+
+ If IpVersion is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
This function uses IP4/IP6 service binding protocol in Controller to create
an IP4/IP6 child (aka IP4/IP6 instance).
@@ -353,6 +355,8 @@ IpIoDestroy (
/**
Stop an IP_IO instance.
+
+ If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
This function is paired with IpIoOpen(). The IP_IO will be unconfigured, and all
pending send/receive tokens will be canceled.
@@ -372,7 +376,9 @@ IpIoStop (
/**
Open an IP_IO instance for use.
-
+
+ If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
+
This function is called after IpIoCreate(). It is used for configuring the IP
instance and register the callbacks and their context data for sending and
receiving IP packets.
@@ -401,7 +407,7 @@ IpIoOpen (
/**
Send out an IP packet.
- This function is called after IpIoOpen(). The data to be sent are wrapped in
+ This function is called after IpIoOpen(). The data to be sent is wrapped in
Pkt. The IP instance wrapped in IpIo is used for sending by default but can be
overriden by Sender. Other sending configs, like source address and gateway
address etc., are specified in OverrideData.
@@ -439,6 +445,9 @@ IpIoSend (
/**
Cancel the IP transmit token that wraps this Packet.
+ If IpIo is NULL, then ASSERT().
+ If Packet is NULL, then ASSERT().
+
@param[in] IpIo The pointer to the IP_IO instance.
@param[in] Packet The pointer to the packet of NET_BUF to cancel.
@@ -452,6 +461,9 @@ IpIoCancelTxToken (
/**
Add a new IP instance for sending data.
+
+ If IpIo is NULL, then ASSERT().
+ If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
The function is used to add the IP_IO to the IP_IO sending list. The caller
can later use IpIoFindSender() to get the IP_IO and call IpIoSend() to send
@@ -473,6 +485,8 @@ IpIoAddIp (
Configure the IP instance of this IpInfo and start the receiving if IpConfigData
is not NULL.
+ If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
+
@param[in, out] IpInfo The pointer to the IP_IO_IP_INFO instance.
@param[in, out] IpConfigData The IP4 or IP6 configure data used to configure
the IP instance. If NULL, the IP instance is reset.
@@ -495,6 +509,8 @@ IpIoConfigIp (
/**
Destroy an IP instance maintained in IpIo->IpList for
sending purpose.
+
+ If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().
This function pairs with IpIoAddIp(). The IpInfo is previously created by
IpIoAddIp(). The IP_IO_IP_INFO::RefCnt is decremented and the IP instance
@@ -586,6 +602,7 @@ IpIoGetIcmpErrStatus (
**/
EFI_STATUS
+EFIAPI
IpIoRefreshNeighbor (
IN IP_IO *IpIo,
IN EFI_IP_ADDRESS *Neighbor,