summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2017-12-13 15:30:14 +0800
committerFu Siyuan <siyuan.fu@intel.com>2017-12-22 13:37:08 +0800
commit6dbfed92f8cdcd35a09267327c0f9a876d180928 (patch)
treebdd6280501896daa9fbf86f6dcc7ad0030061441 /MdeModulePkg
parentc167ef913106048db68acfdbe27987a79fefda82 (diff)
downloadedk2-6dbfed92f8cdcd35a09267327c0f9a876d180928.zip
edk2-6dbfed92f8cdcd35a09267327c0f9a876d180928.tar.gz
edk2-6dbfed92f8cdcd35a09267327c0f9a876d180928.tar.bz2
MdeModulePkg/IpIoDxe: Update API description to match the function implementation.
This patch updates some API descriptions in DxeIpIoLib to match the real implementation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Include/Library/IpIoLib.h4
-rw-r--r--MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c34
2 files changed, 30 insertions, 8 deletions
diff --git a/MdeModulePkg/Include/Library/IpIoLib.h b/MdeModulePkg/Include/Library/IpIoLib.h
index 059eb05..bae7113 100644
--- a/MdeModulePkg/Include/Library/IpIoLib.h
+++ b/MdeModulePkg/Include/Library/IpIoLib.h
@@ -385,6 +385,7 @@ IpIoStop (
successfully.
@retval EFI_ACCESS_DENIED The IP_IO instance is configured; avoid
reopening it.
+ @retval EFI_UNSUPPORTED IPv4 RawData mode is no supported.
@retval Others An error condition occurred.
**/
@@ -418,6 +419,7 @@ IpIoOpen (
@retval EFI_INVALID_PARAMETER The input parameter is not correct.
@retval EFI_NOT_STARTED The IpIo is not configured.
@retval EFI_OUT_OF_RESOURCES Failed due to resource limit.
+ @retval Others Error condition occurred.
**/
EFI_STATUS
@@ -543,6 +545,7 @@ IpIoFindSender (
@param[out] IsHard If TRUE, indicates that it is a hard error.
@param[out] Notify If TRUE, SockError needs to be notified.
+ @retval EFI_UNSUPPORTED Unrecognizable ICMP error code
@return The ICMP Error Status, such as EFI_NETWORK_UNREACHABLE.
**/
@@ -576,6 +579,7 @@ IpIoGetIcmpErrStatus (
@retval EFI_INVALID_PARAMETER The Neighbor Address is invalid.
@retval EFI_NOT_FOUND The neighbor cache entry is not in the
neighbor table.
+ @retval EFI_UNSUPPORTED IP version is IPv4, which doesn't support neighbor cache refresh.
@retval EFI_OUT_OF_RESOURCES Failed due to resource limitations.
**/
diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
index fe5699d..1436da7 100644
--- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
+++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
@@ -129,6 +129,7 @@ IpIoTransmitHandler (
@retval EFI_SUCCESS The IP child is created and the IP protocol
interface is retrieved.
+ @retval EFI_UNSUPPORTED Upsupported IpVersion.
@retval Others The required operation failed.
**/
@@ -206,6 +207,7 @@ IpIoCreateIpChildOpenProtocol (
@retval EFI_SUCCESS The IP protocol is closed and the relevant IP child
is destroyed.
+ @retval EFI_UNSUPPORTED Upsupported IpVersion.
@retval Others The required operation failed.
**/
@@ -1289,6 +1291,7 @@ ReleaseIpIo:
successfully.
@retval EFI_ACCESS_DENIED The IP_IO instance is configured, avoid to
reopen it.
+ @retval EFI_UNSUPPORTED IPv4 RawData mode is no supported.
@retval Others Error condition occurred.
**/
@@ -1501,20 +1504,28 @@ IpIoDestroy (
IN OUT IP_IO *IpIo
)
{
+ EFI_STATUS Status;
+
//
// Stop the IpIo.
//
- IpIoStop (IpIo);
+ Status = IpIoStop (IpIo);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
//
// Close the IP protocol and destroy the child.
//
- IpIoCloseProtocolDestroyIpChild (
- IpIo->Controller,
- IpIo->Image,
- IpIo->ChildHandle,
- IpIo->IpVersion
- );
+ Status = IpIoCloseProtocolDestroyIpChild (
+ IpIo->Controller,
+ IpIo->Image,
+ IpIo->ChildHandle,
+ IpIo->IpVersion
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
gBS->FreePool (IpIo);
@@ -1545,6 +1556,7 @@ IpIoDestroy (
@retval EFI_INVALID_PARAMETER The input parameter is not correct.
@retval EFI_NOT_STARTED The IpIo is not configured.
@retval EFI_OUT_OF_RESOURCES Failed due to resource limit.
+ @retval Others Error condition occurred.
**/
EFI_STATUS
@@ -2073,6 +2085,7 @@ IpIoFindSender (
@param[out] IsHard If TRUE, indicates that it is a hard error.
@param[out] Notify If TRUE, SockError needs to be notified.
+ @retval EFI_UNSUPPORTED Unrecognizable ICMP error code.
@return ICMP Error Status, such as EFI_NETWORK_UNREACHABLE.
**/
@@ -2191,6 +2204,7 @@ IpIoGetIcmpErrStatus (
@retval EFI_INVALID_PARAMETER Neighbor Address is invalid.
@retval EFI_NOT_FOUND The neighbor cache entry is not in the
neighbor table.
+ @retval EFI_UNSUPPORTED IP version is IPv4, which doesn't support neighbor cache refresh.
@retval EFI_OUT_OF_RESOURCES Failed due to resource limit.
**/
@@ -2203,10 +2217,14 @@ IpIoRefreshNeighbor (
{
EFI_IP6_PROTOCOL *Ip;
- if (!IpIo->IsConfigured || IpIo->IpVersion != IP_VERSION_6) {
+ if (!IpIo->IsConfigured) {
return EFI_NOT_STARTED;
}
+ if (IpIo->IpVersion != IP_VERSION_6) {
+ return EFI_UNSUPPORTED;
+ }
+
Ip = IpIo->Ip.Ip6;
return Ip->Neighbors (Ip, FALSE, &Neighbor->v6, NULL, Timeout, TRUE);