summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dc59293)
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
-Copyright (c) 2006, 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
+Copyright (c) 2006, 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
0x60, 0,\r
(UINT8)0xf2, 0x48,\r
0, 0x40,\r
0x60, 0,\r
(UINT8)0xf2, 0x48,\r
0, 0x40,\r
- (UINT8)0xf2, (UINT8)0x80, // 0x40=Force full-duplex \r
+ (UINT8)0xf2, (UINT8)0x80, // 0x40=Force full-duplex\r
This function calls the MemIo callback to read a byte from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
This function calls the MemIo callback to read a byte from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
to make undi3.0 a special case\r
Arguments:\r
Port - Which port to read from.\r
\r
Arguments:\r
Port - Which port to read from.\r
\r
UINT8 Results;\r
\r
(*AdapterInfo->Mem_Io) (\r
UINT8 Results;\r
\r
(*AdapterInfo->Mem_Io) (\r
- AdapterInfo->Unique_ID, \r
- PXE_MEM_READ, \r
- 1, \r
+ AdapterInfo->Unique_ID,\r
+ PXE_MEM_READ,\r
+ 1,\r
(UINT64)Port,\r
(UINT64) (UINTN) &Results\r
);\r
(UINT64)Port,\r
(UINT64) (UINTN) &Results\r
);\r
This function calls the MemIo callback to read a word from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
This function calls the MemIo callback to read a word from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
to make undi3.0 a special case\r
\r
Arguments:\r
This function calls the MemIo callback to read a dword from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
This function calls the MemIo callback to read a dword from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
to make undi3.0 a special case\r
\r
Arguments:\r
This function calls the MemIo callback to write a byte from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
This function calls the MemIo callback to write a byte from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
to make undi3.0 a special case\r
\r
Arguments:\r
This function calls the MemIo callback to write a word from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
This function calls the MemIo callback to write a word from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
to make undi3.0 a special case\r
\r
Arguments:\r
This function calls the MemIo callback to write a dword from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
This function calls the MemIo callback to write a dword from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
to make undi3.0 a special case\r
\r
Arguments:\r
AdapterInfo->rx_phy_addr = AdapterInfo->Mapped_MemoryPtr;\r
AdapterInfo->tx_phy_addr = AdapterInfo->Mapped_MemoryPtr + rx_size;\r
AdapterInfo->stat_phy_addr = AdapterInfo->tx_phy_addr + tx_size;\r
AdapterInfo->rx_phy_addr = AdapterInfo->Mapped_MemoryPtr;\r
AdapterInfo->tx_phy_addr = AdapterInfo->Mapped_MemoryPtr + rx_size;\r
AdapterInfo->stat_phy_addr = AdapterInfo->tx_phy_addr + tx_size;\r
//\r
// auto detect.\r
//\r
//\r
// auto detect.\r
//\r
cur_ptr[Index].PhysTCBAddress =\r
(UINT32) AdapterInfo->tx_phy_addr + (Index * sizeof (TxCB));\r
\r
cur_ptr[Index].PhysTCBAddress =\r
(UINT32) AdapterInfo->tx_phy_addr + (Index * sizeof (TxCB));\r
\r
- cur_ptr[Index].PhysArrayAddr = (UINT32)(cur_ptr[Index].PhysTCBAddress + array_off); \r
+ cur_ptr[Index].PhysArrayAddr = (UINT32)(cur_ptr[Index].PhysTCBAddress + array_off);\r
cur_ptr[Index].PhysTBDArrayAddres = (UINT32)(cur_ptr[Index].PhysTCBAddress + array_off);\r
\r
cur_ptr->free_data_ptr = (UINT64) 0;\r
cur_ptr[Index].PhysTBDArrayAddres = (UINT32)(cur_ptr[Index].PhysTCBAddress + array_off);\r
\r
cur_ptr->free_data_ptr = (UINT64) 0;\r
UINTN wait;\r
UINT8 tmp;\r
\r
UINTN wait;\r
UINT8 tmp;\r
\r
- if ((AdapterInfo->DeviceID == D102_DEVICE_ID) || \r
+ if ((AdapterInfo->DeviceID == D102_DEVICE_ID) ||\r
(AdapterInfo->RevID >= D102_REVID)) {\r
\r
wait = 500;\r
(AdapterInfo->RevID >= D102_REVID)) {\r
\r
wait = 500;\r
--*/\r
{\r
UINT8 tmp;\r
\r
--*/\r
{\r
UINT8 tmp;\r
\r
- if ((AdapterInfo->DeviceID == D102_DEVICE_ID) || \r
+ if ((AdapterInfo->DeviceID == D102_DEVICE_ID) ||\r
(AdapterInfo->RevID >= D102_REVID)) {\r
\r
tmp = InByte (AdapterInfo, AdapterInfo->ioaddr + SCBGenCtrl2);\r
(AdapterInfo->RevID >= D102_REVID)) {\r
\r
tmp = InByte (AdapterInfo, AdapterInfo->ioaddr + SCBGenCtrl2);\r
db.Data[0x08] = AdapterInfo->statistics->rx_crc_errs +\r
AdapterInfo->statistics->rx_align_errs;\r
\r
db.Data[0x08] = AdapterInfo->statistics->rx_crc_errs +\r
AdapterInfo->statistics->rx_align_errs;\r
\r
- db.Data[0x04] = db.Data[0x02] + \r
+ db.Data[0x04] = db.Data[0x02] +\r
db.Data[0x08] +\r
AdapterInfo->statistics->rx_resource_errs +\r
AdapterInfo->statistics->rx_overrun_errs;\r
db.Data[0x08] +\r
AdapterInfo->statistics->rx_resource_errs +\r
AdapterInfo->statistics->rx_overrun_errs;\r
\r
Routine Description:\r
This routine will write a value to the specified MII register\r
\r
Routine Description:\r
This routine will write a value to the specified MII register\r
- of an external MDI compliant device (e.g. PHY 100). The command will \r
+ of an external MDI compliant device (e.g. PHY 100). The command will\r
execute in polled mode.\r
execute in polled mode.\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
RegAddress - The MII register that we are writing to\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
RegAddress - The MII register that we are writing to\r
DataValue - The value that we are writing to the MII register.\r
\r
Returns:\r
DataValue - The value that we are writing to the MII register.\r
\r
Returns:\r
--*/\r
{\r
UINT32 WriteCommand;\r
\r
WriteCommand = ((UINT32) DataValue) |\r
--*/\r
{\r
UINT32 WriteCommand;\r
\r
WriteCommand = ((UINT32) DataValue) |\r
- ((UINT32)(RegAddress << 16)) | \r
+ ((UINT32)(RegAddress << 16)) |\r
((UINT32)(PhyAddress << 21)) |\r
((UINT32)(MDI_WRITE << 26));\r
\r
((UINT32)(PhyAddress << 21)) |\r
((UINT32)(MDI_WRITE << 26));\r
\r
\r
//\r
// poll for the mdi write to complete\r
\r
//\r
// poll for the mdi write to complete\r
- while ((InLong (AdapterInfo, AdapterInfo->ioaddr + SCBCtrlMDI) & \r
+ while ((InLong (AdapterInfo, AdapterInfo->ioaddr + SCBCtrlMDI) &\r
MDI_PHY_READY) == 0){\r
DelayIt (AdapterInfo, 20);\r
}\r
MDI_PHY_READY) == 0){\r
DelayIt (AdapterInfo, 20);\r
}\r
This routine will read a value from the specified MII register\r
of an external MDI compliant device (e.g. PHY 100), and return\r
it to the calling routine. The command will execute in polled mode.\r
This routine will read a value from the specified MII register\r
of an external MDI compliant device (e.g. PHY 100), and return\r
it to the calling routine. The command will execute in polled mode.\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
RegAddress - The MII register that we are reading from\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
RegAddress - The MII register that we are reading from\r
DataValue - pointer to the value that we read from the MII register.\r
\r
Returns:\r
DataValue - pointer to the value that we read from the MII register.\r
\r
Returns:\r
--*/\r
{\r
UINT32 ReadCommand;\r
--*/\r
{\r
UINT32 ReadCommand;\r
\r
Routine Description:\r
This routine will reset the PHY that the adapter is currently\r
\r
Routine Description:\r
This routine will reset the PHY that the adapter is currently\r
- configured to use. \r
- \r
+ configured to use.\r
+\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
\r
Returns:\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
\r
Returns:\r
--*/\r
{\r
UINT16 MdiControlReg;\r
\r
--*/\r
{\r
UINT16 MdiControlReg;\r
\r
- MdiControlReg = (MDI_CR_AUTO_SELECT | \r
- MDI_CR_RESTART_AUTO_NEG | \r
+ MdiControlReg = (MDI_CR_AUTO_SELECT |\r
+ MDI_CR_RESTART_AUTO_NEG |\r
this range.\r
6. Driver ignores FORCEFDX and SPEED overrides if a 503 interface\r
is detected.\r
this range.\r
6. Driver ignores FORCEFDX and SPEED overrides if a 503 interface\r
is detected.\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
\r
Returns:\r
TRUE - If a Phy was detected, and configured correctly.\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
\r
Returns:\r
TRUE - If a Phy was detected, and configured correctly.\r
- FALSE - If a valid phy could not be detected and configured. \r
- \r
+ FALSE - If a valid phy could not be detected and configured.\r
+\r
--*/\r
{\r
UINT16 *eedata;\r
--*/\r
{\r
UINT16 *eedata;\r
- if (!((MdiControlReg == 0xffff) || \r
+ if (!((MdiControlReg == 0xffff) ||\r
((MdiStatusReg == 0) && (MdiControlReg == 0)))) {\r
\r
//\r
((MdiStatusReg == 0) && (MdiControlReg == 0)))) {\r
\r
//\r
\r
Returns:\r
TRUE - If the phy could be configured correctly\r
\r
Returns:\r
TRUE - If the phy could be configured correctly\r
- FALSE - If the phy couldn't be configured correctly, because an \r
+ FALSE - If the phy couldn't be configured correctly, because an\r
unsupported over-ride option was used\r
unsupported over-ride option was used\r
--*/\r
{\r
UINT16 MdiControlReg;\r
--*/\r
{\r
UINT16 MdiControlReg;\r
// value accordingly\r
//\r
AdapterInfo->LinkSpeed = AdapterInfo->LinkSpeedReq;\r
// value accordingly\r
//\r
AdapterInfo->LinkSpeed = AdapterInfo->LinkSpeedReq;\r
- AdapterInfo->Duplex = (UINT8) ((AdapterInfo->DuplexReq & PXE_FORCE_FULL_DUPLEX) ? \r
+ AdapterInfo->Duplex = (UINT8) ((AdapterInfo->DuplexReq & PXE_FORCE_FULL_DUPLEX) ?\r
FULL_DUPLEX : HALF_DUPLEX);\r
\r
//\r
FULL_DUPLEX : HALF_DUPLEX);\r
\r
//\r
// advertised ablilities, and then assuming that the highest common\r
// denominator was chosed by NWAY.\r
//\r
// advertised ablilities, and then assuming that the highest common\r
// denominator was chosed by NWAY.\r
//\r
- if ((MdiLinkPartnerAdReg & NWAY_LP_ABILITY) && \r
+ if ((MdiLinkPartnerAdReg & NWAY_LP_ABILITY) &&\r
(MdiStatusReg & MDI_SR_AUTO_NEG_COMPLETE)) {\r
\r
//\r
(MdiStatusReg & MDI_SR_AUTO_NEG_COMPLETE)) {\r
\r
//\r
#include <Library/DebugLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
\r
\r
#define NET_PROTO_HDR(Buf, Type) ((Type *) ((Buf)->BlockOp[0].Head))\r
\r
\r
#define NET_PROTO_HDR(Buf, Type) ((Type *) ((Buf)->BlockOp[0].Head))\r
//\r
// Set the fields of OverrideData\r
//\r
//\r
// Set the fields of OverrideData\r
//\r
- *OverrideData = * (EFI_IP4_OVERRIDE_DATA *) Override;\r
+ NetCopyMem (OverrideData, Override, sizeof (*OverrideData));\r
}\r
\r
//\r
// Set the fields of TxData\r
//\r
}\r
\r
//\r
// Set the fields of TxData\r
//\r
- EFI_IP4 (TxData->DestinationAddress) = Dest;\r
+ NetCopyMem (&TxData->DestinationAddress, &Dest, sizeof (EFI_IPv4_ADDRESS));\r
TxData->OverrideData = OverrideData;\r
TxData->OptionsLength = 0;\r
TxData->OptionsBuffer = NULL;\r
TxData->OverrideData = OverrideData;\r
TxData->OptionsLength = 0;\r
TxData->OptionsBuffer = NULL;\r
{\r
EFI_STATUS Status;\r
EFI_IP4_PROTOCOL *Ip;\r
{\r
EFI_STATUS Status;\r
EFI_IP4_PROTOCOL *Ip;\r
- EFI_IPv4_ADDRESS ZeroIp;\r
\r
if (IpIo->IsConfigured) {\r
return EFI_ACCESS_DENIED;\r
\r
if (IpIo->IsConfigured) {\r
return EFI_ACCESS_DENIED;\r
// (0.0.0.0, 0.0.0.0, 0.0.0.0). Delete this statement if Ip modified\r
// its code\r
//\r
// (0.0.0.0, 0.0.0.0, 0.0.0.0). Delete this statement if Ip modified\r
// its code\r
//\r
- EFI_IP4 (ZeroIp) = 0;\r
- Status = Ip->Routes (Ip, TRUE, &ZeroIp, &ZeroIp, &ZeroIp);\r
+ Status = Ip->Routes (Ip, TRUE, &mZeroIp4Addr, &mZeroIp4Addr, &mZeroIp4Addr);\r
\r
if (EFI_ERROR (Status) && (EFI_NOT_FOUND != Status)) {\r
return Status;\r
\r
if (EFI_ERROR (Status) && (EFI_NOT_FOUND != Status)) {\r
return Status;\r
Ip4ConfigData->SubnetMask = Ip4ModeData.ConfigData.SubnetMask;\r
}\r
\r
Ip4ConfigData->SubnetMask = Ip4ModeData.ConfigData.SubnetMask;\r
}\r
\r
- IpInfo->Addr = EFI_IP4 (Ip4ConfigData->StationAddress);\r
- IpInfo->SubnetMask = EFI_IP4 (Ip4ConfigData->SubnetMask);\r
+ NetCopyMem (&IpInfo->Addr, &Ip4ConfigData->StationAddress, sizeof (IP4_ADDR));\r
+ NetCopyMem (&IpInfo->SubnetMask, &Ip4ConfigData->SubnetMask, sizeof (IP4_ADDR));\r
\r
Status = Ip->Receive (Ip, &IpInfo->DummyRcvToken);\r
if (EFI_ERROR (Status)) {\r
\r
Status = Ip->Receive (Ip, &IpInfo->DummyRcvToken);\r
if (EFI_ERROR (Status)) {\r
DebugLib\r
UefiBootServicesTableLib\r
MemoryAllocationLib\r
DebugLib\r
UefiBootServicesTableLib\r
MemoryAllocationLib\r
\r
[Protocols]\r
gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
\r
[Protocols]\r
gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
#include <Library/DebugLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
+#include <library/BaseMemoryLib.h>\r
EFI_UDP4_TRANSMIT_DATA *UdpTxData;\r
EFI_STATUS Status;\r
UINT32 Count;\r
EFI_UDP4_TRANSMIT_DATA *UdpTxData;\r
EFI_STATUS Status;\r
UINT32 Count;\r
\r
Token = NetAllocatePool (sizeof (UDP_TX_TOKEN) +\r
sizeof (EFI_UDP4_FRAGMENT_DATA) * (Packet->BlockOpNum - 1));\r
\r
Token = NetAllocatePool (sizeof (UDP_TX_TOKEN) +\r
sizeof (EFI_UDP4_FRAGMENT_DATA) * (Packet->BlockOpNum - 1));\r
UdpTxData->GatewayAddress = NULL;\r
\r
if (EndPoint != NULL) {\r
UdpTxData->GatewayAddress = NULL;\r
\r
if (EndPoint != NULL) {\r
- EFI_IP4 (Token->UdpSession.SourceAddress) = HTONL (EndPoint->LocalAddr);\r
- EFI_IP4 (Token->UdpSession.DestinationAddress) = HTONL (EndPoint->RemoteAddr);\r
- Token->UdpSession.SourcePort = EndPoint->LocalPort;\r
- Token->UdpSession.DestinationPort = EndPoint->RemotePort;\r
- UdpTxData->UdpSessionData = &Token->UdpSession;\r
+ Ip = HTONL (EndPoint->LocalAddr);\r
+ NetCopyMem (&Token->UdpSession.SourceAddress, &Ip, sizeof (EFI_IPv4_ADDRESS));\r
+\r
+ Ip = HTONL (EndPoint->RemoteAddr);\r
+ NetCopyMem (&Token->UdpSession.DestinationAddress, &Ip, sizeof (EFI_IPv4_ADDRESS));\r
+\r
+ Token->UdpSession.SourcePort = EndPoint->LocalPort;\r
+ Token->UdpSession.DestinationPort = EndPoint->RemotePort;\r
+ UdpTxData->UdpSessionData = &Token->UdpSession;\r
}\r
\r
if (Gateway != 0) {\r
}\r
\r
if (Gateway != 0) {\r
- EFI_IP4 (Token->Gateway) = HTONL (Gateway);\r
+ Ip = HTONL (Gateway);\r
+ NetCopyMem (&Token->Gateway, &Ip, sizeof (EFI_IPv4_ADDRESS));\r
+\r
UdpTxData->GatewayAddress = &Token->Gateway;\r
}\r
\r
UdpTxData->GatewayAddress = &Token->Gateway;\r
}\r
\r
}\r
\r
UdpSession = &UdpRxData->UdpSession;\r
}\r
\r
UdpSession = &UdpRxData->UdpSession;\r
- Points.LocalAddr = EFI_NTOHL (UdpSession->DestinationAddress);\r
Points.LocalPort = UdpSession->DestinationPort;\r
Points.LocalPort = UdpSession->DestinationPort;\r
- Points.RemoteAddr = EFI_NTOHL (UdpSession->SourceAddress);\r
Points.RemotePort = UdpSession->SourcePort;\r
\r
Points.RemotePort = UdpSession->SourcePort;\r
\r
+ NetCopyMem (&Points.LocalAddr, &UdpSession->DestinationAddress, sizeof (IP4_ADDR));\r
+ NetCopyMem (&Points.RemoteAddr, &UdpSession->SourceAddress, sizeof (IP4_ADDR));\r
+ Points.LocalAddr = NTOHL (Points.LocalAddr);\r
+ Points.RemoteAddr = NTOHL (Points.RemoteAddr);\r
+\r
Token->CallBack (Netbuf, &Points, EFI_SUCCESS, Token->Context);\r
\r
ON_EXIT:\r
Token->CallBack (Netbuf, &Points, EFI_SUCCESS, Token->Context);\r
\r
ON_EXIT:\r
DebugLib\r
UefiBootServicesTableLib\r
MemoryAllocationLib\r
DebugLib\r
UefiBootServicesTableLib\r
MemoryAllocationLib\r
\r
[Protocols]\r
gEfiUdp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
\r
[Protocols]\r
gEfiUdp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
Packet->OpCode = HTONS (Instance->Operation);\r
Cur = Packet->Rrq.Filename;\r
Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Token->Filename);\r
Packet->OpCode = HTONS (Instance->Operation);\r
Cur = Packet->Rrq.Filename;\r
Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Token->Filename);\r
+ Cur += AsciiStrLen ((CHAR8 *) Token->Filename);\r
Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Mode);\r
Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Mode);\r
+ Cur += AsciiStrLen ((CHAR8 *) Mode);\r
\r
for (Index = 0; Index < Token->OptionCount; ++Index) {\r
\r
for (Index = 0; Index < Token->OptionCount; ++Index) {\r
- Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Options[Index].OptionStr);\r
- Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Options[Index].ValueStr);\r
+ Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Options[Index].OptionStr);\r
+ Cur += AsciiStrLen ((CHAR8 *) Options[Index].OptionStr);\r
+\r
+ Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Options[Index].ValueStr);\r
+ Cur += AsciiStrLen ((CHAR8 *) (CHAR8 *) Options[Index].ValueStr);\r
}\r
\r
return Mtftp4SendPacket (Instance, Nbuf);\r
}\r
\r
return Mtftp4SendPacket (Instance, Nbuf);\r
\r
return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);\r
\r
\r
return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);\r
\r
+ default:\r
+ return EFI_UNSUPPORTED;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r