diff options
author | tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-10-30 05:11:38 +0000 |
---|---|---|
committer | tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-10-30 05:11:38 +0000 |
commit | b45b45b2d248892930620c33a9d01d8457ae0e54 (patch) | |
tree | df2247302944f809db0cd2fbc27771e23a28cbc1 /MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c | |
parent | 72f01d4b4a73f55bbabee8eba386f106891541f5 (diff) | |
download | edk2-b45b45b2d248892930620c33a9d01d8457ae0e54.zip edk2-b45b45b2d248892930620c33a9d01d8457ae0e54.tar.gz edk2-b45b45b2d248892930620c33a9d01d8457ae0e54.tar.bz2 |
1. Update the UdpIo to a combined UdpIo to support both v4 and v6 stack.
2. Update Dhcp4 and Mtftp4 driver to adopt the combined UdpIo.
3. Clean up coding style problems in combined IpIoLib/NetLib. Update Tcp4 and Udp4 to adopt the changes.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9382 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c index 56c993e..63dcc6c 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c @@ -1,7 +1,7 @@ /** @file
Implementation of Mtftp drivers.
-Copyright (c) 2006 - 2007, Intel Corporation<BR>
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -107,7 +107,7 @@ Mtftp4DriverBindingSupported ( Just leave the Udp child unconfigured. When UDP is unloaded,
MTFTP will be informed with DriverBinding Stop.
- @param UdpIo The UDP port to configure
+ @param UdpIo The UDP_IO to configure
@param Context The opaque parameter to the callback
@retval EFI_SUCCESS It always return EFI_SUCCESS directly.
@@ -115,7 +115,7 @@ Mtftp4DriverBindingSupported ( **/
EFI_STATUS
Mtftp4ConfigNullUdp (
- IN UDP_IO_PORT *UdpIo,
+ IN UDP_IO *UdpIo,
IN VOID *Context
)
{
@@ -201,7 +201,13 @@ Mtftp4CreateService ( return Status;
}
- MtftpSb->ConnectUdp = UdpIoCreatePort (Controller, Image, Mtftp4ConfigNullUdp, NULL);
+ MtftpSb->ConnectUdp = UdpIoCreateIo (
+ Controller,
+ Image,
+ Mtftp4ConfigNullUdp,
+ UDP_IO_UDP4_VERSION,
+ NULL
+ );
if (MtftpSb->ConnectUdp == NULL) {
gBS->CloseEvent (MtftpSb->TimerToGetMap);
@@ -226,7 +232,7 @@ Mtftp4CleanService ( IN MTFTP4_SERVICE *MtftpSb
)
{
- UdpIoFreePort (MtftpSb->ConnectUdp);
+ UdpIoFreeIo (MtftpSb->ConnectUdp);
gBS->CloseEvent (MtftpSb->TimerToGetMap);
gBS->CloseEvent (MtftpSb->Timer);
}
@@ -467,10 +473,11 @@ Mtftp4ServiceBindingCreateChild ( Mtftp4InitProtocol (MtftpSb, Instance);
- Instance->UnicastPort = UdpIoCreatePort (
+ Instance->UnicastPort = UdpIoCreateIo (
MtftpSb->Controller,
MtftpSb->Image,
Mtftp4ConfigNullUdp,
+ UDP_IO_UDP4_VERSION,
Instance
);
@@ -530,7 +537,7 @@ Mtftp4ServiceBindingCreateChild ( ON_ERROR:
if (EFI_ERROR (Status)) {
- UdpIoFreePort (Instance->UnicastPort);
+ UdpIoFreeIo (Instance->UnicastPort);
gBS->FreePool (Instance);
}
@@ -623,7 +630,7 @@ Mtftp4ServiceBindingDestroyChild ( OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
Mtftp4CleanOperation (Instance, EFI_DEVICE_ERROR);
- UdpIoFreePort (Instance->UnicastPort);
+ UdpIoFreeIo (Instance->UnicastPort);
RemoveEntryList (&Instance->Link);
MtftpSb->ChildrenNum--;
|