1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.

2. Fixed one porting bug in Udp4Impl.c

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3717 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2007-08-27 09:17:26 +00:00
parent 98376cc51d
commit e5e12de7d0
10 changed files with 274 additions and 11 deletions

View File

@@ -248,6 +248,16 @@ Tcp4FlushPcb (
if (SOCK_IS_CONFIGURED (Sock)) {
NetListRemoveEntry (&Tcb->List);
//
// Uninstall the device path protocl.
//
gBS->UninstallProtocolInterface (
Sock->SockHandle,
&gEfiDevicePathProtocolGuid,
Sock->DevicePath
);
NetFreePool (Sock->DevicePath);
TcpSetVariableData (TcpProto->TcpService);
}
@@ -428,12 +438,19 @@ Tcp4ConfigurePcb (
Tcb->TTL = CfgData->TimeToLive;
Tcb->TOS = CfgData->TypeOfService;
Tcb->UseDefaultAddr = CfgData->AccessPoint.UseDefaultAddress;
NetCopyMem (&Tcb->LocalEnd.Ip, &CfgData->AccessPoint.StationAddress, sizeof (IP4_ADDR));
Tcb->LocalEnd.Port = HTONS (CfgData->AccessPoint.StationPort);
Tcb->SubnetMask = CfgData->AccessPoint.SubnetMask;
NetCopyMem (&Tcb->RemoteEnd.Ip, &CfgData->AccessPoint.RemoteAddress, sizeof (IP4_ADDR));
Tcb->RemoteEnd.Port = HTONS (CfgData->AccessPoint.RemotePort);
if (CfgData->AccessPoint.ActiveFlag) {
NetCopyMem (&Tcb->RemoteEnd.Ip, &CfgData->AccessPoint.RemoteAddress, sizeof (IP4_ADDR));
Tcb->RemoteEnd.Port = HTONS (CfgData->AccessPoint.RemotePort);
} else {
Tcb->RemoteEnd.Ip = 0;
Tcb->RemoteEnd.Port = 0;
}
Option = CfgData->ControlOption;
@@ -537,6 +554,15 @@ Tcp4ConfigurePcb (
}
}
//
// The socket is bound, the <SrcIp, SrcPort, DstIp, DstPort> is
// determined, construct the IP device path and install it.
//
Status = TcpInstallDevicePath (Sk);
if (EFI_ERROR (Status)) {
goto OnExit;
}
//
// update state of Tcb and socket
//
@@ -681,8 +707,6 @@ Tcp4Dispatcher (
return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);
default:
return EFI_UNSUPPORTED;
}
return EFI_SUCCESS;