]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h
BaseTools:Change the path of the file that Binary Cache
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Udp4Dxe / Udp4Impl.h
index ae6874715924956a753780a134bb9764781cad4d..a5dd1ecabe5fb45b9042865c5d28e16df0097cfd 100644 (file)
@@ -1,29 +1,15 @@
 /** @file\r
+  EFI UDPv4 protocol implementation.\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-Module Name:\r
-\r
-  Udp4Impl.h\r
-\r
-Abstract:\r
-\r
-  EFI UDPv4 protocol implementation\r
-\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #ifndef _UDP4_IMPL_H_\r
 #define _UDP4_IMPL_H_\r
 \r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 \r
 #include <Protocol/Ip4.h>\r
 #include <Protocol/Udp4.h>\r
@@ -37,12 +23,16 @@ Abstract:
 #include <Library/UefiLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include <Library/TimerLib.h>\r
+#include <Library/DpcLib.h>\r
+#include <Library/PrintLib.h>\r
 \r
 #include "Udp4Driver.h"\r
 \r
 \r
 extern EFI_COMPONENT_NAME_PROTOCOL     gUdp4ComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL    gUdp4ComponentName2;\r
+extern EFI_UNICODE_STRING_TABLE        *gUdpControllerNameTable;\r
 extern EFI_SERVICE_BINDING_PROTOCOL    mUdp4ServiceBinding;\r
 extern EFI_UDP4_PROTOCOL               mUdp4Protocol;\r
 extern UINT16                          mUdp4RandomPort;\r
@@ -51,12 +41,12 @@ extern UINT16                          mUdp4RandomPort;
 \r
 #define UDP4_TIMEOUT_INTERVAL (50 * TICKS_PER_MS)  // 50 milliseconds\r
 \r
-#define UDP4_HEADER_SIZE      sizeof (EFI_UDP4_HEADER)\r
+#define UDP4_HEADER_SIZE      sizeof (EFI_UDP_HEADER)\r
 #define UDP4_MAX_DATA_SIZE    65507\r
 \r
 #define UDP4_PORT_KNOWN       1024\r
 \r
-#define UDP4_SERVICE_DATA_SIGNATURE  EFI_SIGNATURE_32('U', 'd', 'p', '4')\r
+#define UDP4_SERVICE_DATA_SIGNATURE  SIGNATURE_32('U', 'd', 'p', '4')\r
 \r
 #define UDP4_SERVICE_DATA_FROM_THIS(a) \\r
   CR ( \\r
@@ -76,11 +66,9 @@ typedef struct _UDP4_SERVICE_DATA_ {
   IP_IO                         *IpIo;\r
 \r
   EFI_EVENT                     TimeoutEvent;\r
-\r
-  CHAR16                        *MacString;\r
 } UDP4_SERVICE_DATA;\r
 \r
-#define UDP4_INSTANCE_DATA_SIGNATURE  EFI_SIGNATURE_32('U', 'd', 'p', 'I')\r
+#define UDP4_INSTANCE_DATA_SIGNATURE  SIGNATURE_32('U', 'd', 'p', 'I')\r
 \r
 #define UDP4_INSTANCE_DATA_FROM_THIS(a) \\r
   CR ( \\r
@@ -115,7 +103,7 @@ typedef struct _UDP4_INSTANCE_DATA_ {
 \r
   IP_IO_IP_INFO         *IpInfo;\r
 \r
-  BOOLEAN               Destroyed;\r
+  BOOLEAN               InDestroy;\r
 } UDP4_INSTANCE_DATA;\r
 \r
 typedef struct _UDP4_RXDATA_WRAP_ {\r
@@ -125,6 +113,12 @@ typedef struct _UDP4_RXDATA_WRAP_ {
   EFI_UDP4_RECEIVE_DATA  RxData;\r
 } UDP4_RXDATA_WRAP;\r
 \r
+typedef struct {\r
+  EFI_SERVICE_BINDING_PROTOCOL  *ServiceBinding;\r
+  UINTN                         NumberOfChildren;\r
+  EFI_HANDLE                    *ChildHandleBuffer;\r
+} UDP4_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;\r
+\r
 /**\r
   Reads the current operational settings.\r
 \r
@@ -133,11 +127,11 @@ typedef struct _UDP4_RXDATA_WRAP_ {
   optionally to retrieve the operational mode data of underlying networks or\r
   drivers.\r
 \r
-  @param  This           Pointer to the EFI_UDP4_PROTOCOL instance.\r
-  @param  Udp4ConfigData Pointer to the buffer to receive the current configuration data.\r
-  @param  Ip4ModeData    Pointer to the EFI IPv4 Protocol mode data structure.\r
-  @param  MnpConfigData  Pointer to the managed network configuration data structure.\r
-  @param  SnpModeData    Pointer to the simple network mode data structure.\r
+  @param[in]  This              Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param[out] Udp4ConfigData    Pointer to the buffer to receive the current configuration data.\r
+  @param[out] Ip4ModeData       Pointer to the EFI IPv4 Protocol mode data structure.\r
+  @param[out] MnpConfigData     Pointer to the managed network configuration data structure.\r
+  @param[out] SnpModeData       Pointer to the simple network mode data structure.\r
 \r
   @retval EFI_SUCCESS           The mode data was read.\r
   @retval EFI_NOT_STARTED       When Udp4ConfigData is queried, no configuration data is\r
@@ -158,7 +152,7 @@ Udp4GetModeData (
 /**\r
   Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4\r
   Protocol.\r
-  \r
+\r
   The Configure() function is used to do the following:\r
   * Initialize and start this instance of the EFI UDPv4 Protocol.\r
   * Change the filtering rules and operational parameters.\r
@@ -170,8 +164,8 @@ Udp4GetModeData (
   With different parameters in UdpConfigData, Configure() can be used to bind\r
   this instance to specified port.\r
 \r
-  @param  This           Pointer to the EFI_UDP4_PROTOCOL instance.\r
-  @param  UdpConfigData  Pointer to the buffer to receive the current configuration data.\r
+  @param[in]  This              Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param[in]  UdpConfigData     Pointer to the buffer to receive the current configuration data.\r
 \r
   @retval EFI_SUCCESS           The configuration settings were set, changed, or reset successfully.\r
   @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP,\r
@@ -185,7 +179,7 @@ Udp4GetModeData (
   @retval EFI_OUT_OF_RESOURCES  The EFI UDPv4 Protocol driver cannot allocate memory for this\r
                                 EFI UDPv4 Protocol instance.\r
   @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred and this instance\r
-                                 was not opened. \r
+                                 was not opened.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -197,15 +191,15 @@ Udp4Configure (
 \r
 /**\r
   Joins and leaves multicast groups.\r
-  \r
+\r
   The Groups() function is used to enable and disable the multicast group\r
   filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all\r
   currently joined groups are left.\r
 \r
-  @param  This             Pointer to the EFI_UDP4_PROTOCOL instance.\r
-  @param  JoinFlag         Set to TRUE to join a multicast group. Set to FALSE to leave one\r
-                           or all multicast groups.\r
-  @param  MulticastAddress Pointer to multicast group address to join or leave.\r
+  @param[in]  This              Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param[in]  JoinFlag          Set to TRUE to join a multicast group. Set to FALSE to leave one\r
+                                or all multicast groups.\r
+  @param[in]  MulticastAddress  Pointer to multicast group address to join or leave.\r
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_NOT_STARTED       The EFI UDPv4 Protocol instance has not been started.\r
@@ -234,7 +228,7 @@ Udp4Groups (
 \r
 /**\r
   Adds and deletes routing table entries.\r
-  \r
+\r
   The Routes() function adds a route to or deletes a route from the routing table.\r
   Routes are determined by comparing the SubnetAddress with the destination IP\r
   address and arithmetically AND-ing it with the SubnetMask. The gateway address\r
@@ -253,12 +247,12 @@ Udp4Groups (
   copies will be updated automatically whenever the IP driver reconfigures its\r
   instances; as a result, the previous modification to these copies will be lost.\r
 \r
-  @param  This           Pointer to the EFI_UDP4_PROTOCOL instance.\r
-  @param  DeleteRoute    Set to TRUE to delete this route from the routing table.\r
-                         Set to FALSE to add this route to the routing table.\r
-  @param  SubnetAddress  The destination network address that needs to be routed.\r
-  @param  SubnetMask     The subnet mask of SubnetAddress.\r
-  @param  GatewayAddress The gateway IP address for this route.\r
+  @param[in]  This              Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param[in]  DeleteRoute       Set to TRUE to delete this route from the routing table.\r
+                                Set to FALSE to add this route to the routing table.\r
+  @param[in]  SubnetAddress     The destination network address that needs to be routed.\r
+  @param[in]  SubnetMask        The subnet mask of SubnetAddress.\r
+  @param[in]  GatewayAddress    The gateway IP address for this route.\r
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_NOT_STARTED       The EFI UDPv4 Protocol instance has not been started.\r
@@ -282,7 +276,7 @@ Udp4Routes (
 \r
 /**\r
   Queues outgoing data packets into the transmit queue.\r
-  \r
+\r
   The Transmit() function places a sending request to this instance of the EFI\r
   UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever\r
   the packet in the token is sent out or some errors occur, the Token.Event will\r
@@ -290,9 +284,9 @@ Udp4Routes (
   and context for the event will enable the user to receive the notification and\r
   transmitting status.\r
 \r
-  @param  This  Pointer to the EFI_UDP4_PROTOCOL instance.\r
-  @param  Token Pointer to the completion token that will be placed into the\r
-                transmit queue.\r
+  @param[in]  This              Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param[in]  Token             Pointer to the completion token that will be placed into the\r
+                                transmit queue.\r
 \r
   @retval EFI_SUCCESS           The data has been queued for transmission.\r
   @retval EFI_NOT_STARTED       This EFI UDPv4 Protocol instance has not been started.\r
@@ -319,7 +313,7 @@ Udp4Transmit (
 \r
 /**\r
   Places an asynchronous receive request into the receiving queue.\r
-  \r
+\r
   The Receive() function places a completion token into the receive packet queue.\r
   This function is always asynchronous.\r
   The caller must fill in the Token.Event field in the completion token, and this\r
@@ -329,9 +323,9 @@ Udp4Transmit (
   will enable the user to receive the notification and receiving status. That\r
   notification function is guaranteed to not be re-entered.\r
 \r
-  @param  This  Pointer to the EFI_UDP4_PROTOCOL instance.\r
-  @param  Token Pointer to a token that is associated with the receive data\r
-                descriptor.\r
+  @param[in]  This              Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param[in]  Token             Pointer to a token that is associated with\r
+                                the receive data descriptor.\r
 \r
   @retval EFI_SUCCESS           The receive completion token was cached.\r
   @retval EFI_NOT_STARTED       This EFI UDPv4 Protocol instance has not been started.\r
@@ -355,7 +349,7 @@ Udp4Receive (
 \r
 /**\r
   Aborts an asynchronous transmit or receive request.\r
-  \r
+\r
   The Cancel() function is used to abort a pending transmit or receive request.\r
   If the token is in the transmit or receive request queues, after calling this\r
   function, Token.Status will be set to EFI_ABORTED and then Token.Event will be\r
@@ -363,11 +357,11 @@ Udp4Receive (
   the asynchronous operation has completed, this function will not signal the\r
   token and EFI_NOT_FOUND is returned.\r
 \r
-  @param  This  Pointer to the EFI_UDP4_PROTOCOL instance.\r
-  @param  Token Pointer to a token that has been issued by\r
-                EFI_UDP4_PROTOCOL.Transmit() or\r
-                EFI_UDP4_PROTOCOL.Receive().If NULL, all pending\r
-                tokens are aborted.\r
+  @param[in]  This  Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param[in]  Token Pointer to a token that has been issued by\r
+                    EFI_UDP4_PROTOCOL.Transmit() or\r
+                    EFI_UDP4_PROTOCOL.Receive().If NULL, all pending\r
+                    tokens are aborted.\r
 \r
   @retval  EFI_SUCCESS           The asynchronous I/O request was aborted and Token.Event\r
                                  was signaled. When Token is NULL, all pending requests are\r
@@ -390,7 +384,7 @@ Udp4Cancel (
 \r
 /**\r
   Polls for incoming data packets and processes outgoing data packets.\r
-  \r
+\r
   The Poll() function can be used by network drivers and applications to increase\r
   the rate that data packets are moved between the communications device and the\r
   transmit and receive queues.\r
@@ -400,7 +394,7 @@ Udp4Cancel (
   Drivers and applications that are experiencing packet loss should try calling\r
   the Poll() function more often.\r
 \r
-  @param  This Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param[in]  This  Pointer to the EFI_UDP4_PROTOCOL instance.\r
 \r
   @retval EFI_SUCCESS           Incoming or outgoing data was processed.\r
   @retval EFI_INVALID_PARAMETER This is NULL.\r
@@ -417,14 +411,14 @@ Udp4Poll (
 /**\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
@@ -437,9 +431,7 @@ Udp4CreateService (
 /**\r
   Clean the Udp service context data.\r
 \r
-  @param  Udp4Service            Pointer to the UDP4_SERVICE_DATA.\r
-\r
-  @return None.\r
+  @param[in]  Udp4Service            Pointer to the UDP4_SERVICE_DATA.\r
 \r
 **/\r
 VOID\r
@@ -450,10 +442,8 @@ Udp4CleanService (
 /**\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
-\r
-  @return None.\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
@@ -465,9 +455,7 @@ Udp4InitInstance (
 /**\r
   This function cleans the udp instance.\r
 \r
-  @param  Instance               Pointer to the UDP4_INSTANCE_DATA to clean.\r
-\r
-  @return None.\r
+  @param[in]  Instance               Pointer to the UDP4_INSTANCE_DATA to clean.\r
 \r
 **/\r
 VOID\r
@@ -479,9 +467,9 @@ Udp4CleanInstance (
   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
@@ -501,9 +489,9 @@ Udp4Bind (
   This function is used to check whether the NewConfigData has any un-reconfigurable\r
   parameters changed compared to the OldConfigData.\r
 \r
-  @param  OldConfigData          Pointer to the current ConfigData the udp instance\r
+  @param[in]  OldConfigData      Pointer to the current ConfigData the udp instance\r
                                  uses.\r
-  @param  NewConfigData          Pointer to the new ConfigData.\r
+  @param[in]  NewConfigData      Pointer to the new ConfigData.\r
 \r
   @retval TRUE     The instance is reconfigurable.\r
   @retval FALSE    Otherwise.\r
@@ -518,10 +506,8 @@ Udp4IsReconfigurable (
 /**\r
   This function builds the Ip4 configdata from the Udp4ConfigData.\r
 \r
-  @param  Udp4ConfigData         Pointer to the EFI_UDP4_CONFIG_DATA.\r
-  @param  Ip4ConfigData          Pointer to the EFI_IP4_CONFIG_DATA.\r
-\r
-  @return None.\r
+  @param[in]       Udp4ConfigData    Pointer to the EFI_UDP4_CONFIG_DATA.\r
+  @param[in, out]  Ip4ConfigData     Pointer to the EFI_IP4_CONFIG_DATA.\r
 \r
 **/\r
 VOID\r
@@ -533,8 +519,8 @@ Udp4BuildIp4ConfigData (
 /**\r
   This function validates the TxToken, it returns the error code according to the spec.\r
 \r
-  @param  Instance               Pointer to the udp instance context data.\r
-  @param  TxToken                Pointer to the token to be checked.\r
+  @param[in]  Instance           Pointer to the udp instance context data.\r
+  @param[in]  TxToken            Pointer to the token to be checked.\r
 \r
   @retval EFI_SUCCESS            The TxToken is valid.\r
   @retval EFI_INVALID_PARAMETER  One or more of the following are TRUE: This is\r
@@ -565,10 +551,10 @@ Udp4ValidateTxToken (
 /**\r
   This function checks whether the specified Token duplicates with the one in the Map.\r
 \r
-  @param  Map                    Pointer to the NET_MAP.\r
-  @param  Item                   Pointer to the NET_MAP_ITEM contain the pointer to\r
+  @param[in]  Map                Pointer to the NET_MAP.\r
+  @param[in]  Item               Pointer to the NET_MAP_ITEM contain the pointer to\r
                                  the Token.\r
-  @param  Context                Pointer to the Token to be checked.\r
+  @param[in]  Context            Pointer to the Token to be checked.\r
 \r
   @retval EFI_SUCCESS            The Token specified by Context differs from the\r
                                  one in the Item.\r
@@ -576,6 +562,7 @@ Udp4ValidateTxToken (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 Udp4TokenExist (\r
   IN NET_MAP       *Map,\r
   IN NET_MAP_ITEM  *Item,\r
@@ -586,11 +573,11 @@ Udp4TokenExist (
   This function calculates the checksum for the Packet, utilizing the pre-calculated\r
   pseudo HeadSum to reduce some overhead.\r
 \r
-  @param  Packet                 Pointer to the NET_BUF contains the udp datagram.\r
-  @param  HeadSum                Checksum of the pseudo header execpt the length\r
+  @param[in]  Packet             Pointer to the NET_BUF contains the udp datagram.\r
+  @param[in]  HeadSum            Checksum of the pseudo header execpt the length\r
                                  field.\r
 \r
-  @return The 16-bit checksum of this udp datagram.\r
+  @retval The 16-bit checksum of this udp datagram.\r
 \r
 **/\r
 UINT16\r
@@ -602,8 +589,8 @@ Udp4Checksum (
 /**\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
@@ -618,9 +605,9 @@ Udp4RemoveToken (
 /**\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
@@ -629,6 +616,7 @@ Udp4RemoveToken (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 Udp4LeaveGroup (\r
   IN OUT NET_MAP       *Map,\r
   IN     NET_MAP_ITEM  *Item,\r
@@ -638,9 +626,7 @@ Udp4LeaveGroup (
 /**\r
   This function removes all the Wrap datas in the RcvdDgramQue.\r
 \r
-  @param  Instance           Pointer to the udp instance context data.\r
-\r
-  @return None.\r
+  @param[in]  Instance           Pointer to the udp instance context data.\r
 \r
 **/\r
 VOID\r
@@ -651,8 +637,8 @@ Udp4FlushRcvdDgram (
 /**\r
   Cancel Udp4 tokens from the Udp4 instance.\r
 \r
-  @param  Instance               Pointer to the udp instance context data.\r
-  @param  Token                  Pointer to the token to be canceled, if NULL, all\r
+  @param[in]  Instance           Pointer to the udp instance context data.\r
+  @param[in]  Token              Pointer to the token to be canceled, if NULL, all\r
                                  tokens in this instance will be cancelled.\r
 \r
   @retval EFI_SUCCESS            The Token is cancelled.\r
@@ -668,9 +654,7 @@ Udp4InstanceCancelToken (
 /**\r
   This function delivers the received datagrams for the specified instance.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-\r
-  @return None.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
 \r
 **/\r
 VOID\r
@@ -681,9 +665,7 @@ Udp4InstanceDeliverDgram (
 /**\r
   This function reports the received ICMP error.\r
 \r
-  @param  Instance               Pointer to the udp instance context data.\r
-\r
-  @return None.\r
+  @param[in]  Instance               Pointer to the udp instance context data.\r
 \r
 **/\r
 VOID\r
@@ -695,44 +677,13 @@ Udp4ReportIcmpError (
   This function is a dummy ext-free function for the NET_BUF created for the output\r
   udp datagram.\r
 \r
-  @param  Context                Pointer to the context data.\r
-\r
-  @return None.\r
+  @param[in]  Context                Pointer to the context data.\r
 \r
 **/\r
 VOID\r
+EFIAPI\r
 Udp4NetVectorExtFree (\r
   VOID  *Context\r
   );\r
 \r
-/**\r
-  Set the Udp4 variable data.\r
-\r
-  @param  Udp4Service            Udp4 service data.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to set the\r
-                                 variable.\r
-  @retval EFI_SUCCESS            Set variable successfully.\r
-  @retval other                  Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Udp4SetVariableData (\r
-  IN UDP4_SERVICE_DATA  *Udp4Service\r
-  );\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param  Udp4Service            Udp4 service data.\r
-\r
-  @return None.\r
-\r
-**/\r
-VOID\r
-Udp4ClearVariableData (\r
-  IN UDP4_SERVICE_DATA  *Udp4Service\r
-  );\r
-\r
 #endif\r
-\r