]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.c
Scrubbed some files for IP4
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Common.c
index 561be165d835834f2498b353afe67a1eefd3c37f..89a371400b872894b092f6f2f983a9da334f243a 100644 (file)
@@ -23,7 +23,7 @@ Abstract:
 \r
 \r
 /**\r
-  Return the cast type (Unicast/Boradcast) specific to a\r
+  Return the cast type (Unicast/Boradcast) specific to an\r
   interface. All the addresses are host byte ordered.\r
 \r
   @param  IpAddr                The IP address to classify in host byte order\r
@@ -34,6 +34,7 @@ Abstract:
   @retval IP4_SUBNET_BROADCAST  The IpAddr is a directed subnet boradcast to  the\r
                                 interface\r
   @retval IP4_NET_BROADCAST     The IpAddr is a network broadcast to the interface\r
+  @retval 0                     Otherwise.\r
 \r
 **/\r
 INTN\r
@@ -69,8 +70,8 @@ Ip4GetNetCast (
   @param  Src                   The source address in the packet (host byte order)\r
 \r
   @return The cast type for the Dst, it will return on the first non-promiscuous\r
-  @return cast type to a configured interface. If the packet doesn't match any of\r
-  @return the interface, multicast address and local broadcast address are checked.\r
+          cast type to a configured interface. If the packet doesn't match any of\r
+          the interface, multicast address and local broadcast address are checked.\r
 \r
 **/\r
 INTN\r
@@ -119,11 +120,11 @@ Ip4GetHostCast (
   if (Dst == IP4_ALLONE_ADDRESS) {\r
     IpIf = Ip4FindNet (IpSb, Src);\r
 \r
-    if (IpIf && !IP4_IS_BROADCAST (Ip4GetNetCast (Src, IpIf))) {\r
+    if (IpIf != NULL && !IP4_IS_BROADCAST (Ip4GetNetCast (Src, IpIf))) {\r
       return IP4_LOCAL_BROADCAST;\r
     }\r
 \r
-  } else if (IP4_IS_MULTICAST (Dst) && Ip4FindGroup (&IpSb->IgmpCtrl, Dst)) {\r
+  } else if (IP4_IS_MULTICAST (Dst) && Ip4FindGroup (&IpSb->IgmpCtrl, Dst) != NULL) {\r
     return IP4_MULTICAST;\r
   }\r
 \r
@@ -132,7 +133,7 @@ Ip4GetHostCast (
 \r
 \r
 /**\r
-  Find an interface whose configured IP address is Ip\r
+  Find an interface whose configured IP address is Ip.\r
 \r
   @param  IpSb                  The IP4 service binding instance\r
   @param  Ip                    The Ip address (host byte order) to find\r
@@ -232,8 +233,9 @@ Ip4FindStationAddress (
   @param  Multicast             The multicast IP address to translate.\r
   @param  Mac                   The buffer to hold the translated address.\r
 \r
-  @return Returns EFI_SUCCESS if the multicast IP is successfully\r
-  @return translated to a multicast MAC address. Otherwise some error.\r
+  @retval EFI_SUCCESS if the multicast IP is successfully translated to a\r
+                      multicast MAC address.\r
+  @retval other       Otherwise some error.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -277,9 +279,13 @@ Ip4NtohHead (
 \r
 /**\r
   Set the Ip4 variable data.\r
+  \r
+  Save the list of all of the IPv4 addresses and subnet masks that are currently\r
+  being used to volatile variable storage.\r
 \r
   @param  IpSb                  Ip4 service binding instance\r
 \r
+  @retval EFI_SUCCESS           Successfully set variable.\r
   @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
   @retval other                 Set variable failed.\r
 \r