]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Udp4Dxe / Udp4Main.c
index 5002f6f17f468f5a21a293886ee42d3ea3c7ce9e..db1c4fdb87506a49ea73745eb62e65e8954f8528 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+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
@@ -33,11 +33,11 @@ EFI_UDP4_PROTOCOL  mUdp4Protocol = {
   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
@@ -79,7 +79,7 @@ Udp4GetModeData (
     CopyMem (Udp4ConfigData, &Instance->ConfigData, sizeof (*Udp4ConfigData));\r
   }\r
 \r
-  Ip = Instance->IpInfo->Ip;\r
+  Ip = Instance->IpInfo->Ip.Ip4;\r
 \r
   //\r
   // Get the underlying Ip4ModeData, MnpConfigData and SnpModeData.\r
@@ -357,7 +357,7 @@ Udp4Groups (
     return EFI_NOT_STARTED;\r
   }\r
 \r
-  Ip = Instance->IpInfo->Ip;\r
+  Ip = Instance->IpInfo->Ip.Ip4;\r
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
@@ -457,7 +457,7 @@ Udp4Routes (
     return EFI_NOT_STARTED;\r
   }\r
 \r
-  Ip = Instance->IpInfo->Ip;\r
+  Ip = Instance->IpInfo->Ip.Ip4;\r
 \r
   //\r
   // Invoke the Ip instance the Udp4 instance consumes to do the actual operation.\r
@@ -586,7 +586,7 @@ Udp4Transmit (
   //\r
   Udp4Header->SrcPort      = HTONS (ConfigData->StationPort);\r
   Udp4Header->DstPort      = HTONS (ConfigData->RemotePort);\r
-  Udp4Header->Length       = HTONS (Packet->TotalSize);\r
+  Udp4Header->Length       = HTONS ((UINT16) Packet->TotalSize);\r
   Udp4Header->Checksum     = 0;\r
 \r
   UdpSessionData = TxData->UdpSessionData;\r
@@ -900,7 +900,7 @@ Udp4Poll (
   }\r
 \r
   Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);\r
-  Ip       = Instance->IpInfo->Ip;\r
+  Ip       = Instance->IpInfo->Ip.Ip4;\r
 \r
   //\r
   // Invode the Ip instance consumed by the udp instance to do the poll operation.\r