/** @file\r
The implementation of a dispatch routine for processing TCP requests.\r
\r
+ (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
\r
AccessPoint->UseDefaultAddress = Tcb->UseDefaultAddr;\r
\r
- CopyMem (&AccessPoint->StationAddress, &Tcb->LocalEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
+ IP4_COPY_ADDRESS (&AccessPoint->StationAddress, &Tcb->LocalEnd.Ip);\r
\r
- AccessPoint->SubnetMask = Tcb->SubnetMask;\r
+ IP4_COPY_ADDRESS (&AccessPoint->SubnetMask, &Tcb->SubnetMask);\r
AccessPoint->StationPort = NTOHS (Tcb->LocalEnd.Port);\r
\r
- CopyMem (&AccessPoint->RemoteAddress, &Tcb->RemoteEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
+ IP4_COPY_ADDRESS (&AccessPoint->RemoteAddress, &Tcb->RemoteEnd.Ip);\r
\r
AccessPoint->RemotePort = NTOHS (Tcb->RemoteEnd.Port);\r
AccessPoint->ActiveFlag = (BOOLEAN) (Tcb->State != TCP_LISTEN);\r
UINT16 *RandomPort;\r
\r
if (IpVersion == IP_VERSION_4) {\r
- CopyMem (&Local, &TcpAp->Tcp4Ap.StationAddress, sizeof (EFI_IPv4_ADDRESS));\r
+ IP4_COPY_ADDRESS (&Local, &TcpAp->Tcp4Ap.StationAddress);\r
Port = &TcpAp->Tcp4Ap.StationPort;\r
RandomPort = &mTcp4RandomPort;\r
} else {\r
)\r
{\r
SOCKET *Sock;\r
- TCP_PROTO_DATA *TcpProto;\r
\r
IpIoConfigIp (Tcb->IpInfo, NULL);\r
\r
Sock = Tcb->Sk;\r
- TcpProto = (TCP_PROTO_DATA *) Sock->ProtoReserved;\r
\r
if (SOCK_IS_CONFIGURED (Sock)) {\r
RemoveEntryList (&Tcb->List);\r
IpCfgData.Ip4CfgData.TypeOfService = CfgData->Tcp4CfgData.TypeOfService;\r
IpCfgData.Ip4CfgData.TimeToLive = CfgData->Tcp4CfgData.TimeToLive;\r
IpCfgData.Ip4CfgData.UseDefaultAddress = CfgData->Tcp4CfgData.AccessPoint.UseDefaultAddress;\r
- IpCfgData.Ip4CfgData.SubnetMask = CfgData->Tcp4CfgData.AccessPoint.SubnetMask;\r
+ IP4_COPY_ADDRESS (\r
+ &IpCfgData.Ip4CfgData.SubnetMask,\r
+ &CfgData->Tcp4CfgData.AccessPoint.SubnetMask\r
+ );\r
IpCfgData.Ip4CfgData.ReceiveTimeout = (UINT32) (-1);\r
- CopyMem (\r
+ IP4_COPY_ADDRESS (\r
&IpCfgData.Ip4CfgData.StationAddress,\r
- &CfgData->Tcp4CfgData.AccessPoint.StationAddress,\r
- sizeof (EFI_IPv4_ADDRESS)\r
+ &CfgData->Tcp4CfgData.AccessPoint.StationAddress\r
);\r
\r
} else {\r
//\r
// Get the default address information if the instance is configured to use default address.\r
//\r
- CfgData->Tcp4CfgData.AccessPoint.StationAddress = IpCfgData.Ip4CfgData.StationAddress;\r
- CfgData->Tcp4CfgData.AccessPoint.SubnetMask = IpCfgData.Ip4CfgData.SubnetMask;\r
+ IP4_COPY_ADDRESS (\r
+ &CfgData->Tcp4CfgData.AccessPoint.StationAddress,\r
+ &IpCfgData.Ip4CfgData.StationAddress\r
+ );\r
+ IP4_COPY_ADDRESS (\r
+ &CfgData->Tcp4CfgData.AccessPoint.SubnetMask,\r
+ &IpCfgData.Ip4CfgData.SubnetMask\r
+ );\r
\r
TcpAp = (TCP_ACCESS_POINT *) &CfgData->Tcp4CfgData.AccessPoint;\r
} else {\r
\r
CopyMem (&Tcb->LocalEnd.Ip, &CfgData->Tcp4CfgData.AccessPoint.StationAddress, sizeof (IP4_ADDR));\r
Tcb->LocalEnd.Port = HTONS (CfgData->Tcp4CfgData.AccessPoint.StationPort);\r
- Tcb->SubnetMask = CfgData->Tcp4CfgData.AccessPoint.SubnetMask;\r
+ IP4_COPY_ADDRESS (&Tcb->SubnetMask, &CfgData->Tcp4CfgData.AccessPoint.SubnetMask);\r
\r
CopyMem (&Tcb->RemoteEnd.Ip, &CfgData->Tcp4CfgData.AccessPoint.RemoteAddress, sizeof (IP4_ADDR));\r
Tcb->RemoteEnd.Port = HTONS (CfgData->Tcp4CfgData.AccessPoint.RemotePort);\r