diff options
author | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-06-13 08:18:10 +0000 |
---|---|---|
committer | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-06-13 08:18:10 +0000 |
commit | 2a2e33b20feb245572416333bf26eb8a77e73aa9 (patch) | |
tree | 93d49cc2d0887fc4bcb669bcc099950ee5711271 /MdeModulePkg/Universal/Network | |
parent | 0ccabf7bab741234721a8ee78113ef191c0ce8d5 (diff) | |
download | edk2-platforms-2a2e33b20feb245572416333bf26eb8a77e73aa9.tar.xz |
Add a UNION definition (IP_IO_IP_PROTOOCL) for EFI_IP4/6_PROTOCOL and change IP_IO structure using this UNION to point the special IP Protocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10578 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network')
4 files changed, 22 insertions, 22 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c index 2e2a66432c..536a16a16c 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c @@ -39,14 +39,14 @@ Tcp4Route ( IN TCP4_ROUTE_INFO *RouteInfo
)
{
- EFI_IP4_PROTOCOL *Ip;
+ EFI_IP4_PROTOCOL *Ip4;
- Ip = Tcb->IpInfo->Ip;
+ Ip4 = Tcb->IpInfo->Ip.Ip4;
- ASSERT (Ip != NULL);
+ ASSERT (Ip4 != NULL);
- return Ip->Routes (
- Ip,
+ return Ip4->Routes (
+ Ip4,
RouteInfo->DeleteRoute,
RouteInfo->SubnetAddress,
RouteInfo->SubnetMask,
@@ -131,7 +131,7 @@ Tcp4GetMode ( }
}
- Ip = Tcb->IpInfo->Ip;
+ Ip = Tcb->IpInfo->Ip.Ip4;
ASSERT (Ip != NULL);
return Ip->GetModeData (Ip, Mode->Ip4ModeData, Mode->MnpConfigData, Mode->SnpModeData);
@@ -607,7 +607,7 @@ Tcp4Dispatcher ( switch (Request) {
case SOCK_POLL:
- Ip = (EFI_IP4_PROTOCOL *) (ProtoData->TcpService->IpIo->Ip);
+ Ip = ProtoData->TcpService->IpIo->Ip.Ip4;
Ip->Poll (Ip);
break;
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c index 245da8637d..afcaba4ed6 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c @@ -478,7 +478,7 @@ TcpGetRcvMss ( ASSERT (Sock != NULL);
TcpProto = (TCP4_PROTO_DATA *) Sock->ProtoReserved;
- Ip = (EFI_IP4_PROTOCOL *) (TcpProto->TcpService->IpIo->Ip);
+ Ip = TcpProto->TcpService->IpIo->Ip.Ip4;
ASSERT (Ip != NULL);
Ip->GetModeData (Ip, &Ip4Mode, NULL, NULL);
diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c index 2751cdccbd..bc07c185d9 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c @@ -59,17 +59,17 @@ Udp4FindInstanceByPort ( @param[in] Status The completion status of the output udp datagram.
@param[in] Context Pointer to the context data.
- @param[in] Sender Pointer to the Ip sender of the udp datagram.
+ @param[in] Sender Specify a pointer of EFI_IP4_PROTOCOL for sending.
@param[in] NotifyData Pointer to the notify data.
**/
VOID
EFIAPI
Udp4DgramSent (
- IN EFI_STATUS Status,
- IN VOID *Context,
- IN VOID *Sender,
- IN VOID *NotifyData
+ IN EFI_STATUS Status,
+ IN VOID *Context,
+ IN IP_IO_IP_PROTOCOL Sender,
+ IN VOID *NotifyData
);
/**
@@ -989,17 +989,17 @@ Udp4RemoveToken ( @param[in] Status The completion status of the output udp datagram.
@param[in] Context Pointer to the context data.
- @param[in] Sender Pointer to the Ip sender of the udp datagram.
+ @param[in] Sender Specify a pointer of EFI_IP4_PROTOCOL for sending.
@param[in] NotifyData Pointer to the notify data.
**/
VOID
EFIAPI
Udp4DgramSent (
- IN EFI_STATUS Status,
- IN VOID *Context,
- IN VOID *Sender,
- IN VOID *NotifyData
+ IN EFI_STATUS Status,
+ IN VOID *Context,
+ IN IP_IO_IP_PROTOCOL Sender,
+ IN VOID *NotifyData
)
{
UDP4_INSTANCE_DATA *Instance;
diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c index ed997e1930..db1c4fdb87 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c @@ -79,7 +79,7 @@ Udp4GetModeData ( CopyMem (Udp4ConfigData, &Instance->ConfigData, sizeof (*Udp4ConfigData));
}
- Ip = Instance->IpInfo->Ip;
+ Ip = Instance->IpInfo->Ip.Ip4;
//
// Get the underlying Ip4ModeData, MnpConfigData and SnpModeData.
@@ -357,7 +357,7 @@ Udp4Groups ( return EFI_NOT_STARTED;
}
- Ip = Instance->IpInfo->Ip;
+ Ip = Instance->IpInfo->Ip.Ip4;
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
@@ -457,7 +457,7 @@ Udp4Routes ( return EFI_NOT_STARTED;
}
- Ip = Instance->IpInfo->Ip;
+ Ip = Instance->IpInfo->Ip.Ip4;
//
// Invoke the Ip instance the Udp4 instance consumes to do the actual operation.
@@ -900,7 +900,7 @@ Udp4Poll ( }
Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
- Ip = Instance->IpInfo->Ip;
+ Ip = Instance->IpInfo->Ip.Ip4;
//
// Invode the Ip instance consumed by the udp instance to do the poll operation.
|