Code clean up in NetLib:

1. Add GLOBAL_REMOVE_IF_UNREFERENCED to all globals
2. Update NTOHL and NTOHS to be BaseLib func SwapBytes32/SwapBytes16
3. Remove duplicate NET_SWAP_SHORT (to use NTOHS instead)

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9648 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xdu2
2009-12-30 13:44:11 +00:00
parent 9ae650ef6c
commit 1204fe8319
13 changed files with 473 additions and 475 deletions

View File

@ -1090,18 +1090,22 @@ TcpInstallDevicePath (
TCP_CB *Tcb;
IPv4_DEVICE_PATH Ip4DPathNode;
EFI_STATUS Status;
TCP_PORTNO LocalPort;
TCP_PORTNO RemotePort;
TcpProto = (TCP4_PROTO_DATA *) Sock->ProtoReserved;
TcpService = TcpProto->TcpService;
Tcb = TcpProto->TcpPcb;
LocalPort = NTOHS (Tcb->LocalEnd.Port);
RemotePort = NTOHS (Tcb->RemoteEnd.Port);
NetLibCreateIPv4DPathNode (
&Ip4DPathNode,
TcpService->ControllerHandle,
Tcb->LocalEnd.Ip,
NTOHS (Tcb->LocalEnd.Port),
LocalPort,
Tcb->RemoteEnd.Ip,
NTOHS (Tcb->RemoteEnd.Port),
RemotePort,
EFI_IP_PROTO_TCP,
Tcb->UseDefaultAddr
);