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/Dhcp4Dxe/Dhcp4Driver.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/Dhcp4Dxe/Dhcp4Driver.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c index 1ca0589..76c55c4 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c @@ -106,16 +106,16 @@ Dhcp4DriverBindingSupported ( Configure the default UDP child to receive all the DHCP traffics
on this network interface.
- @param[in] UdpIo The UDP IO port to configure
+ @param[in] UdpIo The UDP IO to configure
@param[in] Context The context to the function
- @retval EFI_SUCCESS The UDP IO port is successfully configured.
+ @retval EFI_SUCCESS The UDP IO is successfully configured.
@retval Others Failed to configure the UDP child.
**/
EFI_STATUS
DhcpConfigUdpIo (
- IN UDP_IO_PORT *UdpIo,
+ IN UDP_IO *UdpIo,
IN VOID *Context
)
{
@@ -139,7 +139,7 @@ DhcpConfigUdpIo ( ZeroMem (&UdpConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
ZeroMem (&UdpConfigData.RemoteAddress, sizeof (EFI_IPv4_ADDRESS));
- return UdpIo->Udp->Configure (UdpIo->Udp, &UdpConfigData);;
+ return UdpIo->Protocol.Udp4->Configure (UdpIo->Protocol.Udp4, &UdpConfigData);;
}
@@ -162,7 +162,7 @@ Dhcp4CloseService ( DhcpCleanLease (DhcpSb);
if (DhcpSb->UdpIo != NULL) {
- UdpIoFreePort (DhcpSb->UdpIo);
+ UdpIoFreeIo (DhcpSb->UdpIo);
DhcpSb->UdpIo = NULL;
}
@@ -237,7 +237,13 @@ Dhcp4CreateService ( goto ON_ERROR;
}
- DhcpSb->UdpIo = UdpIoCreatePort (Controller, ImageHandle, DhcpConfigUdpIo, NULL);
+ DhcpSb->UdpIo = UdpIoCreateIo (
+ Controller,
+ ImageHandle,
+ DhcpConfigUdpIo,
+ UDP_IO_UDP4_VERSION,
+ NULL
+ );
if (DhcpSb->UdpIo == NULL) {
Status = EFI_OUT_OF_RESOURCES;
|