/** @file\r
The implementation of the Udp4 protocol.\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation.<BR> \r
+Copyright (c) 2006 - 2010, Intel Corporation.<BR> \r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
/**\r
Create the Udp service context data.\r
\r
- @param Udp4Service Pointer to the UDP4_SERVICE_DATA.\r
- @param ImageHandle The image handle of this udp4 driver.\r
- @param ControllerHandle The controller handle this udp4 driver binds on.\r
+ @param[in, out] Udp4Service Pointer to the UDP4_SERVICE_DATA.\r
+ @param[in] ImageHandle The image handle of this udp4 driver.\r
+ @param[in] ControllerHandle The controller handle this udp4 driver binds on.\r
\r
- @retval EFI_SUCCESS The udp4 service context data is created and\r
- initialized.\r
- @retval EFI_OUT_OF_RESOURCES Cannot allocate memory.\r
- @retval other Other error occurs.\r
+ @retval EFI_SUCCESS The udp4 service context data is created and\r
+ initialized.\r
+ @retval EFI_OUT_OF_RESOURCES Cannot allocate memory.\r
+ @retval other Other error occurs.\r
\r
**/\r
EFI_STATUS\r
/**\r
This function intializes the new created udp instance.\r
\r
- @param Udp4Service Pointer to the UDP4_SERVICE_DATA.\r
- @param Instance Pointer to the un-initialized UDP4_INSTANCE_DATA.\r
+ @param[in] Udp4Service Pointer to the UDP4_SERVICE_DATA.\r
+ @param[in, out] Instance Pointer to the un-initialized UDP4_INSTANCE_DATA.\r
\r
**/\r
VOID\r
This function tries to bind the udp instance according to the configured port\r
allocation strategy.\r
\r
- @param InstanceList Pointer to the head of the list linking the udp\r
+ @param[in] InstanceList Pointer to the head of the list linking the udp\r
instances.\r
- @param ConfigData Pointer to the ConfigData of the instance to be\r
+ @param[in, out] ConfigData Pointer to the ConfigData of the instance to be\r
bound. ConfigData->StationPort will be assigned\r
with an available port value on success.\r
\r
if (TxData->GatewayAddress != NULL) {\r
CopyMem (&GatewayAddress, TxData->GatewayAddress, sizeof (IP4_ADDR));\r
\r
- if (!Ip4IsUnicast (NTOHL (GatewayAddress), 0)) {\r
+ if (!NetIp4IsUnicast (NTOHL (GatewayAddress), 0)) {\r
//\r
// The specified GatewayAddress is not a unicast IPv4 address while it's not 0.\r
//\r
\r
CopyMem (&SourceAddress, &UdpSessionData->SourceAddress, sizeof (IP4_ADDR));\r
\r
- if ((SourceAddress != 0) && !Ip4IsUnicast (HTONL (SourceAddress), 0)) {\r
+ if ((SourceAddress != 0) && !NetIp4IsUnicast (HTONL (SourceAddress), 0)) {\r
//\r
// Check whether SourceAddress is a valid IPv4 address in case it's not zero.\r
// The configured station address is used if SourceAddress is zero.\r
/**\r
This function removes the specified Token from the TokenMap.\r
\r
- @param TokenMap Pointer to the NET_MAP containing the tokens.\r
- @param Token Pointer to the Token to be removed.\r
+ @param[in, out] TokenMap Pointer to the NET_MAP containing the tokens.\r
+ @param[in] Token Pointer to the Token to be removed.\r
\r
@retval EFI_SUCCESS The specified Token is removed from the TokenMap.\r
@retval EFI_NOT_FOUND The specified Token is not found in the TokenMap.\r
/**\r
This function removes the multicast group specified by Arg from the Map.\r
\r
- @param Map Pointer to the NET_MAP.\r
- @param Item Pointer to the NET_MAP_ITEM.\r
- @param Arg Pointer to the Arg, it's the pointer to a\r
+ @param[in, out] Map Pointer to the NET_MAP.\r
+ @param[in] Item Pointer to the NET_MAP_ITEM.\r
+ @param[in] Arg Pointer to the Arg, it's the pointer to a\r
multicast IPv4 Address.\r
\r
@retval EFI_SUCCESS The multicast address is removed.\r
//\r
gBS->CloseEvent (Wrap->RxData.RecycleSignal);\r
\r
- gBS->FreePool (Wrap);\r
+ FreePool (Wrap);\r
}\r
\r
\r
&Wrap->RxData.RecycleSignal\r
);\r
if (EFI_ERROR (Status)) {\r
- gBS->FreePool (Wrap);\r
+ FreePool (Wrap);\r
return NULL;\r
}\r
\r
//\r
Instance = NET_LIST_USER_STRUCT (Entry, UDP4_INSTANCE_DATA, Link);\r
\r
- if (!Instance->Configured ||\r
- Instance->ConfigData.AcceptPromiscuous ||\r
- Instance->ConfigData.AcceptAnyPort ||\r
- EFI_IP4_EQUAL (&Instance->ConfigData.StationAddress, &mZeroIp4Addr)\r
- ) {\r
- //\r
- // Don't try to deliver the ICMP error to this instance if it is not configured,\r
- // or it's configured to be promiscuous or accept any port or accept all the\r
- // datagrams.\r
- //\r
+ if (!Instance->Configured) {\r
continue;\r
}\r
\r
/**\r
Set the Udp4 variable data.\r
\r
- @param Udp4Service Udp4 service data.\r
+ @param[in] Udp4Service Udp4 service data.\r
\r
@retval EFI_OUT_OF_RESOURCES There are not enough resources to set the\r
variable.\r
);\r
}\r
\r
- gBS->FreePool (Udp4Service->MacString);\r
+ FreePool (Udp4Service->MacString);\r
}\r
\r
Udp4Service->MacString = NewMacString;\r
\r
ON_ERROR:\r
\r
- gBS->FreePool (Udp4VariableData);\r
+ FreePool (Udp4VariableData);\r
\r
return Status;\r
}\r
NULL\r
);\r
\r
- gBS->FreePool (Udp4Service->MacString);\r
+ FreePool (Udp4Service->MacString);\r
Udp4Service->MacString = NULL;\r
}\r