]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/IpIoDxe: Update API description to match the function implementation.
authorFu Siyuan <siyuan.fu@intel.com>
Wed, 13 Dec 2017 07:30:14 +0000 (15:30 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Fri, 22 Dec 2017 05:37:08 +0000 (13:37 +0800)
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>
MdeModulePkg/Include/Library/IpIoLib.h
MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c

index 059eb05f172a2361c9437a25fb39a37788220b72..bae7113407cb6abf074fed7e7c86f3cd13dd7d80 100644 (file)
@@ -385,6 +385,7 @@ IpIoStop (
                                       successfully.\r
   @retval          EFI_ACCESS_DENIED  The IP_IO instance is configured; avoid  \r
                                       reopening it.\r
+  @retval          EFI_UNSUPPORTED    IPv4 RawData mode is no supported.\r
   @retval          Others             An error condition occurred.\r
 \r
 **/\r
@@ -418,6 +419,7 @@ IpIoOpen (
   @retval          EFI_INVALID_PARAMETER The input parameter is not correct.\r
   @retval          EFI_NOT_STARTED       The IpIo is not configured.\r
   @retval          EFI_OUT_OF_RESOURCES  Failed due to resource limit.\r
+  @retval          Others                Error condition occurred.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -543,6 +545,7 @@ IpIoFindSender (
   @param[out]  IsHard                If TRUE, indicates that it is a hard error.\r
   @param[out]  Notify                If TRUE, SockError needs to be notified.\r
 \r
+  @retval EFI_UNSUPPORTED            Unrecognizable ICMP error code\r
   @return The ICMP Error Status, such as EFI_NETWORK_UNREACHABLE.\r
 \r
 **/\r
@@ -576,6 +579,7 @@ IpIoGetIcmpErrStatus (
   @retval      EFI_INVALID_PARAMETER The Neighbor Address is invalid.\r
   @retval      EFI_NOT_FOUND         The neighbor cache entry is not in the \r
                                      neighbor table.  \r
+  @retval      EFI_UNSUPPORTED       IP version is IPv4, which doesn't support neighbor cache refresh.\r
   @retval      EFI_OUT_OF_RESOURCES  Failed due to resource limitations.\r
 \r
 **/\r
index fe5699d9517885544df2165117ebd7c367fa2008..1436da777af662a209ef3057d028e938bc52eda0 100644 (file)
@@ -129,6 +129,7 @@ IpIoTransmitHandler (
 \r
   @retval       EFI_SUCCESS        The IP child is created and the IP protocol\r
                                    interface is retrieved.\r
+  @retval       EFI_UNSUPPORTED    Upsupported IpVersion.\r
   @retval       Others             The required operation failed.\r
 \r
 **/\r
@@ -206,6 +207,7 @@ IpIoCreateIpChildOpenProtocol (
 \r
   @retval     EFI_SUCCESS         The IP protocol is closed and the relevant IP child\r
                                   is destroyed.\r
+  @retval     EFI_UNSUPPORTED     Upsupported IpVersion.\r
   @retval     Others              The required operation failed.\r
 \r
 **/\r
@@ -1289,6 +1291,7 @@ ReleaseIpIo:
                                       successfully.\r
   @retval          EFI_ACCESS_DENIED  The IP_IO instance is configured, avoid to \r
                                       reopen it.\r
+  @retval          EFI_UNSUPPORTED    IPv4 RawData mode is no supported.\r
   @retval          Others             Error condition occurred.\r
 \r
 **/\r
@@ -1501,20 +1504,28 @@ IpIoDestroy (
   IN OUT IP_IO *IpIo\r
   )\r
 {\r
+  EFI_STATUS    Status;\r
+  \r
   //\r
   // Stop the IpIo.\r
   //\r
-  IpIoStop (IpIo);\r
+  Status = IpIoStop (IpIo);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   //\r
   // Close the IP protocol and destroy the child.\r
   //\r
-  IpIoCloseProtocolDestroyIpChild (\r
-    IpIo->Controller,\r
-    IpIo->Image,\r
-    IpIo->ChildHandle,\r
-    IpIo->IpVersion\r
-    );\r
+  Status = IpIoCloseProtocolDestroyIpChild (\r
+             IpIo->Controller,\r
+             IpIo->Image,\r
+             IpIo->ChildHandle,\r
+             IpIo->IpVersion\r
+             );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   gBS->FreePool (IpIo);\r
 \r
@@ -1545,6 +1556,7 @@ IpIoDestroy (
   @retval          EFI_INVALID_PARAMETER The input parameter is not correct.\r
   @retval          EFI_NOT_STARTED       The IpIo is not configured.\r
   @retval          EFI_OUT_OF_RESOURCES  Failed due to resource limit.\r
+  @retval          Others                Error condition occurred.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -2073,6 +2085,7 @@ IpIoFindSender (
   @param[out]  IsHard                If TRUE, indicates that it is a hard error.\r
   @param[out]  Notify                If TRUE, SockError needs to be notified.\r
 \r
+  @retval EFI_UNSUPPORTED            Unrecognizable ICMP error code.\r
   @return ICMP Error Status, such as EFI_NETWORK_UNREACHABLE.\r
 \r
 **/\r
@@ -2191,6 +2204,7 @@ IpIoGetIcmpErrStatus (
   @retval      EFI_INVALID_PARAMETER Neighbor Address is invalid.\r
   @retval      EFI_NOT_FOUND         The neighbor cache entry is not in the \r
                                      neighbor table.  \r
+  @retval      EFI_UNSUPPORTED       IP version is IPv4, which doesn't support neighbor cache refresh.\r
   @retval      EFI_OUT_OF_RESOURCES  Failed due to resource limit.\r
 \r
 **/\r
@@ -2203,10 +2217,14 @@ IpIoRefreshNeighbor (
 {\r
   EFI_IP6_PROTOCOL  *Ip;\r
 \r
-  if (!IpIo->IsConfigured || IpIo->IpVersion != IP_VERSION_6) {\r
+  if (!IpIo->IsConfigured) {\r
     return EFI_NOT_STARTED;\r
   }\r
 \r
+  if (IpIo->IpVersion != IP_VERSION_6) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   Ip = IpIo->Ip.Ip6;\r
 \r
   return Ip->Neighbors (Ip, FALSE, &Neighbor->v6, NULL, Timeout, TRUE);\r