X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FUdp4Dxe%2FUdp4Main.c;h=ed997e1930326a1ebf9e1d0ae4ee8802a18df063;hp=582d6f6d448905a643974861d59bb95d61e853de;hb=e5eed7d3641d71d7ea539e5379ea9c6a5cd97004;hpb=fb115c61504fe6c4f94be0a87f75e28e1684657f diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c index 582d6f6d44..ed997e1930 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c @@ -1,7 +1,7 @@ /** @file -Copyright (c) 2006 - 2009, Intel Corporation.
-All rights reserved. This program and the accompanying materials +Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -33,11 +33,11 @@ EFI_UDP4_PROTOCOL mUdp4Protocol = { optionally to retrieve the operational mode data of underlying networks or drivers. - @param This Pointer to the EFI_UDP4_PROTOCOL instance. - @param Udp4ConfigData Pointer to the buffer to receive the current configuration data. - @param Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure. - @param MnpConfigData Pointer to the managed network configuration data structure. - @param SnpModeData Pointer to the simple network mode data structure. + @param[in] This Pointer to the EFI_UDP4_PROTOCOL instance. + @param[out] Udp4ConfigData Pointer to the buffer to receive the current configuration data. + @param[out] Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure. + @param[out] MnpConfigData Pointer to the managed network configuration data structure. + @param[out] SnpModeData Pointer to the simple network mode data structure. @retval EFI_SUCCESS The mode data was read. @retval EFI_NOT_STARTED When Udp4ConfigData is queried, no configuration data is @@ -171,8 +171,8 @@ Udp4Configure ( if (!UdpConfigData->UseDefaultAddress && (!IP4_IS_VALID_NETMASK (SubnetMask) || - !((StationAddress == 0) || Ip4IsUnicast (StationAddress, SubnetMask)) || - !((RemoteAddress == 0) || Ip4IsUnicast (RemoteAddress, 0)))) { + !((StationAddress == 0) || NetIp4IsUnicast (StationAddress, SubnetMask)) || + !((RemoteAddress == 0) || NetIp4IsUnicast (RemoteAddress, 0)))) { // // Don't use default address, and subnet mask is invalid or StationAddress is not // a valid unicast IPv4 address or RemoteAddress is not a valid unicast IPv4 address @@ -586,7 +586,7 @@ Udp4Transmit ( // Udp4Header->SrcPort = HTONS (ConfigData->StationPort); Udp4Header->DstPort = HTONS (ConfigData->RemotePort); - Udp4Header->Length = HTONS (Packet->TotalSize); + Udp4Header->Length = HTONS ((UINT16) Packet->TotalSize); Udp4Header->Checksum = 0; UdpSessionData = TxData->UdpSessionData;