\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
@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
@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
IN IP4_ADDR Src\r
)\r
{\r
- NET_LIST_ENTRY *Entry;\r
+ LIST_ENTRY *Entry;\r
IP4_INTERFACE *IpIf;\r
INTN Type;\r
INTN Class;\r
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
\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
IN IP4_ADDR Ip\r
)\r
{\r
- NET_LIST_ENTRY *Entry;\r
+ LIST_ENTRY *Entry;\r
IP4_INTERFACE *IpIf;\r
\r
NET_LIST_FOR_EACH (Entry, &IpSb->Interfaces) {\r
IN IP4_ADDR Ip\r
)\r
{\r
- NET_LIST_ENTRY *Entry;\r
+ LIST_ENTRY *Entry;\r
IP4_INTERFACE *IpIf;\r
\r
NET_LIST_FOR_EACH (Entry, &IpSb->Interfaces) {\r
IN IP4_ADDR Netmask\r
)\r
{\r
- NET_LIST_ENTRY *Entry;\r
+ LIST_ENTRY *Entry;\r
IP4_INTERFACE *IpIf;\r
\r
NET_LIST_FOR_EACH (Entry, &IpSb->Interfaces) {\r
@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
\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
)\r
{\r
UINT32 NumConfiguredInstance;\r
- NET_LIST_ENTRY *Entry;\r
+ LIST_ENTRY *Entry;\r
UINTN VariableDataSize;\r
EFI_IP4_VARIABLE_DATA *Ip4VariableData;\r
EFI_IP4_ADDRESS_PAIR *Ip4AddressPair;\r
VariableDataSize += sizeof (EFI_IP4_ADDRESS_PAIR) * (NumConfiguredInstance - 1);\r
}\r
\r
- Ip4VariableData = NetAllocatePool (VariableDataSize);\r
+ Ip4VariableData = AllocatePool (VariableDataSize);\r
if (Ip4VariableData == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
);\r
}\r
\r
- NetFreePool (IpSb->MacString);\r
+ gBS->FreePool (IpSb->MacString);\r
}\r
\r
IpSb->MacString = NewMacString;\r
\r
ON_ERROR:\r
\r
- NetFreePool (Ip4VariableData);\r
+ gBS->FreePool (Ip4VariableData);\r
\r
return Status;\r
}\r
NULL\r
);\r
\r
- NetFreePool (IpSb->MacString);\r
+ gBS->FreePool (IpSb->MacString);\r
IpSb->MacString = NULL;\r
}\r