diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-30 06:58:37 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-30 06:58:37 +0000 |
commit | b61439a709bb961f2f9dff1d1a4112e30a063f51 (patch) | |
tree | 67a555871171cf54ad9a662957f8cd49c7035b02 /MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | |
parent | dc59293a36f538eb6c32517c409d5992d8c2d763 (diff) | |
download | edk2-platforms-b61439a709bb961f2f9dff1d1a4112e30a063f51.tar.xz |
1. Fixed one bug in Undi driver.
2. Add default branch to meet CYGWINGCC build in Tcp4Dispatcher.c.
3. Sync the latest network stack library.
4. Fixed one bug in Mtftp4Support.c, for AsciiStrCpy() return the pointer to head of string, not the tail of string.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3741 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c')
-rw-r--r-- | MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c index 98df75df11..cc869717dd 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -29,6 +29,7 @@ Abstract: #include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/BaseMemoryLib.h>
#define NET_PROTO_HDR(Buf, Type) ((Type *) ((Buf)->BlockOp[0].Head))
@@ -416,13 +417,13 @@ IpIoCreateSndEntry ( //
// Set the fields of OverrideData
//
- *OverrideData = * (EFI_IP4_OVERRIDE_DATA *) Override;
+ NetCopyMem (OverrideData, Override, sizeof (*OverrideData));
}
//
// Set the fields of TxData
//
- EFI_IP4 (TxData->DestinationAddress) = Dest;
+ NetCopyMem (&TxData->DestinationAddress, &Dest, sizeof (EFI_IPv4_ADDRESS));
TxData->OverrideData = OverrideData;
TxData->OptionsLength = 0;
TxData->OptionsBuffer = NULL;
@@ -761,7 +762,6 @@ IpIoOpen ( {
EFI_STATUS Status;
EFI_IP4_PROTOCOL *Ip;
- EFI_IPv4_ADDRESS ZeroIp;
if (IpIo->IsConfigured) {
return EFI_ACCESS_DENIED;
@@ -782,8 +782,7 @@ IpIoOpen ( // (0.0.0.0, 0.0.0.0, 0.0.0.0). Delete this statement if Ip modified
// its code
//
- EFI_IP4 (ZeroIp) = 0;
- Status = Ip->Routes (Ip, TRUE, &ZeroIp, &ZeroIp, &ZeroIp);
+ Status = Ip->Routes (Ip, TRUE, &mZeroIp4Addr, &mZeroIp4Addr, &mZeroIp4Addr);
if (EFI_ERROR (Status) && (EFI_NOT_FOUND != Status)) {
return Status;
@@ -1147,8 +1146,8 @@ IpIoConfigIp ( Ip4ConfigData->SubnetMask = Ip4ModeData.ConfigData.SubnetMask;
}
- IpInfo->Addr = EFI_IP4 (Ip4ConfigData->StationAddress);
- IpInfo->SubnetMask = EFI_IP4 (Ip4ConfigData->SubnetMask);
+ NetCopyMem (&IpInfo->Addr, &Ip4ConfigData->StationAddress, sizeof (IP4_ADDR));
+ NetCopyMem (&IpInfo->SubnetMask, &Ip4ConfigData->SubnetMask, sizeof (IP4_ADDR));
Status = Ip->Receive (Ip, &IpInfo->DummyRcvToken);
if (EFI_ERROR (Status)) {
|