]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/IpIoLib.h
MdeModulePkg LockBoxLib: Support LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY
[mirror_edk2.git] / MdeModulePkg / Include / Library / IpIoLib.h
index bae7113407cb6abf074fed7e7c86f3cd13dd7d80..61653b0418e3f894e36a549e842d1336dc599b3b 100644 (file)
@@ -310,6 +310,8 @@ typedef struct _IP_IO_IP_INFO {
 \r
 /**\r
   Create a new IP_IO instance.\r
+\r
+  If IpVersion is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().\r
   \r
   This function uses IP4/IP6 service binding protocol in Controller to create\r
   an IP4/IP6 child (aka IP4/IP6 instance).\r
@@ -353,14 +355,17 @@ IpIoDestroy (
 \r
 /**\r
   Stop an IP_IO instance.\r
+\r
+  If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().\r
   \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            The pointer to the IP_IO instance that needs to stop.\r
 \r
-  @retval          EFI_SUCCESS     The IP_IO instance stopped successfully.\r
-  @retval          Others          Anrror condition occurred.\r
+  @retval          EFI_SUCCESS            The IP_IO instance stopped successfully.\r
+  @retval          EFI_INVALID_PARAMETER  Invalid input parameter.\r
+  @retval          Others                 Anrror condition occurred.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -371,7 +376,9 @@ IpIoStop (
 \r
 /**\r
   Open an IP_IO instance for use.\r
-  \r
+\r
+  If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().\r
+\r
   This function is called after IpIoCreate(). It is used for configuring the IP\r
   instance and register the callbacks and their context data for sending and\r
   receiving IP packets.\r
@@ -381,12 +388,13 @@ IpIoStop (
   @param[in]       OpenData           The configuration data and callbacks for\r
                                       the IP_IO instance.\r
 \r
-  @retval          EFI_SUCCESS        The IP_IO instance opened with OpenData\r
-                                      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
+  @retval          EFI_SUCCESS            The IP_IO instance opened with OpenData\r
+                                          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          EFI_INVALID_PARAMETER  Invalid input parameter.\r
+  @retval          Others                 Error condition occurred.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -399,7 +407,7 @@ IpIoOpen (
 /**\r
   Send out an IP packet.\r
   \r
-  This function is called after IpIoOpen(). The data to be sent are wrapped in\r
+  This function is called after IpIoOpen(). The data to be sent is 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
@@ -437,6 +445,9 @@ IpIoSend (
 /**\r
   Cancel the IP transmit token that wraps this Packet.\r
 \r
+  If IpIo is NULL, then ASSERT().\r
+  If Packet is NULL, then ASSERT().\r
+\r
   @param[in]  IpIo                  The pointer to the IP_IO instance.\r
   @param[in]  Packet                The pointer to the packet of NET_BUF to cancel.\r
 \r
@@ -450,6 +461,9 @@ IpIoCancelTxToken (
 \r
 /**\r
   Add a new IP instance for sending data.\r
+\r
+  If IpIo is NULL, then ASSERT().\r
+  If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().\r
   \r
   The function is used to add the IP_IO to the IP_IO sending list. The caller\r
   can later use IpIoFindSender() to get the IP_IO and call IpIoSend() to send\r
@@ -471,6 +485,8 @@ IpIoAddIp (
   Configure the IP instance of this IpInfo and start the receiving if IpConfigData\r
   is not NULL.\r
 \r
+  If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().\r
+\r
   @param[in, out]  IpInfo          The pointer to the IP_IO_IP_INFO instance.\r
   @param[in, out]  IpConfigData    The IP4 or IP6 configure data used to configure \r
                                    the IP instance. If NULL, the IP instance is reset.\r
@@ -493,6 +509,8 @@ IpIoConfigIp (
 /**\r
   Destroy an IP instance maintained in IpIo->IpList for\r
   sending purpose.\r
+\r
+  If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT().  \r
   \r
   This function pairs with IpIoAddIp(). The IpInfo is previously created by\r
   IpIoAddIp(). The IP_IO_IP_INFO::RefCnt is decremented and the IP instance\r
@@ -522,7 +540,7 @@ IpIoRemoveIp (
   @param[in]       Src               The local IP address.\r
 \r
   @return The pointer to the IP protocol can be used for sending purpose and its local\r
-          address is the same with Src.\r
+          address is the same with Src. NULL if failed.\r
 \r
 **/\r
 IP_IO_IP_INFO *\r
@@ -584,6 +602,7 @@ IpIoGetIcmpErrStatus (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 IpIoRefreshNeighbor (\r
   IN IP_IO           *IpIo,\r
   IN EFI_IP_ADDRESS  *Neighbor,\r